Skip to content

Commit

Permalink
look for default gw only in main table
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Kvapil <[email protected]>
  • Loading branch information
kvaps committed Jul 8, 2024
1 parent 4328b43 commit 4ff18c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion charts/talm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ driver: {{ .spec.driver }}

{{- define "talm.discovered.default_gateway" }}
{{- range (lookup "routes" "" "").items }}
{{- if and (eq .spec.dst "") (not (eq .spec.gateway "")) }}
{{- if and (eq .spec.dst "") (not (eq .spec.gateway "")) (eq .spec.table "main") }}
{{- .spec.gateway }}
{{- break }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
3 changes: 2 additions & 1 deletion pkg/generated/presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,9 @@ driver: {{ .spec.driver }}
{{- define "talm.discovered.default_gateway" }}
{{- range (lookup "routes" "" "").items }}
{{- if and (eq .spec.dst "") (not (eq .spec.gateway "")) }}
{{- if and (eq .spec.dst "") (not (eq .spec.gateway "")) (eq .spec.table "main") }}
{{- .spec.gateway }}
{{- break }}
{{- end }}
{{- end }}
{{- end }}
Expand Down

0 comments on commit 4ff18c8

Please sign in to comment.