From 5ee028cafbb36131a4e4d3ee61a33f420240762d Mon Sep 17 00:00:00 2001 From: Moraru Costel Date: Fri, 26 Mar 2021 10:27:49 +0100 Subject: [PATCH] Configurable cookie name (#10) * Exported the cookie-name in the values * Add the new field cookieName in the values file * Removed the default value linked to helm release * Update values.yaml Fixing lint error. --- helm/oauth2-proxy/Chart.yaml | 2 +- helm/oauth2-proxy/README.md | 1 + helm/oauth2-proxy/templates/deployment.yaml | 3 +++ helm/oauth2-proxy/values.yaml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 8436cd12..e16ba3f5 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 3.2.8 +version: 3.2.9 apiVersion: v2 appVersion: 5.1.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index d932b76d..923b3bd1 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -70,6 +70,7 @@ Parameter | Description | Default `config.existingSecret` | existing Kubernetes secret to use for OAuth2 credentials. See [secret template](https://github.com/helm/charts/blob/master/stable/oauth2-proxy/templates/secret.yaml) for the required values | `nil` `config.configFile` | custom [oauth2_proxy.cfg](https://github.com/pusher/oauth2_proxy/blob/master/contrib/oauth2_proxy.cfg.example) contents for settings not overridable via environment nor command line | `""` `config.existingConfig` | existing Kubernetes configmap to use for the configuration file. See [config template](https://github.com/helm/charts/blob/master/stable/oauth2-proxy/templates/configmap.yaml) for the required values | `nil` +`config.cookieName` | The name of the cookie that oauth2-proxy will create. | `""` `config.google.adminEmail` | user impersonated by the google service account | `""` `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` diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index deb6bf4a..0524aff3 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -48,6 +48,9 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} args: - --http-address=0.0.0.0:4180 + {{- if .Values.config.cookieName }} + - --cookie-name={{ .Values.config.cookieName }} + {{- end }} {{- range $key, $value := .Values.extraArgs }} {{- if $value }} - --{{ $key }}={{ $value }} diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 48b09a8e..dd6adc13 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -10,6 +10,9 @@ config: # Example: # existingSecret: secret cookieSecret: "XXXXXXXXXX" + # The name of the cookie that oauth2-proxy will create + # If left empty, it will default to the release name + cookieName: "" google: {} # adminEmail: xxxx # serviceAccountJson: xxxx