GitHub user pablorsk added a comment to the discussion: How to connect to
external redis db database? Using supersetNode.connections
@dosu don't work :'(
I do:
```yaml
redis:
enabled: false
supersetNode:
connections:
redis_host: "your-redis-host"
redis_port: "your-redis-port"
redis_cache_db: "2"
redis_celery_db: "2"
redis_user: ""
redis_ssl:
enabled: true
ssl_cert_reqs: "required" # valid values: "none", "optional",
"required"
extraEnvFrom:
- secretRef:
name: superset-config-secret
configOverrides:
superset_config.py: |
import os
SECRET_KEY = 'pqbdHctuhmysecret/gmWAb'
# Obtener las variables de entorno para Redis
REDIS_HOST = os.environ.get("REDIS_HOST")
REDIS_PORT = os.environ.get("REDIS_PORT")
REDIS_PASSWORD = os.environ.get("REDIS_PASSWORD")
REDIS_CACHE_DB = os.environ.get("REDIS_DB")
REDIS_CELERY_DB = os.environ.get("REDIS_CELERY_DB")
# Configuración de caché para Superset
CACHE_CONFIG = {
'CACHE_TYPE': 'RedisCache',
'CACHE_REDIS_HOST': REDIS_HOST,
'CACHE_REDIS_PORT': REDIS_PORT,
'CACHE_REDIS_DB': REDIS_CACHE_DB,
'CACHE_REDIS_PASSWORD': REDIS_PASSWORD,
}
# Configuración de la caché para consultas asíncronas
GLOBAL_ASYNC_QUERIES_CACHE_BACKEND = {
'CACHE_TYPE': 'RedisCache',
'CACHE_REDIS_HOST': REDIS_HOST,
'CACHE_REDIS_PORT': REDIS_PORT,
'CACHE_REDIS_DB': REDIS_CELERY_DB,
'CACHE_REDIS_PASSWORD': REDIS_PASSWORD,
}
```
And my secret
```yaml
apiVersion: v1
kind: Secret
metadata:
name: superset-config-secret
namespace: superset
type: Opaque
stringData:
REDIS_HOST: your-redis-host
REDIS_PORT: "25061"
REDIS_DB: "2"
REDIS_PASSWORD: yourpasswod
```
And I get
```
File "/usr/local/lib/python3.10/site-packages/redis/connection.py", line 349,
in read_response
result = self._read_response(disable_decoding=disable_decoding)
File "/usr/local/lib/python3.10/site-packages/redis/connection.py", line 372,
in _read_response
raise error
redis.exceptions.AuthenticationError: Authentication required.
```
GitHub link:
https://github.com/apache/superset/discussions/35496#discussioncomment-14587927
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]