From f18df695ccd77ed5aee5ebcd6d6ef841817581f4 Mon Sep 17 00:00:00 2001 From: Will Gan Date: Fri, 17 Dec 2021 15:33:24 -0800 Subject: [PATCH 1/4] Add option to provide configOverrides through file --- helm/superset/templates/_helpers.tpl | 8 ++++++++ helm/superset/templates/deployment-beat.yaml | 1 + helm/superset/templates/deployment-worker.yaml | 1 + helm/superset/templates/deployment.yaml | 1 + helm/superset/values.yaml | 6 ++++++ 5 files changed, 17 insertions(+) diff --git a/helm/superset/templates/_helpers.tpl b/helm/superset/templates/_helpers.tpl index 33d6f41b476d..579fd5a7eae6 100644 --- a/helm/superset/templates/_helpers.tpl +++ b/helm/superset/templates/_helpers.tpl @@ -98,5 +98,13 @@ RESULTS_BACKEND = RedisCache( {{ tpl $value $ }} {{- end }} {{- end }} +{{ if .Values.configOverridesFiles }} +# Overrides from files +{{- $files := .Files }} +{{- range $key, $value := .Values.configOverridesFiles }} +# {{ $key }} +{{ $files.Get $value }} +{{- end }} +{{- end }} {{- end }} diff --git a/helm/superset/templates/deployment-beat.yaml b/helm/superset/templates/deployment-beat.yaml index 512a7a25462a..c014959c2a05 100644 --- a/helm/superset/templates/deployment-beat.yaml +++ b/helm/superset/templates/deployment-beat.yaml @@ -44,6 +44,7 @@ spec: checksum/extraSecrets: {{ .Values.extraSecrets | toYaml | sha256sum }} checksum/extraSecretEnv: {{ .Values.extraSecretEnv | toYaml | sha256sum }} checksum/configOverrides: {{ .Values.configOverrides | toYaml | sha256sum }} + checksum/configOverridesFiles: {{ .Values.configOverridesFiles | toYaml | sha256sum }} {{ if .Values.supersetCeleryBeat.forceReload }} # Optionally force the thing to reload force-reload: {{ randAlphaNum 5 | quote }} diff --git a/helm/superset/templates/deployment-worker.yaml b/helm/superset/templates/deployment-worker.yaml index 9ada4352b88a..e91601337b21 100644 --- a/helm/superset/templates/deployment-worker.yaml +++ b/helm/superset/templates/deployment-worker.yaml @@ -42,6 +42,7 @@ spec: checksum/extraSecrets: {{ .Values.extraSecrets | toYaml | sha256sum }} checksum/extraSecretEnv: {{ .Values.extraSecretEnv | toYaml | sha256sum }} checksum/configOverrides: {{ .Values.configOverrides | toYaml | sha256sum }} + checksum/configOverridesFiles: {{ .Values.configOverridesFiles | toYaml | sha256sum }} {{ if .Values.supersetWorker.forceReload }} # Optionally force the thing to reload force-reload: {{ randAlphaNum 5 | quote }} diff --git a/helm/superset/templates/deployment.yaml b/helm/superset/templates/deployment.yaml index 4040d0a51c6c..b5f039481221 100644 --- a/helm/superset/templates/deployment.yaml +++ b/helm/superset/templates/deployment.yaml @@ -45,6 +45,7 @@ spec: checksum/extraSecrets: {{ .Values.extraSecrets | toYaml | sha256sum }} checksum/extraSecretEnv: {{ .Values.extraSecretEnv | toYaml | sha256sum }} checksum/configOverrides: {{ .Values.configOverrides | toYaml | sha256sum }} + checksum/configOverridesFiles: {{ .Values.configOverridesFiles | toYaml | sha256sum }} {{- if .Values.supersetNode.forceReload }} # Optionally force the thing to reload force-reload: {{ randAlphaNum 5 | quote }} diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index a9b9e1558c08..cb82fad9e8c9 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -143,6 +143,12 @@ configOverrides: {} # AUTH_USER_REGISTRATION = True # # The default user self registration role # AUTH_USER_REGISTRATION_ROLE = "Admin" +# Same as above but the values are files +configOverridesFiles: + hello_world: hello_world.py + # extend_timeout: extend_timeout.py + # enable_oauth: enable_oauth.py + configMountPath: "/app/pythonpath" From 8655b5a9b58d287247290b6cb4e730e5cd5c24c9 Mon Sep 17 00:00:00 2001 From: Will Gan Date: Fri, 17 Dec 2021 15:45:55 -0800 Subject: [PATCH 2/4] Remove test line in values.yaml --- helm/superset/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index cb82fad9e8c9..4bac811322fa 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -145,7 +145,6 @@ configOverrides: {} # AUTH_USER_REGISTRATION_ROLE = "Admin" # Same as above but the values are files configOverridesFiles: - hello_world: hello_world.py # extend_timeout: extend_timeout.py # enable_oauth: enable_oauth.py From fea2eca490703f72968edb03db8896fca14edab9 Mon Sep 17 00:00:00 2001 From: Will Gan Date: Mon, 20 Dec 2021 11:24:52 -0800 Subject: [PATCH 3/4] Bump chart version to 0.3.10 --- helm/superset/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index e3c6f4bb54ab..0c5b6a15af60 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.10 +version: 0.3.11 dependencies: - name: postgresql version: 10.2.0 From fc56e15ab7d224fa8cdeeeaceab33570cddfed94 Mon Sep 17 00:00:00 2001 From: Will Gan Date: Mon, 20 Dec 2021 11:48:11 -0800 Subject: [PATCH 4/4] Bump image to 0.5.1 --- helm/superset/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 53e3625c5e1a..25c81adf6bcb 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.5.0 +version: 0.5.1 dependencies: - name: postgresql version: 10.2.0