diff --git a/kubernetes-ingress/ci/deployment-podannotations-templated-values.yaml b/kubernetes-ingress/ci/deployment-podannotations-templated-values.yaml new file mode 100644 index 0000000..9f76a57 --- /dev/null +++ b/kubernetes-ingress/ci/deployment-podannotations-templated-values.yaml @@ -0,0 +1,5 @@ +controller: + podAnnotations: | + my-checksum: {{ $.Values.myCustomVar | toYaml | sha256sum }} +myCustomVar: + FOO: BAR diff --git a/kubernetes-ingress/templates/controller-deployment.yaml b/kubernetes-ingress/templates/controller-deployment.yaml index d8c662e..5e14177 100644 --- a/kubernetes-ingress/templates/controller-deployment.yaml +++ b/kubernetes-ingress/templates/controller-deployment.yaml @@ -52,7 +52,11 @@ spec: {{- end }} {{- if .Values.controller.podAnnotations }} annotations: +{{- if eq "string" (printf "%T" .Values.controller.podAnnotations) }} +{{ tpl .Values.controller.podAnnotations . | indent 8 }} +{{- else }} {{ toYaml .Values.controller.podAnnotations | indent 8 }} +{{- end }} {{- end }} spec: enableServiceLinks: {{ .Values.controller.enableServiceLinks }}