From cc9be4fba3e50c5b53ca7e56fea4db69c12f09e9 Mon Sep 17 00:00:00 2001 From: Hang Xie Date: Sat, 24 Aug 2019 15:08:23 -0700 Subject: [PATCH] add extraEnv to set extra environment variables in container, useful for outbound proxy (#16343) Signed-off-by: Hang Xie <7977860+hangxie@users.noreply.github.com> --- stable/oauth2-proxy/Chart.yaml | 2 +- stable/oauth2-proxy/README.md | 1 + stable/oauth2-proxy/templates/deployment.yaml | 3 +++ stable/oauth2-proxy/values.yaml | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stable/oauth2-proxy/Chart.yaml b/stable/oauth2-proxy/Chart.yaml index 22e9c3b58c..18d9270551 100644 --- a/stable/oauth2-proxy/Chart.yaml +++ b/stable/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 0.14.0 +version: 0.14.1 apiVersion: v1 appVersion: 3.2.0 home: http://www.videntity.com/ diff --git a/stable/oauth2-proxy/README.md b/stable/oauth2-proxy/README.md index 9692500593..7ed69b21d2 100644 --- a/stable/oauth2-proxy/README.md +++ b/stable/oauth2-proxy/README.md @@ -52,6 +52,7 @@ Parameter | Description | Default `config.google.serviceAccountJson` | google service account json contents | `""` `config.google.existingConfig` | existing Kubernetes configmap to use for the service account file. See [google secret template](https://github.com/helm/charts/blob/master/stable/oauth2-proxy/templates/google-secret.yaml) for the required values | `nil` `extraArgs` | key:value list of extra arguments to give the binary | `{}` +`extraEnv` | key:value list of extra environment variables to give the binary | `[]` `htpasswdFile.enabled` | enable htpasswd-file option | `false` `htpasswdFile.entries` | list of [SHA encrypted user:passwords](https://pusher.github.io/oauth2_proxy/configuration#command-line-options) | `{}` `htpasswdFile.existingSecret` | existing Kubernetes secret to use for OAuth2 htpasswd file` | `""` diff --git a/stable/oauth2-proxy/templates/deployment.yaml b/stable/oauth2-proxy/templates/deployment.yaml index 7df09a5b80..abc87ba0df 100644 --- a/stable/oauth2-proxy/templates/deployment.yaml +++ b/stable/oauth2-proxy/templates/deployment.yaml @@ -81,6 +81,9 @@ spec: secretKeyRef: name: {{ template "oauth2-proxy.secretName" . }} key: cookie-secret + {{- if .Values.extraEnv }} +{{ toYaml .Values.extraEnv | indent 8 }} + {{- end }} ports: - containerPort: 4180 name: http diff --git a/stable/oauth2-proxy/values.yaml b/stable/oauth2-proxy/values.yaml index 9515627f3b..2fc58461d6 100644 --- a/stable/oauth2-proxy/values.yaml +++ b/stable/oauth2-proxy/values.yaml @@ -40,6 +40,7 @@ image: # - name: myRegistryKeySecretName extraArgs: {} +extraEnv: [] # To authorize individual email addresses # That is part of extraArgs but since this needs special treatment we need to do a separate section