From 63808a4c6c2e9130e59268e014c843050950cf5b Mon Sep 17 00:00:00 2001 From: Philipp Pfeil Date: Fri, 11 Oct 2024 17:07:15 +0200 Subject: [PATCH 1/2] feat: enable job pod annotations --- helm/oncall/templates/engine/job-migrate.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helm/oncall/templates/engine/job-migrate.yaml b/helm/oncall/templates/engine/job-migrate.yaml index 0978295427..9519f019e0 100644 --- a/helm/oncall/templates/engine/job-migrate.yaml +++ b/helm/oncall/templates/engine/job-migrate.yaml @@ -27,11 +27,16 @@ spec: template: metadata: name: {{ printf "%s-migrate-%s" (include "oncall.engine.fullname" .) (now | date "2006-01-02-15-04-05") }} - {{- with .Values.podAnnotations }} + {{- if or (.Values.podAnnotations ) (.Values.migrate.annotations) }} annotations: random-annotation: {{ randAlphaNum 10 | lower }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.migrate.annotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} labels: {{- include "oncall.engine.selectorLabels" . | nindent 8 }} spec: From 4e1affcd52e27f6f64c562e56ef575d9e35a52a2 Mon Sep 17 00:00:00 2001 From: Philipp Pfeil Date: Fri, 11 Oct 2024 17:09:32 +0200 Subject: [PATCH 2/2] docs: add comment for values.yaml --- helm/oncall/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/helm/oncall/values.yaml b/helm/oncall/values.yaml index 8ca59a2664..7d6b71701f 100644 --- a/helm/oncall/values.yaml +++ b/helm/oncall/values.yaml @@ -385,6 +385,7 @@ migrate: ttlSecondsAfterFinished: 20 # use a helm hook to manage the migration job useHook: false + # Annotations for the job and job template annotations: {} ## Affinity for pod assignment