From 75a4da9d752c01cefc71ef9803a4e8da631bf79c Mon Sep 17 00:00:00 2001 From: Matt Pryor Date: Wed, 7 Jun 2023 08:43:24 +0100 Subject: [PATCH 1/2] Allow alpha config to come from a template --- helm/oauth2-proxy/templates/configmap-alpha.yaml | 3 +++ helm/oauth2-proxy/values.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/helm/oauth2-proxy/templates/configmap-alpha.yaml b/helm/oauth2-proxy/templates/configmap-alpha.yaml index 304683c1..6a2cec26 100644 --- a/helm/oauth2-proxy/templates/configmap-alpha.yaml +++ b/helm/oauth2-proxy/templates/configmap-alpha.yaml @@ -29,5 +29,8 @@ data: {{- if .Values.alphaConfig.configData }} {{- toYaml .Values.alphaConfig.configData | nindent 4 }} {{- end }} + {{- if .Values.alphaConfig.configFile }} + {{- tpl .Values.alphaConfig.configFile $ | nindent 4 }} + {{- end }} {{- end }} {{- end }} diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 5fda87e6..2c9049a7 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -58,6 +58,9 @@ alphaConfig: metricsConfigData: {} # Arbitrary configuration data to append configData: {} + # Arbitrary configuration to append + # This is treated as a Go template and rendered with the root context + configFile: "" # Use an existing config map (see configmap-alpha.yaml for required fields) existingConfig: ~ From 9ab7aa5271724960ce880b089f64b9f27cb2c6a3 Mon Sep 17 00:00:00 2001 From: Matt Pryor Date: Wed, 7 Jun 2023 09:11:46 +0100 Subject: [PATCH 2/2] Bump chart version + add docs for new option --- helm/oauth2-proxy/Chart.yaml | 2 +- helm/oauth2-proxy/README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index d862449f..343313c3 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 6.12.1 +version: 6.13.0 apiVersion: v2 appVersion: 7.4.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 3f2f214c..ce07e0ec 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -107,6 +107,7 @@ Parameter | Description | Default `alphaConfig.serverConfigData` | Arbitrary configuration data to append to the server section | `{}` `alphaConfig.metricsConfigData` | Arbitrary configuration data to append to the metrics section | `{}` `alphaConfig.configData` | Arbitrary configuration data to append | `{}` +`alphaConfig.configFile` | Arbitrary configuration to append, treated as a Go template and rendered with the root context | `""` `alphaConfig.existingConfig` | existing Kubernetes configmap to use for the alpha configuration file. See [config template](https://github.com/oauth2-proxy/manifests/blob/master/helm/oauth2-proxy/templates/configmap-alpha.yaml) for the required values | `nil` `customLabels` | Custom labels to add into metadata | `{}` | `config.google.adminEmail` | user impersonated by the google service account | `""`