Skip to content

Commit 0d840c0

Browse files
committed
BUG: kubernetes-ingress: Don't merge controller podAnnotations with crdjob podAnnotations (#293)
Signed-off-by: Dinko Korunic <[email protected]>
1 parent bf36c20 commit 0d840c0

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

kubernetes-ingress/templates/controller-crdjob.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,13 @@ spec:
3838
{{- if .Values.controller.podLabels }}
3939
{{ toYaml .Values.controller.podLabels | indent 8 }}
4040
{{- end }}
41-
{{- $podAnnotations := dict }}
4241
{{- if .Values.crdjob.podAnnotations }}
43-
{{- $podAnnotations = merge $podAnnotations .Values.crdjob.podAnnotations }}
44-
{{- end }}
45-
{{- if .Values.controller.podAnnotations }}
46-
{{- if eq "string" (printf "%T" .Values.controller.podAnnotations) }}
47-
{{- $podAnnotations = merge $podAnnotations (tpl .Values.controller.podAnnotations . | fromYaml) }}
48-
{{- else }}
49-
{{- $podAnnotations = merge $podAnnotations .Values.controller.podAnnotations }}
50-
{{- end }}
51-
{{- end }}
52-
{{- if not (empty $podAnnotations) }}
5342
annotations:
54-
{{ toYaml $podAnnotations | indent 8 }}
43+
{{- if eq "string" (printf "%T" .Values.crdjob.podAnnotations) }}
44+
{{ tpl .Values.crdjob.podAnnotations . | indent 8 }}
45+
{{- else }}
46+
{{ toYaml .Values.crdjob.podAnnotations | indent 8 }}
47+
{{- end }}
5548
{{- end }}
5649
spec:
5750
restartPolicy: Never

kubernetes-ingress/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,6 @@ controller:
620620
crdjob:
621621
## Additional annotations to add to the pod container metadata
622622
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
623-
## All annotations from the controller (if set) are added to the pod metadata
624-
## If the annotation key is set for both controller and crdjob, the crdjob annotation will be used
625623
podAnnotations: {}
626624
# key: value
627625

0 commit comments

Comments
 (0)