1 {{- $name := include "oauth2-proxy.name" . -}}
2 {{- $fullName := include "oauth2-proxy.fullname" . -}}
3 {{- $labels := include "oauth2-proxy.labels" . -}}
4 {{- with .Values.sessionStorage }}
5 {{- if and (eq .type "redis") (not .redis.existingSecret) (or .redis.password .redis.sentinel.password) }}
11 {{- $labels | indent 4 }}
12 name: {{ $fullName }}-redis-access
15 {{- if and .redis.password (not .redis.existingSecret) }}
16 {{ .redis.passwordKey }}: {{ .redis.password | b64enc | quote }}
18 {{- if and .redis.sentinel.password (not .redis.sentinel.existingSecret) (ne .redis.sentinel.passwordKey .redis.passwordKey) }}
19 {{ .redis.sentinel.passwordKey }}: {{ .redis.sentinel.password | b64enc | quote }}