Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hostAliases to support multiple entries #164

Merged
merged 14 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 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.18.0
version: 6.19.0
apiVersion: v2
appVersion: 7.5.1
home: https://oauth2-proxy.github.io/oauth2-proxy/
Expand Down Expand Up @@ -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
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
Loading