From a78c17722742aa4511a51588a45267512a6e3b6a Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Tue, 9 Apr 2024 12:20:50 +0200 Subject: [PATCH] feat: add proxyVarsFromSecret value Signed-off-by: Zadkiel AHARONIAN --- helm/oauth2-proxy/Chart.yaml | 8 ++++---- helm/oauth2-proxy/templates/deployment.yaml | 5 +++++ helm/oauth2-proxy/values.yaml | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 7d1108f..89c1b5d 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 7.4.1 +version: 7.5.0 apiVersion: v2 appVersion: 7.6.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -34,8 +34,8 @@ maintainers: kubeVersion: ">=1.9.0-0" annotations: artifacthub.io/changes: | - - kind: changed - description: Fix link in readme to existingSecret needed fields + - kind: added + description: Add proxyVarsFromSecret value links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/193 + url: https://github.com/oauth2-proxy/manifests/pull/196 diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index 218bef4..9cada2f 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -146,6 +146,11 @@ spec: lifecycle: {{ toYaml .Values.lifecycle | indent 10 }} {{- end }} + {{- with .Values.proxyVarsFromSecret }} + envFrom: + - secretRef: + name: {{ . }} + {{- end }} env: {{- if .Values.proxyVarsAsSecrets }} - name: OAUTH2_PROXY_CLIENT_ID diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 219f45a..fbd262e 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -221,6 +221,9 @@ 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