Skip to content

Commit 133b75b

Browse files
authored
MAJOR: kubernetes-ingress: Make controller.podAnnotations templatable (#276)
Signed-off-by: Philipp Hossner <[email protected]>
1 parent f358fd5 commit 133b75b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
controller:
2+
podAnnotations: |
3+
my-checksum: {{ $.Values.myCustomVar | toYaml | sha256sum }}
4+
myCustomVar:
5+
FOO: BAR

kubernetes-ingress/templates/controller-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)