From b1305c8ff68f43f0a37dbef91dad7307ba5b160d Mon Sep 17 00:00:00 2001 From: Saravanan Palanisamy Date: Sun, 15 Oct 2023 16:02:04 +0400 Subject: [PATCH 1/5] fix hostAliases to support multiple FQDN --- helm/oauth2-proxy/README.md | 4 +--- helm/oauth2-proxy/templates/deployment.yaml | 6 ++---- helm/oauth2-proxy/values.yaml | 11 ++++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index e947f56..9c15e3a 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -123,9 +123,7 @@ Parameter | Description | Default `extraEnv` | key:value list of extra environment variables to give the binary | `[]` `extraVolumes` | list of extra volumes | `[]` `extraVolumeMounts` | list of extra volumeMounts | `[]` -`hostAlias.enabled` | provide extra ip:hostname alias for network name resolution. -`hostAlias.ip` | `ip` address `hostAliases.hostname` should resolve to. -`hostAlias.hostname` | `hostname` associated to `hostAliases.ip`. +`hostAliases` | hostAliases is a list of aliases to be added to /etc/hosts for network name resolution. `htpasswdFile.enabled` | enable htpasswd-file option | `false` `htpasswdFile.entries` | list of [encrypted user:passwords](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview#command-line-options) | `{}` `htpasswdFile.existingSecret` | existing Kubernetes secret to use for OAuth2 htpasswd file | `""` diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index a10084d..c3848ae 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -51,11 +51,9 @@ spec: {{- end }} serviceAccountName: {{ template "oauth2-proxy.serviceAccountName" . }} automountServiceAccountToken : {{ .Values.serviceAccount.automountServiceAccountToken }} - {{- if .Values.hostAlias.enabled }} + {{- if .Values.hostAliases }} hostAliases: - - ip: {{ .Values.hostAlias.ip }} - hostnames: - - {{ .Values.hostAlias.hostname }} + {{ toYaml .Values.hostAliases | nindent 8}} {{- end }} {{- if and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled }} initContainers: diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index b4a0e62..f22ba11 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -192,11 +192,12 @@ extraContainers: [] priorityClassName: "" -# Host aliases, useful when working "on premise" where (public) DNS resolver does not know about my hosts. -hostAlias: - enabled: false - # ip: "10.xxx.xxx.xxx" - # hostname: "auth.example.com" +# hostAliases is a list of aliases to be added to /etc/hosts for network name resolution +hostAliases: [] +# - ip: 127.0.0.1 +# hostnames: +# - chart-example.local +# - example.local # [TopologySpreadConstraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) configuration. # Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling From cb50fdb459dda6c4183a74f15d14e7362cc0e56a Mon Sep 17 00:00:00 2001 From: Saravanan Palanisamy Date: Sun, 15 Oct 2023 16:07:07 +0400 Subject: [PATCH 2/5] hostAliases: add more example --- helm/oauth2-proxy/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index f22ba11..0089931 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -194,6 +194,9 @@ priorityClassName: "" # hostAliases is a list of aliases to be added to /etc/hosts for network name resolution hostAliases: [] +# - ip: "10.xxx.xxx.xxx" +# hostnames: +# - "auth.example.com" # - ip: 127.0.0.1 # hostnames: # - chart-example.local From 11c303f3684e227ec2c908b3ab41a33d0db26b3a Mon Sep 17 00:00:00 2001 From: Saravanan Palanisamy Date: Thu, 2 Nov 2023 15:00:04 +0400 Subject: [PATCH 3/5] bump version for hostalias change --- helm/oauth2-proxy/Chart.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 8805fdf..24a0cd1 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 6.18.0 +version: 6.18.1 apiVersion: v2 appVersion: 7.5.1 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -35,7 +35,7 @@ kubeVersion: ">=1.9.0-0" annotations: artifacthub.io/changes: | - kind: added - description: Redis version bump + description: Fix hostAliases to add multiple entries in /etc/hosts links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/165 + url: https://github.com/oauth2-proxy/manifests/pull/164 From a7ad0f29e90288e90b8ff5e80fdc646c04b75418 Mon Sep 17 00:00:00 2001 From: Pierluigi Lenoci Date: Mon, 6 Nov 2023 16:28:25 +0100 Subject: [PATCH 4/5] Update Chart.yaml --- 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 24a0cd1..d2c3603 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 6.18.1 +version: 6.19.0 apiVersion: v2 appVersion: 7.5.1 home: https://oauth2-proxy.github.io/oauth2-proxy/ From e9fea4cb470694afe81577e4d04fbbb83a787cb8 Mon Sep 17 00:00:00 2001 From: Pierluigi Lenoci Date: Wed, 28 Feb 2024 13:55:30 +0100 Subject: [PATCH 5/5] Major for breaking changes --- 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 23be28c..04c892e 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 6.25.0 +version: 7.0.0 apiVersion: v2 appVersion: 7.6.0 home: https://oauth2-proxy.github.io/oauth2-proxy/