diff --git a/charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml b/charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml index ca306fb5c..532e8c147 100644 --- a/charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml +++ b/charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml @@ -18,13 +18,19 @@ spec: jobTemplate: spec: template: - {{- if .Values.global.podLabels }} + {{- if or .Values.global.podLabels .Values.datahubUpgrade.podAnnotations }} metadata: + {{- with .Values.datahubUpgrade.podAnnotations }} + annotations: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.global.podLabels }} labels: - {{- range $key, $value := .Values.global.podLabels }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} + {{- end }} spec: {{- with .Values.global.hostAliases }} hostAliases: diff --git a/charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml b/charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml index cf9a7150e..d47dcab7a 100644 --- a/charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml +++ b/charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml @@ -18,13 +18,19 @@ spec: jobTemplate: spec: template: - {{- if .Values.global.podLabels }} + {{- if or .Values.global.podLabels .Values.datahubUpgrade.podAnnotations }} metadata: + {{- with .Values.datahubUpgrade.podAnnotations }} + annotations: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.global.podLabels }} labels: - {{- range $key, $value := .Values.global.podLabels }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} + {{- end }} spec: {{- with .Values.global.hostAliases }} hostAliases: diff --git a/charts/datahub/templates/datahub-upgrade/datahub-upgrade-job.yml b/charts/datahub/templates/datahub-upgrade/datahub-upgrade-job.yml index 248bd0ad9..51550f81b 100644 --- a/charts/datahub/templates/datahub-upgrade/datahub-upgrade-job.yml +++ b/charts/datahub/templates/datahub-upgrade/datahub-upgrade-job.yml @@ -16,13 +16,19 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation spec: template: - {{- if .Values.global.podLabels }} + {{- if or .Values.global.podLabels .Values.datahubUpgrade.podAnnotations}} metadata: + {{- with .Values.datahubUpgrade.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.global.podLabels }} labels: - {{- range $key, $value := .Values.global.podLabels }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} + {{- end }} spec: {{- with .Values.global.hostAliases }} hostAliases: diff --git a/charts/datahub/templates/elasticsearch-setup-job.yml b/charts/datahub/templates/elasticsearch-setup-job.yml index 61ccabd11..612f48d3c 100644 --- a/charts/datahub/templates/elasticsearch-setup-job.yml +++ b/charts/datahub/templates/elasticsearch-setup-job.yml @@ -16,13 +16,19 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation spec: template: - {{- if .Values.global.podLabels }} + {{- if or .Values.global.podLabels .Values.elasticsearchSetupJob.podAnnotations }} metadata: + {{- with .Values.elasticsearchSetupJob.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.global.podLabels }} labels: - {{- range $key, $value := .Values.global.podLabels }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} + {{- end }} spec: {{- with .Values.global.hostAliases }} hostAliases: diff --git a/charts/datahub/templates/kafka-setup-job.yml b/charts/datahub/templates/kafka-setup-job.yml index 99115f04b..7d907e5e9 100644 --- a/charts/datahub/templates/kafka-setup-job.yml +++ b/charts/datahub/templates/kafka-setup-job.yml @@ -16,13 +16,19 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation spec: template: - {{- if .Values.global.podLabels }} + {{- if or .Values.global.podLabels .Values.kafkaSetupJob.podAnnotations }} metadata: + {{- with .Values.kafkaSetupJob.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.global.podLabels }} labels: - {{- range $key, $value := .Values.global.podLabels }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} + {{- end }} spec: {{- with .Values.global.hostAliases }} hostAliases: diff --git a/charts/datahub/templates/mysql-setup-job.yml b/charts/datahub/templates/mysql-setup-job.yml index 51b1dba3a..7f4097351 100644 --- a/charts/datahub/templates/mysql-setup-job.yml +++ b/charts/datahub/templates/mysql-setup-job.yml @@ -16,13 +16,19 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation spec: template: - {{- if .Values.global.podLabels }} + {{- if or .Values.global.podLabels .Values.mysqlSetupJob.podAnnotations }} metadata: + {{- with .Values.mysqlSetupJob.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.global.podLabels }} labels: - {{- range $key, $value := .Values.global.podLabels }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} + {{- end }} spec: {{- with .Values.global.hostAliases }} hostAliases: diff --git a/charts/datahub/templates/postgresql-setup-job.yml b/charts/datahub/templates/postgresql-setup-job.yml index bac141368..107a905f3 100644 --- a/charts/datahub/templates/postgresql-setup-job.yml +++ b/charts/datahub/templates/postgresql-setup-job.yml @@ -16,13 +16,19 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation spec: template: - {{- if .Values.global.podLabels }} + {{- if or .Values.global.podLabels .Values.postgresqlSetupJob.podAnnotations }} metadata: + {{- with .Values.postgresqlSetupJob.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.global.podLabels }} labels: - {{- range $key, $value := .Values.global.podLabels }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} + {{- end }} spec: {{- with .Values.global.hostAliases }} hostAliases: