File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 11name : oauth2-proxy
2- version : 6.1.0
2+ version : 6.1.1
33apiVersion : v2
44appVersion : 7.2.0
55home : https://oauth2-proxy.github.io/oauth2-proxy/
Original file line number Diff line number Diff line change @@ -78,11 +78,26 @@ Create the name of the service account to use
7878{ {- end -} }
7979{ {- end -} }
8080
81+ { {/*
82+ Redis subcharts fullname
83+ */} }
84+ { {- define " oauth2-proxy.redis.fullname" -} }
85+ { {- if .Values.redis.enabled -} }
86+ { {- include " common.names.fullname" (dict " Chart" (dict " Name" " redis" ) " Release" .Release " Values" .Values.redis) -} }
87+ { {- else -} }
88+ { { fail " attempting to use redis subcharts fullname, even though the subchart is not enabled. This will lead to misconfiguration" } }
89+ { {- end -} }
90+ { {- end -} }
8191
82- { {- define " oauth2-proxy.redisStandaloneUrl" -} }
92+ { {/*
93+ Compute the redis url if not set explicitly.
94+ */} }
95+ { {- define " oauth2-proxy.redis.StandaloneUrl" -} }
8396{ {- if .Values.sessionStorage.redis.standalone.connectionUrl -} }
8497{ { .Values.sessionStorage.redis.standalone.connectionUrl } }
98+ { {- else if .Values.redis.enabled -} }
99+ { {- printf " redis://%s-master:%.0f" (include " oauth2-proxy.redis.fullname" .) .Values.redis.master.service.ports.redis -} }
85100{ {- else -} }
86- { {- printf " redis://%s-redis-master:6379" (include " oauth2-proxy.fullname" .) -} }
101+ { { fail " please set sessionStorage.redis.standalone.connectionUrl or enable the redis subchart via redis.enabled" } }
102+ { {- end -} }
87103{ {- end -} }
88- { {- end -} }
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ spec:
121121 {{- end }}
122122 {{- if eq (default "" .Values.sessionStorage.redis.clientType) "standalone" }}
123123 - name : OAUTH2_PROXY_REDIS_CONNECTION_URL
124- value : {{ include "oauth2-proxy.redisStandaloneUrl " . }}
124+ value : {{ include "oauth2-proxy.redis.StandaloneUrl " . }}
125125 {{- else if eq (default "" .Values.sessionStorage.redis.clientType) "cluster" }}
126126 - name : OAUTH2_PROXY_REDIS_USE_CLUSTER
127127 value : " true"
You can’t perform that action at this time.
0 commit comments