Skip to content

Commit dff4ba1

Browse files
Merge pull request #164 from saravanan30erd/fix-hostalias
Fix hostAliases to support multiple entries
2 parents 731465b + e9fea4c commit dff4ba1

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 6.24.2
2+
version: 7.0.0
33
apiVersion: v2
44
appVersion: 7.6.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -34,8 +34,8 @@ maintainers:
3434
kubeVersion: ">=1.9.0-0"
3535
annotations:
3636
artifacthub.io/changes: |
37-
- kind: fixed
38-
description: Allow setting revisionHistoryLimit to 0
37+
- kind: added
38+
description: Fix hostAliases to add multiple entries in /etc/hosts
3939
links:
4040
- name: Github PR
41-
url: https://github.com/oauth2-proxy/manifests/pull/183
41+
url: https://github.com/oauth2-proxy/manifests/pull/164

helm/oauth2-proxy/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ Parameter | Description | Default
123123
`extraEnv` | key:value list of extra environment variables to give the binary | `[]`
124124
`extraVolumes` | list of extra volumes | `[]`
125125
`extraVolumeMounts` | list of extra volumeMounts | `[]`
126-
`hostAlias.enabled` | provide extra ip:hostname alias for network name resolution.
127-
`hostAlias.ip` | `ip` address `hostAliases.hostname` should resolve to.
128-
`hostAlias.hostname` | `hostname` associated to `hostAliases.ip`.
126+
`hostAliases` | hostAliases is a list of aliases to be added to /etc/hosts for network name resolution.
129127
`htpasswdFile.enabled` | enable htpasswd-file option | `false`
130128
`htpasswdFile.entries` | list of [encrypted user:passwords](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview#command-line-options) | `{}`
131129
`htpasswdFile.existingSecret` | existing Kubernetes secret to use for OAuth2 htpasswd file | `""`

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ spec:
5151
{{- end }}
5252
serviceAccountName: {{ template "oauth2-proxy.serviceAccountName" . }}
5353
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
54-
{{- if .Values.hostAlias.enabled }}
54+
{{- if .Values.hostAliases }}
5555
hostAliases:
56-
- ip: {{ .Values.hostAlias.ip }}
57-
hostnames:
58-
- {{ .Values.hostAlias.hostname }}
56+
{{ toYaml .Values.hostAliases | nindent 8}}
5957
{{- end }}
6058
{{- if and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled }}
6159
initContainers:

helm/oauth2-proxy/values.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,15 @@ extraContainers: []
192192

193193
priorityClassName: ""
194194

195-
# Host aliases, useful when working "on premise" where (public) DNS resolver does not know about my hosts.
196-
hostAlias:
197-
enabled: false
198-
# ip: "10.xxx.xxx.xxx"
199-
# hostname: "auth.example.com"
195+
# hostAliases is a list of aliases to be added to /etc/hosts for network name resolution
196+
hostAliases: []
197+
# - ip: "10.xxx.xxx.xxx"
198+
# hostnames:
199+
# - "auth.example.com"
200+
# - ip: 127.0.0.1
201+
# hostnames:
202+
# - chart-example.local
203+
# - example.local
200204

201205
# [TopologySpreadConstraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) configuration.
202206
# Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling

0 commit comments

Comments
 (0)