Skip to content

Commit

Permalink
Feature add host alias (#58)
Browse files Browse the repository at this point in the history
* feature_add_hostAliases

wip

* wip

* remove redis tgz

* bump version to 5.0.7

* Update Chart.yaml

Co-authored-by: Pierluigi Lenoci <[email protected]>
  • Loading branch information
lgthibault and pierluigilenoci authored Feb 7, 2022
1 parent 8a81dcf commit 61bba82
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: oauth2-proxy
version: 5.2.1
version: 5.3.0
apiVersion: v2
appVersion: 7.2.0
home: https://oauth2-proxy.github.io/oauth2-proxy/
Expand Down
3 changes: 3 additions & 0 deletions helm/oauth2-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ 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`.
`htpasswdFile.enabled` | enable htpasswd-file option | `false`
`htpasswdFile.entries` | list of [SHA 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: 6 additions & 0 deletions helm/oauth2-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "oauth2-proxy.serviceAccountName" . }}
{{- if .Values.hostAlias.enabled }}
hostAliases:
- ip: {{ .Values.hostAlias.ip }}
hostnames:
- {{ .Values.hostAlias.hostname }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
6 changes: 6 additions & 0 deletions helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ extraVolumeMounts: []

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"

# Affinity for pod assignment
# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
# affinity: {}
Expand Down

0 comments on commit 61bba82

Please sign in to comment.