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 1
1
name : oauth2-proxy
2
- version : 3.2.6
2
+ version : 3.2.7
3
3
apiVersion : v1
4
4
appVersion : 5.1.0
5
5
home : https://oauth2-proxy.github.io/oauth2-proxy/
Original file line number Diff line number Diff line change @@ -60,8 +60,10 @@ Parameter | Description | Default
60
60
--- | --- | ---
61
61
` affinity ` | node/pod affinities | None
62
62
` 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 | ` "" `
64
65
` authenticatedEmailsFile.restricted_access ` | [ email addresses] ( https://github.com/pusher/oauth2_proxy#email-authentication ) list config | ` "" `
66
+ ` authenticatedEmailsFile.annotations ` | configmap or secret annotations | ` nil `
65
67
` config.clientID ` | oauth client ID | ` "" `
66
68
` config.clientSecret ` | oauth client secret | ` "" `
67
69
` 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 1
1
{{- if .Values.authenticatedEmailsFile.enabled }}
2
- {{- if .Values.authenticatedEmailsFile.restricted_access }}
2
+ {{- if and ( .Values.authenticatedEmailsFile.restricted_access) (eq .Values.authenticatedEmailsFile.persistence "configmap") }}
3
3
apiVersion : v1
4
4
kind : ConfigMap
5
5
metadata :
@@ -8,6 +8,10 @@ metadata:
8
8
chart : {{ template "oauth2-proxy.chart" . }}
9
9
heritage : {{ .Release.Service }}
10
10
release : {{ .Release.Name }}
11
+ {{- if .Values.authenticatedEmailsFile.annotations }}
12
+ annotations :
13
+ {{ toYaml .Values.authenticatedEmailsFile.annotations | indent 4 }}
14
+ {{- end }}
11
15
name : {{ template "oauth2-proxy.fullname" . }}-accesslist
12
16
data :
13
17
restricted_user_access : {{ .Values.authenticatedEmailsFile.restricted_access | quote }}
Original file line number Diff line number Diff line change @@ -164,6 +164,23 @@ spec:
164
164
secretName : {{ if .Values.htpasswdFile.existingSecret }}{{ .Values.htpasswdFile.existingSecret }}{{ else }} {{ template "oauth2-proxy.fullname" . }}-htpasswd-file {{ end }}
165
165
{{- end }}
166
166
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
+
167
184
{{- if or .Values.config.existingConfig .Values.config.configFile }}
168
185
- configMap :
169
186
defaultMode : 420
@@ -173,7 +190,7 @@ spec:
173
190
{{- if ne (len .Values.extraVolumes) 0 }}
174
191
{{ toYaml .Values.extraVolumes | indent 6 }}
175
192
{{- end }}
176
- {{- if .Values.authenticatedEmailsFile.enabled }}
193
+ {{- if and ( .Values.authenticatedEmailsFile.enabled) (eq .Values.authenticatedEmailsFile.persistence "configmap") }}
177
194
- configMap :
178
195
{{- if .Values.authenticatedEmailsFile.template }}
179
196
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: []
46
46
# That is part of extraArgs but since this needs special treatment we need to do a separate section
47
47
authenticatedEmailsFile :
48
48
enabled : false
49
+ # Defines how the email addresses file will be projected, via a configmap or secret
50
+ persistence : configmap
49
51
# template is the name of the configmap what contains the email user list but has been configured without this chart.
50
52
# It's a simpler way to maintain only one configmap (user list) instead changing it for each oauth2-proxy service.
51
53
# 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:
58
60
# If you override the config with restricted_access it will configure a user list within this chart what takes care of the
59
61
# config map resource.
60
62
restricted_access : " "
63
+ annotations : {}
64
+ # helm.sh/resource-policy: keep
61
65
62
66
service :
63
67
type : ClusterIP
You can’t perform that action at this time.
0 commit comments