Skip to content

Commit 5ac41ef

Browse files
authored
BUG: kubernetes-ingress: Fix controller.podAnnotations not being tempaltable in every location (#277)
Signed-off-by: Philipp Hossner <[email protected]>
1 parent 133b75b commit 5ac41ef

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

kubernetes-ingress/templates/controller-crdjob.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ spec:
4848
{{- $podAnnotations = merge $podAnnotations .Values.crdjob.podAnnotations }}
4949
{{- end }}
5050
{{- if .Values.controller.podAnnotations }}
51-
{{- $podAnnotations = merge $podAnnotations .Values.controller.podAnnotations }}
51+
{{- if eq "string" (printf "%T" .Values.controller.podAnnotations) }}
52+
{{- $podAnnotations = merge $podAnnotations (tpl .Values.controller.podAnnotations . | fromYaml) }}
53+
{{- else }}
54+
{{- $podAnnotations = merge $podAnnotations .Values.controller.podAnnotations }}
55+
{{- end }}
5256
{{- end }}
5357
{{- if not (empty $podAnnotations) }}
5458
annotations:

kubernetes-ingress/templates/controller-daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ spec:
5353
{{- end }}
5454
{{- if .Values.controller.podAnnotations }}
5555
annotations:
56+
{{- if eq "string" (printf "%T" .Values.controller.podAnnotations) }}
57+
{{ tpl .Values.controller.podAnnotations . | indent 8 }}
58+
{{- else }}
5659
{{ toYaml .Values.controller.podAnnotations | indent 8 }}
60+
{{- end }}
5761
{{- end }}
5862
spec:
5963
enableServiceLinks: {{ .Values.controller.enableServiceLinks }}

kubernetes-ingress/templates/controller-proxy-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ spec:
5252
{{- end }}
5353
{{- if .Values.controller.podAnnotations }}
5454
annotations:
55+
{{- if eq "string" (printf "%T" .Values.controller.podAnnotations) }}
56+
{{ tpl .Values.controller.podAnnotations . | indent 8 }}
57+
{{- else }}
5558
{{ toYaml .Values.controller.podAnnotations | indent 8 }}
59+
{{- end }}
5660
{{- end }}
5761
spec:
5862
enableServiceLinks: {{ .Values.controller.enableServiceLinks }}

0 commit comments

Comments
 (0)