Skip to content

Commit 633cebe

Browse files
MAJOR: kubernetes-ingress: Add possibility to set crdjob annotations (#264)
1 parent bd0f229 commit 633cebe

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

kubernetes-ingress/templates/controller-crdjob.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,16 @@ spec:
4141
{{- if .Values.controller.podLabels }}
4242
{{ toYaml .Values.controller.podLabels | indent 8 }}
4343
{{- end }}
44+
{{- $podAnnotations := dict }}
45+
{{- if .Values.crdjob.podAnnotations }}
46+
{{- $podAnnotations = merge $podAnnotations .Values.crdjob.podAnnotations }}
47+
{{- end }}
4448
{{- if .Values.controller.podAnnotations }}
49+
{{- $podAnnotations = merge $podAnnotations .Values.controller.podAnnotations }}
50+
{{- end }}
51+
{{- if not (empty $podAnnotations) }}
4552
annotations:
46-
{{ toYaml .Values.controller.podAnnotations | indent 8 }}
53+
{{ toYaml $podAnnotations | indent 8 }}
4754
{{- end }}
4855
spec:
4956
restartPolicy: Never

kubernetes-ingress/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,3 +590,12 @@ controller:
590590
proxyParams: # Mandatory if source is 'proxy'
591591
replicaCount: 3 # number of replicas of the proxy, mandatory if source is 'proxy'
592592
proxySvcLabelSelector: run:haproxy-ingress-proxy # label selector of the proxy service, mandatory if source is 'proxy'
593+
594+
## CRD job default values
595+
crdjob:
596+
## Additional annotations to add to the pod container metadata
597+
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
598+
## All annotations from the controller (if set) are added to the pod metadata
599+
## If the annotation key is set for both controller and crdjob, the crdjob annotation will be used
600+
podAnnotations: {}
601+
# key: value

0 commit comments

Comments
 (0)