From 72460406a40865961b956a93543dbdaeb3b4db0f Mon Sep 17 00:00:00 2001 From: Patrick Vares Date: Mon, 12 Feb 2024 12:08:32 -0500 Subject: [PATCH 1/2] Fix for #26: Added jobAnnotations and fixed podAnnotations --- charts/graph-kubernetes/templates/cronjob.yaml | 6 +++++- charts/graph-kubernetes/values.yaml | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/graph-kubernetes/templates/cronjob.yaml b/charts/graph-kubernetes/templates/cronjob.yaml index 4235fe2..7ba77f8 100644 --- a/charts/graph-kubernetes/templates/cronjob.yaml +++ b/charts/graph-kubernetes/templates/cronjob.yaml @@ -98,7 +98,7 @@ spec: schedule: "{{ .Values.cronjob.schedule }}" jobTemplate: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.jobAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} @@ -107,6 +107,10 @@ spec: spec: template: spec: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 12 }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 12 }} diff --git a/charts/graph-kubernetes/values.yaml b/charts/graph-kubernetes/values.yaml index 88665f4..6e9b3c6 100644 --- a/charts/graph-kubernetes/values.yaml +++ b/charts/graph-kubernetes/values.yaml @@ -48,6 +48,11 @@ resources: ######### Scheduling ########### ################################ +### Job Annotations +## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +## +jobAnnotations: {} + ### Pod Annotations ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ ## From ccd7650a48be7cf908e4fb6eb65c40cd9d0c83b7 Mon Sep 17 00:00:00 2001 From: Patrick Vares Date: Mon, 12 Feb 2024 12:15:20 -0500 Subject: [PATCH 2/2] Fixed annotation spec to include metadata --- charts/graph-kubernetes/templates/cronjob.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/graph-kubernetes/templates/cronjob.yaml b/charts/graph-kubernetes/templates/cronjob.yaml index 7ba77f8..77805dc 100644 --- a/charts/graph-kubernetes/templates/cronjob.yaml +++ b/charts/graph-kubernetes/templates/cronjob.yaml @@ -108,8 +108,9 @@ spec: template: spec: {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 12 }} + metadata: + annotations: + {{- toYaml . | nindent 14 }} {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: