Skip to content

Commit b7bab50

Browse files
committed
rename proxyVarsFromSecret to envFromExistingSecret
1 parent 2cd07c9 commit b7bab50

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ spec:
172172
lifecycle:
173173
{{ toYaml .Values.lifecycle | indent 10 }}
174174
{{- end }}
175-
{{- with .Values.proxyVarsFromSecret }}
175+
{{- with .Values.envFromExistingSecret }}
176176
envFrom:
177177
- secretRef:
178-
name: {{ . }}
178+
name: {{ . }}
179179
{{- end }}
180180
env:
181-
{{- if .Values.proxyVarsAsSecrets }}
181+
{{- if and (not .Values.envFromExistingSecret) .Values.proxyVarsAsSecrets }}
182182
- name: OAUTH2_PROXY_CLIENT_ID
183183
valueFrom:
184184
secretKeyRef:
@@ -242,7 +242,7 @@ spec:
242242
{{- if .Values.extraEnv }}
243243
{{ tpl (toYaml .Values.extraEnv) . | indent 8 }}
244244
{{- end }}
245-
{{- if .Values.envFrom }}
245+
{{- if and (not .Values.envFromExistingSecret) .Values.envFrom }}
246246
envFrom:
247247
{{ tpl (toYaml .Values.envFrom) . | indent 8 }}
248248
{{- end }}

helm/oauth2-proxy/values.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ envFrom: []
107107
# - secretRef:
108108
# name: special-config-secret
109109

110+
# Import all environment variables from an existing secret. Will overwrite 'proxyVarsAsSecrets' and 'envFrom'.
111+
envFromExistingSecret: ""
112+
113+
# Whether to create a secret instead of plain environment values for configuring
114+
# the client_id, client_secret and cookie_secret
115+
proxyVarsAsSecrets: true
116+
110117
# -- Custom labels to add into metadata
111118
customLabels: {}
112119

@@ -245,12 +252,6 @@ tolerations: []
245252
# Ref: https://kubernetes.io/docs/user-guide/node-selection/
246253
nodeSelector: {}
247254

248-
# Whether to use secrets instead of environment values for setting up OAUTH2_PROXY variables
249-
proxyVarsAsSecrets: true
250-
251-
# Import all environment variables from an existing secret. Not compatible with 'proxyVarsAsSecrets'.
252-
# proxyVarsFromSecret: my-secret-name
253-
254255
# Configure Kubernetes liveness and readiness probes.
255256
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
256257
# Disable both when deploying with Istio 1.0 mTLS. https://istio.io/help/faq/security/#k8s-health-checks

0 commit comments

Comments
 (0)