File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
helm/oauth2-proxy/templates Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,21 @@ Create the name of the service account to use
7878{ {- end -} }
7979{ {- end -} }
8080
81-
81+ { {/*
82+ Compute the redis url if not set explicitly.
83+ */} }
8284{ {- define " oauth2-proxy.redisStandaloneUrl" -} }
85+ { {- $masterPort := .Values.redis.master.service.ports.redis -} }
8386{ {- if .Values.sessionStorage.redis.standalone.connectionUrl -} }
8487{ { .Values.sessionStorage.redis.standalone.connectionUrl } }
88+ { {- else if .Values.redis.fullnameOverride -} }
89+ { {- printf " redis://%s-master:%.0f" (.Values.redis.fullnameOverride | trunc 63 | trimSuffix " -" ) $masterPort -} }
8590{ {- else -} }
86- { {- printf " redis://%s-redis-master:6379" (include " oauth2-proxy.fullname" .) -} }
91+ { {- $name := default " redis" .Values.redis.nameOverride -} }
92+ { {- if contains $name .Release.Name -} }
93+ { {- printf " redis://%s-master:%.0f" (.Release.Name | trunc 63 | trimSuffix " -" ) $masterPort -} }
94+ { {- else -} }
95+ { {- printf " redis://%s-master:%.0f" (printf " %s-%s" .Release.Name $name | trunc 63 | trimSuffix " -" ) $masterPort -} }
96+ { {- end -} }
97+ { {- end -} }
8798{ {- end -} }
88- { {- end -} }
You can’t perform that action at this time.
0 commit comments