File tree Expand file tree Collapse file tree 6 files changed +51
-4
lines changed Expand file tree Collapse file tree 6 files changed +51
-4
lines changed Original file line number Diff line number Diff line change 11name : oauth2-proxy
2- version : 3.2.6
2+ version : 3.2.7
33apiVersion : v1
44appVersion : 5.1.0
55home : https://oauth2-proxy.github.io/oauth2-proxy/
Original file line number Diff line number Diff line change @@ -60,8 +60,10 @@ Parameter | Description | Default
6060--- | --- | ---
6161` affinity ` | node/pod affinities | None
6262` authenticatedEmailsFile.enabled ` | Enables authorize individual email addresses | ` false `
63- ` authenticatedEmailsFile.template ` | Name of the configmap that is handled outside of that chart | ` "" `
63+ ` authenticatedEmailsFile.persistence ` | Defines how the email addresses file will be projected, via a configmap or secret | ` configmap `
64+ ` authenticatedEmailsFile.template ` | Name of the configmap or secret that is handled outside of that chart | ` "" `
6465` authenticatedEmailsFile.restricted_access ` | [ email addresses] ( https://github.com/pusher/oauth2_proxy#email-authentication ) list config | ` "" `
66+ ` authenticatedEmailsFile.annotations ` | configmap or secret annotations | ` nil `
6567` config.clientID ` | oauth client ID | ` "" `
6668` config.clientSecret ` | oauth client secret | ` "" `
6769` config.cookieSecret ` | server specific cookie for the secret; create a new one with ` openssl rand -base64 32 | head -c 32 | base64 ` | ` "" `
Original file line number Diff line number Diff line change 11{{- if .Values.authenticatedEmailsFile.enabled }}
2- {{- if .Values.authenticatedEmailsFile.restricted_access }}
2+ {{- if and ( .Values.authenticatedEmailsFile.restricted_access) (eq .Values.authenticatedEmailsFile.persistence "configmap") }}
33apiVersion : v1
44kind : ConfigMap
55metadata :
@@ -8,6 +8,10 @@ metadata:
88 chart : {{ template "oauth2-proxy.chart" . }}
99 heritage : {{ .Release.Service }}
1010 release : {{ .Release.Name }}
11+ {{- if .Values.authenticatedEmailsFile.annotations }}
12+ annotations :
13+ {{ toYaml .Values.authenticatedEmailsFile.annotations | indent 4 }}
14+ {{- end }}
1115 name : {{ template "oauth2-proxy.fullname" . }}-accesslist
1216data :
1317 restricted_user_access : {{ .Values.authenticatedEmailsFile.restricted_access | quote }}
Original file line number Diff line number Diff line change @@ -164,6 +164,23 @@ spec:
164164 secretName : {{ if .Values.htpasswdFile.existingSecret }}{{ .Values.htpasswdFile.existingSecret }}{{ else }} {{ template "oauth2-proxy.fullname" . }}-htpasswd-file {{ end }}
165165{{- end }}
166166
167+ {{- if and (.Values.authenticatedEmailsFile.enabled) (eq .Values.authenticatedEmailsFile.persistence "secret") }}
168+ - name : configaccesslist
169+ secret :
170+ items :
171+ - key : restricted_user_access
172+ {{- if .Values.authenticatedEmailsFile.template }}
173+ path : {{ .Values.authenticatedEmailsFile.template }}
174+ {{- else }}
175+ path : authenticated-emails-list
176+ {{- end }}
177+ {{- if .Values.authenticatedEmailsFile.template }}
178+ secretName : {{ .Values.authenticatedEmailsFile.template }}
179+ {{- else }}
180+ secretName : {{ template "oauth2-proxy.fullname" . }}-accesslist
181+ {{- end }}
182+ {{- end }}
183+
167184{{- if or .Values.config.existingConfig .Values.config.configFile }}
168185 - configMap :
169186 defaultMode : 420
@@ -173,7 +190,7 @@ spec:
173190{{- if ne (len .Values.extraVolumes) 0 }}
174191{{ toYaml .Values.extraVolumes | indent 6 }}
175192{{- end }}
176- {{- if .Values.authenticatedEmailsFile.enabled }}
193+ {{- if and ( .Values.authenticatedEmailsFile.enabled) (eq .Values.authenticatedEmailsFile.persistence "configmap") }}
177194 - configMap :
178195{{- if .Values.authenticatedEmailsFile.template }}
179196 name : {{ .Values.authenticatedEmailsFile.template }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.authenticatedEmailsFile.enabled }}
2+ {{- if and (.Values.authenticatedEmailsFile.restricted_access) (eq .Values.authenticatedEmailsFile.persistence "secret") }}
3+ apiVersion : v1
4+ kind : Secret
5+ type : Opaque
6+ metadata :
7+ labels :
8+ app : {{ template "oauth2-proxy.name" . }}
9+ chart : {{ template "oauth2-proxy.chart" . }}
10+ heritage : {{ .Release.Service }}
11+ release : {{ .Release.Name }}
12+ {{- if .Values.authenticatedEmailsFile.annotations }}
13+ annotations :
14+ {{ toYaml .Values.authenticatedEmailsFile.annotations | indent 4 }}
15+ {{- end }}
16+ name : {{ template "oauth2-proxy.fullname" . }}-accesslist
17+ data :
18+ restricted_user_access : {{ .Values.authenticatedEmailsFile.restricted_access | b64enc }}
19+ {{- end }}
20+ {{- end }}
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ extraEnv: []
4646# That is part of extraArgs but since this needs special treatment we need to do a separate section
4747authenticatedEmailsFile :
4848 enabled : false
49+ # Defines how the email addresses file will be projected, via a configmap or secret
50+ persistence : configmap
4951 # template is the name of the configmap what contains the email user list but has been configured without this chart.
5052 # It's a simpler way to maintain only one configmap (user list) instead changing it for each oauth2-proxy service.
5153 # Be aware the value name in the extern config map in data needs to be named to "restricted_user_access".
@@ -58,6 +60,8 @@ authenticatedEmailsFile:
5860 # If you override the config with restricted_access it will configure a user list within this chart what takes care of the
5961 # config map resource.
6062 restricted_access : " "
63+ annotations : {}
64+ # helm.sh/resource-policy: keep
6165
6266service :
6367 type : ClusterIP
You can’t perform that action at this time.
0 commit comments