diff --git a/docs/docs/installation/running-on-kubernetes.mdx b/docs/docs/installation/running-on-kubernetes.mdx index a9fe285c4..f879f2e6b 100644 --- a/docs/docs/installation/running-on-kubernetes.mdx +++ b/docs/docs/installation/running-on-kubernetes.mdx @@ -178,7 +178,7 @@ Data source definitions can be automatically declared by providing key/value yam ```yaml extraConfigs: - datasources-init.yaml: | + import_datasources.yaml: | databases: - allow_file_upload: true allow_ctas: true diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index fc6be3ffd..e34786d04 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -29,6 +29,6 @@ dependencies: repository: https://charts.bitnami.com/bitnami condition: postgresql.enabled - name: redis - version: 12.3.3 + version: 16.3.1 repository: https://charts.bitnami.com/bitnami condition: redis.enabled diff --git a/helm/superset/templates/_helpers.tpl b/helm/superset/templates/_helpers.tpl index eef1b09c2..593fd0319 100644 --- a/helm/superset/templates/_helpers.tpl +++ b/helm/superset/templates/_helpers.tpl @@ -90,14 +90,22 @@ WTF_CSRF_EXEMPT_LIST = [] # A CSRF token that expires in 1 year WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365 class CeleryConfig(object): - BROKER_URL = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" CELERY_IMPORTS = ('superset.sql_lab', ) - CELERY_RESULT_BACKEND = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}} +{{- if .Values.supersetNode.connections.redis_password }} + BROKER_URL = f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" + CELERY_RESULT_BACKEND = f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" +{{- else }} + BROKER_URL = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" + CELERY_RESULT_BACKEND = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" +{{- end }} CELERY_CONFIG = CeleryConfig RESULTS_BACKEND = RedisCache( host=env('REDIS_HOST'), +{{- if .Values.supersetNode.connections.redis_password }} + password=env('REDIS_PASSWORD'), +{{- end }} port=env('REDIS_PORT'), key_prefix='superset_results' ) diff --git a/helm/superset/templates/secret-env.yaml b/helm/superset/templates/secret-env.yaml index 278ecc401..412650732 100644 --- a/helm/superset/templates/secret-env.yaml +++ b/helm/superset/templates/secret-env.yaml @@ -26,6 +26,9 @@ metadata: type: Opaque stringData: REDIS_HOST: {{ tpl .Values.supersetNode.connections.redis_host . | quote }} + {{- if .Values.supersetNode.connections.redis_password }} + REDIS_PASSWORD: {{ .Values.supersetNode.connections.redis_password | quote }} + {{- end }} REDIS_PORT: {{ .Values.supersetNode.connections.redis_port | quote }} DB_HOST: {{ tpl .Values.supersetNode.connections.db_host . | quote }} DB_PORT: {{ .Values.supersetNode.connections.db_port | quote }} diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json index dd2935878..2abe2b4b7 100644 --- a/helm/superset/values.schema.json +++ b/helm/superset/values.schema.json @@ -226,6 +226,9 @@ "redis_host": { "type": "string" }, + "redis_password": { + "type": "string" + }, "redis_port": { "type": "string" }, @@ -476,24 +479,29 @@ "enabled": { "type": "boolean" }, - "usePassword": { - "type": "boolean" - }, - "existingSecret": { - "type": [ - "string", - "null" - ] - }, - "existingSecretKey": { - "type": [ - "string", - "null" - ] - }, - "password": { + "architecture": { "type": "string" }, + "auth": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "existingSecret": { + "type": "string" + }, + "existingSecretKey": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "enabled" + ] + }, "master": { "type": "object", "additionalProperties": true, @@ -539,9 +547,8 @@ }, "required": [ "enabled", - "usePassword", - "master", - "cluster" + "architecture", + "master" ] }, "nodeSelector": { diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index e77cc51c9..392af0cbe 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -83,7 +83,7 @@ extraSecretEnv: {} # GOOGLE_SECRET: ... extraConfigs: {} - # datasources-init.yaml: | + # import_datasources.yaml: | # databases: # - allow_file_upload: true # allow_ctas: true @@ -224,8 +224,11 @@ supersetNode: - "-c" - ". {{ .Values.configMountPath }}/superset_bootstrap.sh; /usr/bin/run-server.sh" connections: + # Change in case of bringing your own redis and then also set redis.enabled:false redis_host: '{{ template "superset.fullname" . }}-redis-headless' + # redis_password: superset redis_port: "6379" + # You need to change below configuration incase bringing own PostgresSQL instance and also set postgresql.enabled:false db_host: '{{ template "superset.fullname" . }}-postgresql' db_port: "5432" db_user: superset @@ -397,27 +400,34 @@ postgresql: - ReadWriteOnce ## Configuration values for the Redis dependency. -## ref: https://github.com/kubernetes/charts/blob/master/stable/redis/README.md +## ref: https://github.com/bitnami/charts/blob/master/bitnami/redis +## More documentation can be found here: https://artifacthub.io/packages/helm/bitnami/redis redis: ## ## Use the redis chart dependency. + ## + ## If you are bringing your own redis, you can set the host in supersetNode.connections.redis_host + ## ## Set to false if bringing your own redis. enabled: true - usePassword: false ## - ## The name of an existing secret that contains the redis password. - existingSecret: - ## Name of the key containing the secret. - existingSecretKey: redis-password + ## Set architecture to standalone/replication + architecture: standalone ## - ## If you are bringing your own redis, you can set the host in redisHost. - ## redisHost: + ## Auth configuration: ## - ## Redis password - ## - password: superset + auth: + ## Enable password authentication + enabled: false + ## The name of an existing secret that contains the redis password. + existingSecret: "" + ## Name of the key containing the secret. + existingSecretKey: "" + ## Redis password + password: superset ## ## Master configuration + ## master: ## ## Image configuration @@ -438,10 +448,6 @@ redis: ## Access mode: accessModes: - ReadWriteOnce - ## - ## Disable cluster management by default. - cluster: - enabled: false nodeSelector: {}