mirror of https://github.com/apache/superset.git
feat(Helm): Redis with password supported in helm charts and redis chart version updated (#18642)
* fix import_datasources documentation * Redis with password supported in helm chart * fix conditionals format and redisURL
This commit is contained in:
parent
4db70b5c18
commit
33d1c96764
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
)
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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: {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue