Skip to content

Commit

Permalink
feat: added extraEnvRaw variable to load values from other secrets
Browse files Browse the repository at this point in the history
Signed-off-by: Evgeny Lyzov <[email protected]>
Signed-off-by: elyzov <[email protected]>
  • Loading branch information
elyzov committed Sep 27, 2021
1 parent 42fa548 commit 30466ac
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ maintainers:
- name: craig-rueda
email: [email protected]
url: https://github.com/craig-rueda
version: 0.3.9
version: 0.3.10
dependencies:
- name: postgresql
version: 10.2.0
Expand Down
5 changes: 3 additions & 2 deletions helm/superset/templates/deployment-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ spec:
env:
- name: "SUPERSET_PORT"
value: {{ .Values.service.port | quote}}
{{- if .Values.extraEnv }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote}}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.extraEnvRaw }}
{{- toYaml .Values.extraEnvRaw | nindent 12 }}
{{- end }}
envFrom:
- secretRef:
name: {{ tpl .Values.envFromSecret . | quote }}
Expand Down
5 changes: 3 additions & 2 deletions helm/superset/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@ spec:
env:
- name: "SUPERSET_PORT"
value: {{ .Values.service.port | quote}}
{{- if .Values.extraEnv }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote}}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.extraEnvRaw }}
{{- toYaml .Values.extraEnvRaw | nindent 12 }}
{{- end }}
envFrom:
- secretRef:
name: {{ tpl .Values.envFromSecret . | quote }}
Expand Down
7 changes: 3 additions & 4 deletions helm/superset/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,17 @@ spec:
env:
- name: "SUPERSET_PORT"
value: {{ .Values.service.port | quote}}
{{- if .Values.extraEnv }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote}}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.supersetNode.env }}
{{- range $key, $value := .Values.supersetNode.env }}
- name: {{ $key | quote}}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.extraEnvRaw }}
{{- toYaml .Values.extraEnvRaw | nindent 12 }}
{{- end }}
envFrom:
- secretRef:
name: {{ tpl .Values.envFromSecret . | quote }}
Expand Down
5 changes: 4 additions & 1 deletion helm/superset/templates/init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ spec:
containers:
- name: {{ template "superset.name" . }}-init-db
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{ if .Values.extraEnv }}
{{- if or .Values.extraEnv .Values.extraEnvRaw }}
env:
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.extraEnvRaw }}
{{- toYaml .Values.extraEnvRaw | nindent 10 }}
{{- end }}
{{- end }}
envFrom:
- secretRef:
Expand Down
12 changes: 11 additions & 1 deletion helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,21 @@ extraEnv: {}
# GUNICORN_TIMEOUT: 300


# OAUTH_HOME_DOMAIN: ..
# OAUTH_HOME_DOMAIN: ..
# # If a whitelist is not set, any address that can use your OAuth2 endpoint will be able to login.
# # this includes any random Gmail address if your OAuth2 Web App is set to External.
# OAUTH_WHITELIST_REGEX: ...

## Extra environment variables in RAW format that will be passed into pods
##
extraEnvRaw: []
# Load DB password from other secret (e.g. for zalando operator)
# - name: DB_PASS
# valueFrom:
# secretKeyRef:
# name: superset.superset-postgres.credentials.postgresql.acid.zalan.do
# key: password

## Extra environment variables to pass as secrets
##
extraSecretEnv: {}
Expand Down

0 comments on commit 30466ac

Please sign in to comment.