diff --git a/charts/sn-platform-slim/templates/toolset/jwt-secret-init-job.yaml b/charts/sn-platform-slim/templates/toolset/jwt-secret-init-job.yaml index e98e93d98..e9a644bc5 100644 --- a/charts/sn-platform-slim/templates/toolset/jwt-secret-init-job.yaml +++ b/charts/sn-platform-slim/templates/toolset/jwt-secret-init-job.yaml @@ -3,6 +3,8 @@ # {{- if and .Values.initialize .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled .Values.auth.authentication.jwt.autoInitSecret }} +{{- $jobAnnotations := mergeOverwrite (deepCopy (.Values.toolset.annotations | default dict)) (.Values.toolset.initJobAnnotations | default dict) }} +{{- $podAnnotations := mergeOverwrite (deepCopy (.Values.toolset.annotations | default dict)) (.Values.toolset.podAnnotations | default dict) (.Values.toolset.initJobAnnotations | default dict) }} apiVersion: batch/v1 kind: Job metadata: @@ -13,9 +15,9 @@ metadata: {{- with .Values.toolset.labels }} {{ toYaml . | indent 4 }} {{- end }} +{{- if $jobAnnotations }} annotations: -{{- with .Values.toolset.annotations }} -{{ toYaml . | indent 4 }} +{{ toYaml $jobAnnotations | indent 4 }} {{- end }} spec: template: @@ -25,9 +27,9 @@ spec: {{- if .Values.toolset.labels }} {{ toYaml .Values.toolset.labels | indent 8 }} {{- end }} +{{- if $podAnnotations }} annotations: -{{- if .Values.toolset.annotations }} -{{ toYaml .Values.toolset.annotations | indent 8 }} +{{ toYaml $podAnnotations | indent 8 }} {{- end }} spec: {{- if .Values.global.imagePullSecrets }} diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index 55b9d6d0d..861a99462 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -1853,6 +1853,7 @@ toolset: annotations: {} podLabels: {} podAnnotations: {} + initJobAnnotations: {} tolerations: [] gracePeriod: 0 resources: diff --git a/charts/sn-platform/templates/toolset/jwt-secret-init-job.yaml b/charts/sn-platform/templates/toolset/jwt-secret-init-job.yaml index 4724815f0..9aef70a3b 100644 --- a/charts/sn-platform/templates/toolset/jwt-secret-init-job.yaml +++ b/charts/sn-platform/templates/toolset/jwt-secret-init-job.yaml @@ -3,6 +3,8 @@ # {{- if and .Values.initialize .Values.auth.authentication.enabled .Values.auth.authentication.jwt.enabled .Values.auth.authentication.jwt.autoInitSecret }} +{{- $jobAnnotations := mergeOverwrite (deepCopy (.Values.toolset.annotations | default dict)) (.Values.toolset.initJobAnnotations | default dict) }} +{{- $podAnnotations := mergeOverwrite (deepCopy (.Values.toolset.annotations | default dict)) (.Values.toolset.podAnnotations | default dict) (.Values.toolset.initJobAnnotations | default dict) }} apiVersion: batch/v1 kind: Job metadata: @@ -13,9 +15,9 @@ metadata: {{- with .Values.toolset.labels }} {{ toYaml . | indent 4 }} {{- end }} +{{- if $jobAnnotations }} annotations: -{{- with .Values.toolset.annotations }} -{{ toYaml . | indent 4 }} +{{ toYaml $jobAnnotations | indent 4 }} {{- end }} spec: template: @@ -25,9 +27,9 @@ spec: {{- if .Values.toolset.labels }} {{ toYaml .Values.toolset.labels | indent 8 }} {{- end }} +{{- if $podAnnotations }} annotations: -{{- if .Values.toolset.annotations }} -{{ toYaml .Values.toolset.annotations | indent 8 }} +{{ toYaml $podAnnotations | indent 8 }} {{- end }} spec: {{- if .Values.global.imagePullSecrets }} @@ -92,4 +94,4 @@ spec: - name: tmp mountPath: /tmp/binaries restartPolicy: Never -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index 0732ce6f8..3e38dcc7f 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1931,6 +1931,7 @@ toolset: annotations: {} podLabels: {} podAnnotations: {} + initJobAnnotations: {} tolerations: [] kafka: enabled: false