|
@@ -62,7 +62,7 @@ Create a default fully qualified redis name.
|
|
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
|
*/}}
|
|
|
{{- define "superset.redis.fullname" -}}
|
|
|
-{{- include "common.names.dependency.fullname" (dict "chartName" "redis-master" "chartValues" .Values.redis "context" $) -}}
|
|
|
+{{- include "common.names.dependency.fullname" (dict "chartName" "redis" "chartValues" .Values.redis "context" $) -}}
|
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|
|
@@ -124,7 +124,11 @@ Get the configmap name
|
|
|
Add environment variables to configure database values
|
|
|
*/}}
|
|
|
{{- define "superset.database.host" -}}
|
|
|
-{{- ternary (include "superset.postgresql.fullname" .) .Values.externalDatabase.host .Values.postgresql.enabled -}}
|
|
|
+{{- if eq .Values.postgresql.architecture "replication" }}
|
|
|
+ {{- printf "%s-primary" (ternary (include "superset.postgresql.fullname" .) (tpl .Values.externalDatabase.host $) .Values.postgresql.enabled) -}}
|
|
|
+{{- else -}}
|
|
|
+ {{- ternary (include "superset.postgresql.fullname" .) (tpl .Values.externalDatabase.host $) .Values.postgresql.enabled -}}
|
|
|
+{{- end -}}
|
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|
|
@@ -171,7 +175,11 @@ Add environment variables to configure database values
|
|
|
Add environment variables to configure redis values
|
|
|
*/}}
|
|
|
{{- define "superset.redis.host" -}}
|
|
|
-{{- ternary (include "superset.redis.fullname" .) .Values.externalRedis.host .Values.redis.enabled -}}
|
|
|
+{{- if .Values.redis.enabled -}}
|
|
|
+ {{- printf "%s-master" (include "superset.redis.fullname" .) -}}
|
|
|
+{{- else -}}
|
|
|
+ {{- printf "%s" (tpl .Values.externalRedis.host $) -}}
|
|
|
+{{- end -}}
|
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|