From cbd5275649b7aab0a1c01f71895e707460e5c607 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Wed, 21 Apr 2021 08:49:14 +0200 Subject: [PATCH 01/10] Add: Kubernetes recommanded labels Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/Chart.yaml | 2 +- helm/oauth2-proxy/templates/_helpers.tpl | 13 +++++++++++++ .../configmap-authenticated-emails-file.yaml | 4 +--- .../templates/configmap-htpasswd-file.yaml | 4 +--- helm/oauth2-proxy/templates/configmap.yaml | 4 +--- helm/oauth2-proxy/templates/deployment.yaml | 8 +++----- helm/oauth2-proxy/templates/google-secret.yaml | 4 +--- helm/oauth2-proxy/templates/ingress.yaml | 4 +--- .../oauth2-proxy/templates/poddisruptionbudget.yaml | 4 +--- helm/oauth2-proxy/templates/redis-secret.yaml | 4 +--- .../templates/secret-authenticated-emails-file.yaml | 4 +--- helm/oauth2-proxy/templates/secret.yaml | 4 +--- helm/oauth2-proxy/templates/service.yaml | 6 ++---- helm/oauth2-proxy/templates/serviceaccount.yaml | 4 +--- helm/oauth2-proxy/values.yaml | 3 +++ 15 files changed, 32 insertions(+), 40 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 867c2741..69208ec5 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 3.2.10 +version: 3.2.11 apiVersion: v2 appVersion: 5.1.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ diff --git a/helm/oauth2-proxy/templates/_helpers.tpl b/helm/oauth2-proxy/templates/_helpers.tpl index e17bd44c..84d84b63 100644 --- a/helm/oauth2-proxy/templates/_helpers.tpl +++ b/helm/oauth2-proxy/templates/_helpers.tpl @@ -31,6 +31,19 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{/* Generate basic labels */}} +{{- define "oauth2-proxy.labels" }} +app.kubernetes.io/name: {{ template "oauth2-proxy.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +app.kubernetes.io/version: {{ template "oauth2-proxy.chart" . }} +app.kubernetes.io/part-of: {{ template "oauth2-proxy.name" . }} +helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} +{{- if .Values.customLabels }} +{{ toYaml .Values.customLabels | indent 4 }} +{{- end }} +{{- end }} + {{/* Get the secret name. */}} diff --git a/helm/oauth2-proxy/templates/configmap-authenticated-emails-file.yaml b/helm/oauth2-proxy/templates/configmap-authenticated-emails-file.yaml index bf820df0..3bc8624e 100644 --- a/helm/oauth2-proxy/templates/configmap-authenticated-emails-file.yaml +++ b/helm/oauth2-proxy/templates/configmap-authenticated-emails-file.yaml @@ -5,9 +5,7 @@ kind: ConfigMap metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} {{- if .Values.authenticatedEmailsFile.annotations }} annotations: {{ toYaml .Values.authenticatedEmailsFile.annotations | indent 4 }} diff --git a/helm/oauth2-proxy/templates/configmap-htpasswd-file.yaml b/helm/oauth2-proxy/templates/configmap-htpasswd-file.yaml index c40b6371..44fe67e9 100644 --- a/helm/oauth2-proxy/templates/configmap-htpasswd-file.yaml +++ b/helm/oauth2-proxy/templates/configmap-htpasswd-file.yaml @@ -4,9 +4,7 @@ kind: Secret metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }}-htpasswd-file type: Opaque stringData: diff --git a/helm/oauth2-proxy/templates/configmap.yaml b/helm/oauth2-proxy/templates/configmap.yaml index bf5f517c..19dd86b6 100644 --- a/helm/oauth2-proxy/templates/configmap.yaml +++ b/helm/oauth2-proxy/templates/configmap.yaml @@ -5,9 +5,7 @@ kind: ConfigMap metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }} data: oauth2_proxy.cfg: {{ .Values.config.configFile | quote }} diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index 0524aff3..78d431bf 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -3,16 +3,14 @@ kind: Deployment metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app: {{ template "oauth2-proxy.name" . }} - release: {{ .Release.Name }} + app.kubernetes.io/version: {{ template "oauth2-proxy.chart" . }} template: metadata: annotations: @@ -29,7 +27,7 @@ spec: {{- end }} labels: app: {{ template "oauth2-proxy.name" . }} - release: "{{ .Release.Name }}" + {{- include "oauth2-proxy.labels" . | indent 8 }} {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | indent 8 }} {{- end }} diff --git a/helm/oauth2-proxy/templates/google-secret.yaml b/helm/oauth2-proxy/templates/google-secret.yaml index 0e785b18..73238e0b 100644 --- a/helm/oauth2-proxy/templates/google-secret.yaml +++ b/helm/oauth2-proxy/templates/google-secret.yaml @@ -4,9 +4,7 @@ kind: Secret metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }}-google type: Opaque data: diff --git a/helm/oauth2-proxy/templates/ingress.yaml b/helm/oauth2-proxy/templates/ingress.yaml index 31628d03..613402cf 100644 --- a/helm/oauth2-proxy/templates/ingress.yaml +++ b/helm/oauth2-proxy/templates/ingress.yaml @@ -12,9 +12,7 @@ kind: Ingress metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }} {{- with .Values.ingress.annotations }} annotations: diff --git a/helm/oauth2-proxy/templates/poddisruptionbudget.yaml b/helm/oauth2-proxy/templates/poddisruptionbudget.yaml index a837fb31..f30bc5db 100644 --- a/helm/oauth2-proxy/templates/poddisruptionbudget.yaml +++ b/helm/oauth2-proxy/templates/poddisruptionbudget.yaml @@ -4,9 +4,7 @@ kind: PodDisruptionBudget metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }} spec: selector: diff --git a/helm/oauth2-proxy/templates/redis-secret.yaml b/helm/oauth2-proxy/templates/redis-secret.yaml index 9ac3431e..a9b07ae8 100644 --- a/helm/oauth2-proxy/templates/redis-secret.yaml +++ b/helm/oauth2-proxy/templates/redis-secret.yaml @@ -4,9 +4,7 @@ kind: Secret metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }}-redis-access type: Opaque data: diff --git a/helm/oauth2-proxy/templates/secret-authenticated-emails-file.yaml b/helm/oauth2-proxy/templates/secret-authenticated-emails-file.yaml index f997c1d7..5cce7a74 100644 --- a/helm/oauth2-proxy/templates/secret-authenticated-emails-file.yaml +++ b/helm/oauth2-proxy/templates/secret-authenticated-emails-file.yaml @@ -6,9 +6,7 @@ type: Opaque metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} {{- if .Values.authenticatedEmailsFile.annotations }} annotations: {{ toYaml .Values.authenticatedEmailsFile.annotations | indent 4 }} diff --git a/helm/oauth2-proxy/templates/secret.yaml b/helm/oauth2-proxy/templates/secret.yaml index 89134fa0..471b34c1 100644 --- a/helm/oauth2-proxy/templates/secret.yaml +++ b/helm/oauth2-proxy/templates/secret.yaml @@ -4,9 +4,7 @@ kind: Secret metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }} type: Opaque data: diff --git a/helm/oauth2-proxy/templates/service.yaml b/helm/oauth2-proxy/templates/service.yaml index 1f9a5bce..f58d7b4b 100644 --- a/helm/oauth2-proxy/templates/service.yaml +++ b/helm/oauth2-proxy/templates/service.yaml @@ -3,9 +3,7 @@ kind: Service metadata: labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }} {{- if .Values.service.annotations }} annotations: @@ -36,4 +34,4 @@ spec: name: {{ .Values.httpScheme }} selector: app: {{ template "oauth2-proxy.name" . }} - release: {{ .Release.Name }} + app.kubernetes.io/version: {{ template "oauth2-proxy.chart" . }} diff --git a/helm/oauth2-proxy/templates/serviceaccount.yaml b/helm/oauth2-proxy/templates/serviceaccount.yaml index d3afa68b..8d41e1d9 100644 --- a/helm/oauth2-proxy/templates/serviceaccount.yaml +++ b/helm/oauth2-proxy/templates/serviceaccount.yaml @@ -8,8 +8,6 @@ metadata: {{- end }} labels: app: {{ template "oauth2-proxy.name" . }} - chart: {{ template "oauth2-proxy.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} +{{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.fullname" . }} {{- end -}} diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index dd6adc13..5e04da42 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -45,6 +45,9 @@ image: extraArgs: {} extraEnv: [] +# Custom labels to add +customLabels: {} + # To authorize individual email addresses # That is part of extraArgs but since this needs special treatment we need to do a separate section authenticatedEmailsFile: From 6ff144f5d9f7fc02c32cef0182b71c3069f11ef0 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Wed, 21 Apr 2021 08:53:39 +0200 Subject: [PATCH 02/10] Add: documentation Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/README.md | 1 + helm/oauth2-proxy/values.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index c6193c3b..f89199b0 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -71,6 +71,7 @@ Parameter | Description | Default `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. | `""` +`customLabels` | object | `{}` | Custom labels to add into metadata | `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/values.yaml b/helm/oauth2-proxy/values.yaml index 5e04da42..41347c95 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -45,7 +45,7 @@ image: extraArgs: {} extraEnv: [] -# Custom labels to add +# -- Custom labels to add into metadata customLabels: {} # To authorize individual email addresses From f0801062c0e58948b110527e7b45782113535510 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Wed, 21 Apr 2021 08:55:03 +0200 Subject: [PATCH 03/10] Fix: documentation Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index f89199b0..622d1fe7 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -71,7 +71,7 @@ Parameter | Description | Default `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. | `""` -`customLabels` | object | `{}` | Custom labels to add into metadata | +`customLabels` | Custom labels to add into metadata | `{}` | `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` From 829492d890cf4729b75298ae27a641a0a459be86 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Thu, 1 Jul 2021 14:04:02 +0200 Subject: [PATCH 04/10] Update: bump major version Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 3f42215b..ca966b25 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 4.0.2 +version: 5.0.0 apiVersion: v2 appVersion: 7.1.3 home: https://oauth2-proxy.github.io/oauth2-proxy/ From 0ea4dc4a037a803191b03709896f08f689be6444 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Thu, 1 Jul 2021 14:16:54 +0200 Subject: [PATCH 05/10] Update: Split selector labels and refactoring indentation Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/templates/_helpers.tpl | 24 +++++++++++++++------ helm/oauth2-proxy/templates/deployment.yaml | 3 +-- helm/oauth2-proxy/templates/service.yaml | 3 +-- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/helm/oauth2-proxy/templates/_helpers.tpl b/helm/oauth2-proxy/templates/_helpers.tpl index 1a4b3378..0e33ee5a 100644 --- a/helm/oauth2-proxy/templates/_helpers.tpl +++ b/helm/oauth2-proxy/templates/_helpers.tpl @@ -31,19 +31,31 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{/* Generate basic labels */}} +{{/* +Generate basic labels +*/}} {{- define "oauth2-proxy.labels" }} -app.kubernetes.io/name: {{ template "oauth2-proxy.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} +helm.sh/chart: {{ include "oauth2-proxy.chart" . }} app.kubernetes.io/managed-by: {{ .Release.Service }} -app.kubernetes.io/version: {{ template "oauth2-proxy.chart" . }} -app.kubernetes.io/part-of: {{ template "oauth2-proxy.name" . }} -helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} +app.kubernetes.io/component: authentication proxy +app.kubernetes.io/part-of: {{ template "oauth2-proxy.name" . }} +{{- include "oauth2-proxy.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} {{- if .Values.customLabels }} {{ toYaml .Values.customLabels | indent 4 }} {{- end }} {{- end }} +{{/* +Selector labels +*/}} +{{- define "oauth2-proxy.selectorLabels" }} +app.kubernetes.io/name: {{ include "oauth2-proxy.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + {{/* Get the secret name. */}} diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index 009f0880..b6893a4d 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -9,8 +9,7 @@ spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - app: {{ template "oauth2-proxy.name" . }} - app.kubernetes.io/version: {{ template "oauth2-proxy.chart" . }} + {{- include "oauth2-proxy.selectorLabels" . | indent 6 }} template: metadata: annotations: diff --git a/helm/oauth2-proxy/templates/service.yaml b/helm/oauth2-proxy/templates/service.yaml index c5feb770..deec396b 100644 --- a/helm/oauth2-proxy/templates/service.yaml +++ b/helm/oauth2-proxy/templates/service.yaml @@ -33,5 +33,4 @@ spec: protocol: TCP name: {{ .Values.httpScheme }} selector: - app: {{ template "oauth2-proxy.name" . }} - app.kubernetes.io/version: {{ template "oauth2-proxy.chart" . }} + {{- include "oauth2-proxy.selectorLabels" . | indent 4 }} From 41faf42481f44608ba338cc69d68ad6d929c2865 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Tue, 6 Jul 2021 23:05:51 +0200 Subject: [PATCH 06/10] Add: documentation for next release Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 1f83febe..017d7d79 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -60,6 +60,10 @@ See the [v1.22 API deprecations guide](https://kubernetes.io/docs/reference/usin For the same reason `service.port` was renamed to `service.portNumber`. +### To 5.0.0 + +Version 5.0.0 introduces support for custom labels and refactor [Kubernetes recommended labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/). This is a breaking change. + ## Configuration The following table lists the configurable parameters of the oauth2-proxy chart and their default values. From d159e638e2919f0f688e430d774a3464a670d891 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Thu, 8 Jul 2021 16:05:53 +0200 Subject: [PATCH 07/10] -sFix: name --- helm/oauth2-proxy/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/templates/_helpers.tpl b/helm/oauth2-proxy/templates/_helpers.tpl index 0e33ee5a..b6a317f9 100644 --- a/helm/oauth2-proxy/templates/_helpers.tpl +++ b/helm/oauth2-proxy/templates/_helpers.tpl @@ -37,7 +37,7 @@ Generate basic labels {{- define "oauth2-proxy.labels" }} helm.sh/chart: {{ include "oauth2-proxy.chart" . }} app.kubernetes.io/managed-by: {{ .Release.Service }} -app.kubernetes.io/component: authentication proxy +app.kubernetes.io/component: authentication-proxy app.kubernetes.io/part-of: {{ template "oauth2-proxy.name" . }} {{- include "oauth2-proxy.selectorLabels" . }} {{- if .Chart.AppVersion }} From 3c164eccf87440107da2ee1e0b2179adb2a5a4d2 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 16 Aug 2021 14:14:51 +0200 Subject: [PATCH 08/10] Fix: remove indentation Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/templates/_helpers.tpl b/helm/oauth2-proxy/templates/_helpers.tpl index b6a317f9..30b982f7 100644 --- a/helm/oauth2-proxy/templates/_helpers.tpl +++ b/helm/oauth2-proxy/templates/_helpers.tpl @@ -44,7 +44,7 @@ app.kubernetes.io/part-of: {{ template "oauth2-proxy.name" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} {{- if .Values.customLabels }} -{{ toYaml .Values.customLabels | indent 4 }} +{{ toYaml .Values.customLabels }} {{- end }} {{- end }} From bd2ee25a6616ae87cb2ff2caabf5a78495ad7c3d Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 16 Aug 2021 14:20:21 +0200 Subject: [PATCH 09/10] Fix: upgrade documentation Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 8b41127c..c977460a 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -62,7 +62,13 @@ For the same reason `service.port` was renamed to `service.portNumber`. ### To 5.0.0 -Version 5.0.0 introduces support for custom labels and refactor [Kubernetes recommended labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/). This is a breaking change. +Version 5.0.0 introduces support for custom labels and refactor [Kubernetes recommended labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/). This is a breaking change because many labels of all resources need to be updated to stay consistent. + +In order to upgrade, delete the Deployment before upgrading: + +```bash +kubectl delete deployment --cascade=false my-release-oauth2-proxy +``` ## Configuration From 0427131b9e3b5b6845e884d01e9537bd8b4fc25d Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Sat, 16 Oct 2021 18:46:02 +0200 Subject: [PATCH 10/10] Add: documentation Signed-off-by: Nicolas Lamirault --- helm/oauth2-proxy/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 7ce32c84..ed177455 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -67,9 +67,17 @@ Version 5.0.0 introduces support for custom labels and refactor [Kubernetes reco In order to upgrade, delete the Deployment before upgrading: ```bash -kubectl delete deployment --cascade=false my-release-oauth2-proxy +kubectl delete deployment my-release-oauth2-proxy ``` +This will introduce a slight downtime. + +For users who don't want downtime, you can perform these actions: + +- Perform a non-cascading removal of the deployment that keeps the pods running +- Add new labels to pods +- Perform `helm upgrade` + ## Configuration The following table lists the configurable parameters of the oauth2-proxy chart and their default values.