diff --git a/helm/superset/templates/_helpers.tpl b/helm/superset/templates/_helpers.tpl index ac9abc9316e63..6b2ad270ee951 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 6c86252953df6..c1ce152a08aaf 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 065a1d562a195..e6681d8588c2a 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"