shakeelansari63 commented on code in PR #26663:
URL: https://github.com/apache/superset/pull/26663#discussion_r1462193998
##########
helm/superset/templates/_helpers.tpl:
##########
@@ -61,6 +61,25 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 |
trimSuffix "-" -}}
{{- end -}}
+{{/*
+Generate Redis URL for SSL and non-SSL protocols
+*/}}
+{{- define "superset-redis-url" -}}
+ {{- if .Values.supersetNode.connections.use_redis_ssl -}}
+ {{- if .Values.supersetNode.connections.redis_password -}}
+
rediss://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/##DBNAME##?ssl_cert_reqs={{-
.Values.supersetNode.connections.use_redis_ssl.ssl_cert_reqs | default
"CERT_NONE" -}}
+ {{- else -}}
+
rediss://{env('REDIS_HOST')}:{env('REDIS_PORT')}/##DBNAME##?ssl_cert_reqs={{-
.Values.supersetNode.connections.use_redis_ssl.ssl_cert_reqs | default
"CERT_NONE" -}}
Review Comment:
- `REDIS_DB` is already in use for Flask Caching. And it defaults to `1` if
this envvar does not exist.
```yaml
'CACHE_REDIS_URL': f"{{- include "superset-redis-url" . | replace
"##DBNAME##" "{env('REDIS_DB', 1)}" -}}",
```
But yes, the database name is hardcoded to `0` for CeleryConfig Object. We
can have and envvar for that and default it to `0` if not set.
```python
class CeleryConfig:
imports = ("superset.sql_lab", )
broker_url = f"{{- include "superset-redis-url" . | replace "##DBNAME##"
"0" -}}"
result_backend = f"{{- include "superset-redis-url" . | replace
"##DBNAME##" "0" -}}"
```
- I don't think having envvar for Redis Protocol would make any difference.
There can be only 2 values for `REDIS_PROTO` viz. `redis` and `rediss` and
they will be selected based on ssl config setting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]