diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index ea2286b5..66f20d1a 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 10.7.0 +version: 10.8.0 apiVersion: v2 appVersion: 7.15.3 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -31,12 +31,7 @@ kubeVersion: ">=1.16.0-0" annotations: artifacthub.io/changes: | - kind: added - description: Add alpha-config.source and alpha-config.name helpers for centralized alpha config resolution + description: Add tpl support for sessionStorage.redis.existingSecret to allow dynamic secret names when used as subchart links: - - name: GitHub PR - url: https://github.com/oauth2-proxy/manifests/pull/405 - - kind: added - description: Add deprecation guards for invalid alphaConfig combinations - links: - - name: GitHub PR - url: https://github.com/oauth2-proxy/manifests/pull/405 + - name: GitHub Issue + url: https://github.com/oauth2-proxy/manifests/issues/409 diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index 96366a56..95e8ca46 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -217,7 +217,7 @@ spec: valueFrom: secretKeyRef: {{- if .Values.sessionStorage.redis.existingSecret }} - name: {{ .Values.sessionStorage.redis.existingSecret }} + name: {{ tpl .Values.sessionStorage.redis.existingSecret $ }} {{- else if .Values.sessionStorage.redis.password }} name: {{ template "oauth2-proxy.fullname" . }}-redis-access {{- else }} @@ -245,7 +245,7 @@ spec: valueFrom: secretKeyRef: {{- if or .Values.sessionStorage.redis.sentinel.existingSecret .Values.sessionStorage.redis.existingSecret }} - name: {{ .Values.sessionStorage.redis.sentinel.existingSecret | default .Values.sessionStorage.redis.existingSecret }} + name: {{ tpl (.Values.sessionStorage.redis.sentinel.existingSecret | default .Values.sessionStorage.redis.existingSecret) $ }} {{- else }} name: {{ template "oauth2-proxy.fullname" . }}-redis-access {{- end }} diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 5521eb02..5e282a97 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -604,6 +604,7 @@ sessionStorage: type: cookie redis: # Name of the Kubernetes secret containing the redis & redis sentinel password values (see also `sessionStorage.redis.passwordKey`) + # Supports Helm templating, e.g. '{{ .Release.Name }}-redis' or '{{ include "myapp.redis.secretName" . }}' existingSecret: "" # Redis password value. Applicable for all Redis configurations. Taken from redis subchart secret if not set. `sessionStorage.redis.existingSecret` takes precedence password: ""