Skip to content

Commit db10c6e

Browse files
MINOR: kubernetes-ingress: add option to configure 'metadata.annotations' for deployment and daemonset (#302)
Signed-off-by: Sebastian Gaiser <[email protected]>
1 parent 0404481 commit db10c6e

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

kubernetes-ingress/templates/controller-crdjob.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ metadata:
2424
annotations:
2525
argocd.argoproj.io/hook: Sync
2626
argocd.argoproj.io/hook-delete-policy: HookSucceeded
27+
{{- with .Values.controller.annotations }}
28+
{{- toYaml . | nindent 4 }}
29+
{{- end }}
2730
spec:
2831
{{- if or (.Capabilities.APIVersions.Has "batch/v1alpha1") (semverCompare ">=1.23.0-0" .Capabilities.KubeVersion.Version) }}
2932
{{- if .Values.crdjob.ttlSecondsAfterFinished }}

kubernetes-ingress/templates/controller-daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ kind: DaemonSet
2424
metadata:
2525
name: {{ include "kubernetes-ingress.fullname" . }}
2626
namespace: {{ include "kubernetes-ingress.namespace" . }}
27+
{{- with .Values.controller.annotations }}
28+
annotations:
29+
{{- toYaml . | nindent 4 }}
30+
{{- end }}
2731
labels:
2832
{{- include "kubernetes-ingress.labels" . | nindent 4 }}
2933
{{- if .Values.controller.extraLabels }}

kubernetes-ingress/templates/controller-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ kind: Deployment
2020
metadata:
2121
name: {{ include "kubernetes-ingress.fullname" . }}
2222
namespace: {{ include "kubernetes-ingress.namespace" . }}
23+
{{- with .Values.controller.annotations }}
24+
annotations:
25+
{{- toYaml . | nindent 4 }}
26+
{{- end }}
2327
labels:
2428
{{- include "kubernetes-ingress.labels" . | nindent 4 }}
2529
{{- if .Values.controller.extraLabels }}

kubernetes-ingress/templates/controller-proxy-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ kind: Deployment
2020
metadata:
2121
name: {{ include "kubernetes-ingress.serviceProxyName" . }}
2222
namespace: {{ include "kubernetes-ingress.namespace" . }}
23+
{{- with .Values.controller.annotations }}
24+
annotations:
25+
{{- toYaml . | nindent 4 }}
26+
{{- end }}
2327
labels:
2428
{{- include "kubernetes-ingress.serviceProxyLabels" . | nindent 4 }}
2529
{{- if .Values.controller.extraLabels }}

kubernetes-ingress/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ controller:
187187
extraLabels: {}
188188
# key: value
189189

190+
## Additional annotations to add to the deployment or daemonset metadata
191+
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
192+
annotations: {}
193+
# key: value
194+
190195
## Additional labels to add to the pod container metadata
191196
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
192197
podLabels: {}

0 commit comments

Comments
 (0)