Skip to content

Commit 463bfb7

Browse files
committed
fix(helpers): attach Layer2VIP to VLAN interface in generic multi-doc path
Mirror of the cozystack fix: when the default link is a VLAN, $interfaceName is rewritten to the parent link while the VLAN addresses/routes are emitted on $defaultLinkName. Use $defaultLinkName for Layer2VIPConfig.link in that branch so the VIP stays on the VLAN. Address review feedback from coderabbitai on charts/generic/templates/_helpers.tpl:152. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
1 parent cac8dd9 commit 463bfb7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

charts/generic/templates/_helpers.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,16 @@ addresses:
144144
routes:
145145
- gateway: {{ include "talm.discovered.default_gateway" . }}
146146
{{- end }}
147+
{{- $vipLinkName := $interfaceName }}
148+
{{- if $isVlan }}
149+
{{- $vipLinkName = $defaultLinkName }}
150+
{{- end }}
147151
{{- if and .Values.floatingIP (eq .MachineType "controlplane") }}
148152
---
149153
apiVersion: v1alpha1
150154
kind: Layer2VIPConfig
151155
name: {{ .Values.floatingIP | quote }}
152-
link: {{ $interfaceName }}
156+
link: {{ $vipLinkName }}
153157
{{- end }}
154158
{{- end }}
155159

0 commit comments

Comments
 (0)