aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/platform/components/oauth2-proxy/components/oauth2-proxy/templates/redis-secret.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/platform/components/oauth2-proxy/components/oauth2-proxy/templates/redis-secret.yaml')
-rw-r--r--kubernetes/platform/components/oauth2-proxy/components/oauth2-proxy/templates/redis-secret.yaml22
1 files changed, 22 insertions, 0 deletions
diff --git a/kubernetes/platform/components/oauth2-proxy/components/oauth2-proxy/templates/redis-secret.yaml b/kubernetes/platform/components/oauth2-proxy/components/oauth2-proxy/templates/redis-secret.yaml
new file mode 100644
index 0000000000..7a1555d8b3
--- /dev/null
+++ b/kubernetes/platform/components/oauth2-proxy/components/oauth2-proxy/templates/redis-secret.yaml
@@ -0,0 +1,22 @@
+{{- $name := include "oauth2-proxy.name" . -}}
+{{- $fullName := include "oauth2-proxy.fullname" . -}}
+{{- $labels := include "oauth2-proxy.labels" . -}}
+{{- with .Values.sessionStorage }}
+{{- if and (eq .type "redis") (not .redis.existingSecret) (or .redis.password .redis.sentinel.password) }}
+apiVersion: v1
+kind: Secret
+metadata:
+ labels:
+ app: {{ $name }}
+ {{- $labels | indent 4 }}
+ name: {{ $fullName }}-redis-access
+type: Opaque
+data:
+ {{- if and .redis.password (not .redis.existingSecret) }}
+ {{ .redis.passwordKey }}: {{ .redis.password | b64enc | quote }}
+ {{- end }}
+ {{- if and .redis.sentinel.password (not .redis.sentinel.existingSecret) (ne .redis.sentinel.passwordKey .redis.passwordKey) }}
+ {{ .redis.sentinel.passwordKey }}: {{ .redis.sentinel.password | b64enc | quote }}
+ {{- end }}
+{{- end }}
+{{- end }}