Skip to content

Commit

Permalink
rename proxyVarsFromSecret to envFromExistingSecret
Browse files Browse the repository at this point in the history
  • Loading branch information
tuunit committed Feb 10, 2025
1 parent 2cd07c9 commit b7bab50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions helm/oauth2-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ spec:
lifecycle:
{{ toYaml .Values.lifecycle | indent 10 }}
{{- end }}
{{- with .Values.proxyVarsFromSecret }}
{{- with .Values.envFromExistingSecret }}
envFrom:
- secretRef:
name: {{ . }}
name: {{ . }}
{{- end }}
env:
{{- if .Values.proxyVarsAsSecrets }}
{{- if and (not .Values.envFromExistingSecret) .Values.proxyVarsAsSecrets }}
- name: OAUTH2_PROXY_CLIENT_ID
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -242,7 +242,7 @@ spec:
{{- if .Values.extraEnv }}
{{ tpl (toYaml .Values.extraEnv) . | indent 8 }}
{{- end }}
{{- if .Values.envFrom }}
{{- if and (not .Values.envFromExistingSecret) .Values.envFrom }}
envFrom:
{{ tpl (toYaml .Values.envFrom) . | indent 8 }}
{{- end }}
Expand Down
13 changes: 7 additions & 6 deletions helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ envFrom: []
# - secretRef:
# name: special-config-secret

# Import all environment variables from an existing secret. Will overwrite 'proxyVarsAsSecrets' and 'envFrom'.
envFromExistingSecret: ""

# Whether to create a secret instead of plain environment values for configuring
# the client_id, client_secret and cookie_secret
proxyVarsAsSecrets: true

# -- Custom labels to add into metadata
customLabels: {}

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

# Whether to use secrets instead of environment values for setting up OAUTH2_PROXY variables
proxyVarsAsSecrets: true

# Import all environment variables from an existing secret. Not compatible with 'proxyVarsAsSecrets'.
# proxyVarsFromSecret: my-secret-name

# Configure Kubernetes liveness and readiness probes.
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
# Disable both when deploying with Istio 1.0 mTLS. https://istio.io/help/faq/security/#k8s-health-checks
Expand Down

0 comments on commit b7bab50

Please sign in to comment.