From 95177d72b631d1666f10ad3577b8e972f5aa1a8d Mon Sep 17 00:00:00 2001 From: David Talbot Date: Wed, 1 Dec 2021 07:42:38 +1300 Subject: [PATCH] feat: added option to set pod annotations on init-db pod to Helm chart. (#17581) Signed-off-by: David Talbot --- helm/superset/Chart.yaml | 2 +- helm/superset/templates/init-job.yaml | 4 ++++ helm/superset/values.yaml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index d62a0f5b6e..95867192ed 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -22,7 +22,7 @@ maintainers: - name: craig-rueda email: craig@craigrueda.com url: https://github.com/craig-rueda -version: 0.3.12 +version: 0.4.0 dependencies: - name: postgresql version: 10.2.0 diff --git a/helm/superset/templates/init-job.yaml b/helm/superset/templates/init-job.yaml index b1a4e3e628..d69e83062e 100644 --- a/helm/superset/templates/init-job.yaml +++ b/helm/superset/templates/init-job.yaml @@ -26,6 +26,10 @@ spec: template: metadata: name: {{ template "superset.name" . }}-init-db + {{- if .Values.init.podAnnotations }} + annotations: + {{ toYaml .Values.init.podAnnotations | nindent 8 }} + {{- end }} spec: securityContext: runAsUser: {{ .Values.runAsUser }} diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index eeecea7d17..dfbcd1370f 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -335,6 +335,8 @@ init: echo "Importing database connections.... " superset import_datasources -p {{ .Values.extraConfigMountPath }}/import_datasources.yaml fi + ## Annotations to be added to init job pods + podAnnotations: {} ## ## Configuration values for the postgresql dependency. ## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md