diff --git a/oauth2-proxy/templates/deployment.yaml b/oauth2-proxy/templates/deployment.yaml index 13d67cbd78567c4d56d7ab80a1f4fbc86eb27b1e..590c3b4200daf27f5c686a4743da0b5e2c57e9c0 100644 --- a/oauth2-proxy/templates/deployment.yaml +++ b/oauth2-proxy/templates/deployment.yaml @@ -34,18 +34,27 @@ spec: - name: OAUTH2_PROXY_CLIENT_ID valueFrom: secretKeyRef: - key: client-id name: {{ include "oauth2-proxy-helm.fullname" . }} + key: client-id - name: OAUTH2_PROXY_CLIENT_SECRET valueFrom: secretKeyRef: - key: client-secret name: {{ include "oauth2-proxy-helm.fullname" . }} + key: client-secret - name: OAUTH2_PROXY_COOKIE_SECRET valueFrom: secretKeyRef: + name: {{ include "oauth2-proxy-helm.fullname" . }} key: cookie-secret + {{ if .Values.redis.enabled }} + {{ if ne .Values.redis.password "" }} + - name: OAUTH2_PROXY_REDIS_PASSWORD + valueFrom: + secretKeyRef: name: {{ include "oauth2-proxy-helm.fullname" . }} + key: redis-password + {{ end }} + {{ end }} args: {{ range .Values.auth.roles }} - "--allowed-role={{ . }}" @@ -58,9 +67,6 @@ spec: - "--provider=oidc" {{ if .Values.redis.enabled }} - "--redis-connection-url=redis://{{ .Values.redis.host }}/{{ .Values.redis.database }}" - {{ if .Values.redis.password ne "" }} - - "--redis-password={{ .Values.redis.password }}" - {{ end }} {{ end }} ports: - name: http diff --git a/oauth2-proxy/templates/secret.yaml b/oauth2-proxy/templates/secret.yaml index 33983b2e16955e732784660605cafbdacfc77856..cb69f7ca8fb60a4099c4a1b0b50971217e15493b 100644 --- a/oauth2-proxy/templates/secret.yaml +++ b/oauth2-proxy/templates/secret.yaml @@ -8,3 +8,6 @@ stringData: client-id: "{{ .Values.oidc.clientId }}" client-secret: "{{ .Values.oidc.clientSecret }}" cookie-secret: "{{ .Values.cookieSecret }}" + {{ if .Values.redis.enabled }} + redis-password: "{{ .Values.redis.password }}" + {{ end }}