Skip to content

Commit

Permalink
BUG: : kubernetes-ingress: Fix controller.podAnnotations not being te…
Browse files Browse the repository at this point in the history
…mpaltable in every location

Signed-off-by: Philipp Hossner <[email protected]>
  • Loading branch information
phihos committed Dec 20, 2024
1 parent 133b75b commit b2f4bab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kubernetes-ingress/templates/controller-crdjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ spec:
{{- $podAnnotations = merge $podAnnotations .Values.crdjob.podAnnotations }}
{{- end }}
{{- if .Values.controller.podAnnotations }}
{{- $podAnnotations = merge $podAnnotations .Values.controller.podAnnotations }}
{{- if eq "string" (printf "%T" .Values.controller.podAnnotations) }}
{{- $controllerPodAnnotations := tpl .Values.controller.podAnnotations . | fromYaml }}
{{- $podAnnotations = merge $podAnnotations (tpl .Values.controller.podAnnotations . | fromYaml) }}
{{- else }}
{{- $podAnnotations = merge $podAnnotations .Values.controller.podAnnotations }}
{{- end }}
{{- end }}
{{- if not (empty $podAnnotations) }}
annotations:
Expand Down
4 changes: 4 additions & 0 deletions kubernetes-ingress/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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 }}
Expand Down
4 changes: 4 additions & 0 deletions kubernetes-ingress/templates/controller-proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit b2f4bab

Please sign in to comment.