Skip to content

Commit

Permalink
Merge pull request #164 from saravanan30erd/fix-hostalias
Browse files Browse the repository at this point in the history
Fix hostAliases to support multiple entries
  • Loading branch information
pierluigilenoci authored Feb 28, 2024
2 parents 731465b + e9fea4c commit dff4ba1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: oauth2-proxy
version: 6.24.2
version: 7.0.0
apiVersion: v2
appVersion: 7.6.0
home: https://oauth2-proxy.github.io/oauth2-proxy/
Expand Down Expand Up @@ -34,8 +34,8 @@ maintainers:
kubeVersion: ">=1.9.0-0"
annotations:
artifacthub.io/changes: |
- kind: fixed
description: Allow setting revisionHistoryLimit to 0
- kind: added
description: Fix hostAliases to add multiple entries in /etc/hosts
links:
- name: Github PR
url: https://github.com/oauth2-proxy/manifests/pull/183
url: https://github.com/oauth2-proxy/manifests/pull/164
4 changes: 1 addition & 3 deletions helm/oauth2-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `""`
Expand Down
6 changes: 2 additions & 4 deletions helm/oauth2-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 9 additions & 5 deletions helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,15 @@ 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: "10.xxx.xxx.xxx"
# hostnames:
# - "auth.example.com"
# - 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
Expand Down

0 comments on commit dff4ba1

Please sign in to comment.