feat: add env vars from multiple secrets in Helm chart (#15426)
diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml
index 32d672f..72089dd 100644
--- a/helm/superset/Chart.yaml
+++ b/helm/superset/Chart.yaml
@@ -22,7 +22,7 @@
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
-version: 0.2.1
+version: 0.3.0
dependencies:
- name: postgresql
version: 10.2.0
diff --git a/helm/superset/templates/deployment-beat.yaml b/helm/superset/templates/deployment-beat.yaml
index 0ec76da..e5705fa 100644
--- a/helm/superset/templates/deployment-beat.yaml
+++ b/helm/superset/templates/deployment-beat.yaml
@@ -69,7 +69,7 @@
env:
- name: "SUPERSET_PORT"
value: {{ .Values.service.port | quote}}
- {{ if .Values.extraEnv }}
+ {{- if .Values.extraEnv }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote}}
value: {{ $value | quote }}
@@ -78,6 +78,10 @@
envFrom:
- secretRef:
name: {{ tpl .Values.envFromSecret . | quote }}
+ {{- range .Values.envFromSecrets }}
+ - secretRef:
+ name: {{ tpl . $ | quote }}
+ {{- end }}
volumeMounts:
- name: superset-config
mountPath: {{ .Values.configMountPath | quote }}
diff --git a/helm/superset/templates/deployment-worker.yaml b/helm/superset/templates/deployment-worker.yaml
index 11d4a77..e9145b6 100644
--- a/helm/superset/templates/deployment-worker.yaml
+++ b/helm/superset/templates/deployment-worker.yaml
@@ -70,7 +70,7 @@
env:
- name: "SUPERSET_PORT"
value: {{ .Values.service.port | quote}}
- {{ if .Values.extraEnv }}
+ {{- if .Values.extraEnv }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote}}
value: {{ $value | quote }}
@@ -79,6 +79,10 @@
envFrom:
- secretRef:
name: {{ tpl .Values.envFromSecret . | quote }}
+ {{- range .Values.envFromSecrets }}
+ - secretRef:
+ name: {{ tpl . $ | quote }}
+ {{- end }}
volumeMounts:
- name: superset-config
mountPath: {{ .Values.configMountPath | quote }}
diff --git a/helm/superset/templates/deployment.yaml b/helm/superset/templates/deployment.yaml
index 3ac7551..b750bae 100644
--- a/helm/superset/templates/deployment.yaml
+++ b/helm/superset/templates/deployment.yaml
@@ -73,7 +73,7 @@
env:
- name: "SUPERSET_PORT"
value: {{ .Values.service.port | quote}}
- {{ if .Values.extraEnv }}
+ {{- if .Values.extraEnv }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote}}
value: {{ $value | quote }}
@@ -82,6 +82,10 @@
envFrom:
- secretRef:
name: {{ tpl .Values.envFromSecret . | quote }}
+ {{- range .Values.envFromSecrets }}
+ - secretRef:
+ name: {{ tpl . $ | quote }}
+ {{- end }}
volumeMounts:
- name: superset-config
mountPath: {{ .Values.configMountPath | quote }}
diff --git a/helm/superset/templates/init-job.yaml b/helm/superset/templates/init-job.yaml
index b3c4fd4..45ab223 100644
--- a/helm/superset/templates/init-job.yaml
+++ b/helm/superset/templates/init-job.yaml
@@ -46,12 +46,16 @@
envFrom:
- secretRef:
name: {{ tpl .Values.envFromSecret . }}
+ {{- range .Values.envFromSecrets }}
+ - secretRef:
+ name: {{ tpl . $ }}
+ {{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: superset-config
mountPath: {{ .Values.configMountPath | quote }}
readOnly: true
- {{ if .Values.extraConfigs }}
+ {{- if .Values.extraConfigs }}
- name: superset-extra-config
mountPath: {{ .Values.extraConfigMountPath | quote }}
readOnly: true
diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml
index 4869efc..fd859fe 100644
--- a/helm/superset/values.yaml
+++ b/helm/superset/values.yaml
@@ -44,6 +44,8 @@
## This can be useful for secret keys, etc.
##
envFromSecret: '{{ template "superset.fullname" . }}-env'
+## This can be a list of template strings
+envFromSecrets: []
## Extra environment variables that will be passed into pods
##