You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by cr...@apache.org on 2021/02/13 16:40:49 UTC
[superset] branch master updated: Custom superset_config.py +
secret envs (#13096)
This is an automated email from the ASF dual-hosted git repository.
craigrueda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 6b615c4 Custom superset_config.py + secret envs (#13096)
6b615c4 is described below
commit 6b615c447961b6a1cc806e7d7ff5e59b51e66749
Author: Yann Jouanique <ya...@oneacrefund.org>
AuthorDate: Sat Feb 13 18:39:44 2021 +0200
Custom superset_config.py + secret envs (#13096)
---
helm/superset/templates/_helpers.tpl | 9 +++++++++
helm/superset/templates/secret-env.yaml | 5 +++++
helm/superset/values.yaml | 31 +++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+)
diff --git a/helm/superset/templates/_helpers.tpl b/helm/superset/templates/_helpers.tpl
index ac9abc9..6b2ad27 100644
--- a/helm/superset/templates/_helpers.tpl
+++ b/helm/superset/templates/_helpers.tpl
@@ -97,4 +97,13 @@ RESULTS_BACKEND = RedisCache(
port=env('REDIS_PORT'),
key_prefix='superset_results'
)
+
+{{ if .Values.configOverrides }}
+# Overrides
+{{- range $key, $value := .Values.configOverrides }}
+# {{ $key }}
+{{ $value }}
+{{- end }}
+{{- end }}
+
{{- end }}
diff --git a/helm/superset/templates/secret-env.yaml b/helm/superset/templates/secret-env.yaml
index 6c86252..c1ce152 100644
--- a/helm/superset/templates/secret-env.yaml
+++ b/helm/superset/templates/secret-env.yaml
@@ -32,3 +32,8 @@ data:
DB_USER: {{ .Values.supersetNode.connections.db_user | b64enc | quote }}
DB_PASS: {{ .Values.supersetNode.connections.db_pass | b64enc | quote }}
DB_NAME: {{ .Values.supersetNode.connections.db_name | b64enc | quote }}
+ {{- if .Values.extraSecretEnv }}
+ {{- range $key, $value := .Values.extraSecretEnv }}
+ {{ $key }}: {{ $value | b64enc | quote }}
+ {{- end }}
+ {{- end }}
diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml
index 065a1d5..e6681d8 100644
--- a/helm/superset/values.yaml
+++ b/helm/superset/values.yaml
@@ -41,6 +41,13 @@ envFromSecret: '{{ template "superset.fullname" . }}-env'
##
extraEnv: {}
+## Extra environment variables to pass as secrets
+##
+extraSecretEnv: {}
+ # MAPBOX_API_KEY: ...
+ # GOOGLE_KEY: ...
+ # GOOGLE_SECRET: ...
+
extraConfigs: {}
# datasources-init.yaml: |
# databases:
@@ -54,6 +61,30 @@ extraConfigs: {}
# sqlalchemy_uri: example://example-db.local
# tables: []
+# A dictionary of overrides to append at the end of superset_config.py - the name does not matter
+# WARNING: the order is not guaranteed
+configOverrides: {}
+ # enable_oauth: |
+ # from flask_appbuilder.security.manager import AUTH_DB
+ # AUTH_TYPE = AUTH_OAUTH
+
+ # OAUTH_PROVIDERS = [
+ # {
+ # "name": "google",
+ # "icon": "fa-google",
+ # "token_key": "access_token",
+ # "remote_app": {
+ # "client_id": os.environ.get("GOOGLE_KEY"),
+ # "client_secret": os.environ.get("GOOGLE_SECRET"),
+ # "api_base_url": "https://www.googleapis.com/oauth2/v2/",
+ # "client_kwargs": {"scope": "email profile"},
+ # "request_token_url": None,
+ # "access_token_url": "https://accounts.google.com/o/oauth2/token",
+ # "authorize_url": "https://accounts.google.com/o/oauth2/auth",
+ # },
+ # }
+ # ]
+
configMountPath: "/app/pythonpath"
extraConfigMountPath: "/app/configs"