Skip to content

Commit 313da1c

Browse files
Merge pull request #45 from boomerang-io/feat-configure-restricted-user-access-key
2 parents f3a551d + 7ee0dec commit 313da1c

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 4.0.4
2+
version: 4.0.5
33
apiVersion: v2
44
appVersion: 7.1.3
55
home: https://oauth2-proxy.github.io/oauth2-proxy/

helm/oauth2-proxy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Parameter | Description | Default
7070
`authenticatedEmailsFile.enabled` | Enables authorize individual email addresses | `false`
7171
`authenticatedEmailsFile.persistence` | Defines how the email addresses file will be projected, via a configmap or secret | `configmap`
7272
`authenticatedEmailsFile.template` | Name of the configmap or secret that is handled outside of that chart | `""`
73+
`authenticatedEmailsFile.restrictedUserAccessKey` | The key of the configmap or secret that holds the email addresses list | `""`
7374
`authenticatedEmailsFile.restricted_access` | [email addresses](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/oauth_provider#email-authentication) list config | `""`
7475
`authenticatedEmailsFile.annotations` | configmap or secret annotations | `nil`
7576
`config.clientID` | oauth client ID | `""`

helm/oauth2-proxy/templates/configmap-authenticated-emails-file.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ metadata:
1414
{{- end }}
1515
name: {{ template "oauth2-proxy.fullname" . }}-accesslist
1616
data:
17-
restricted_user_access: {{ .Values.authenticatedEmailsFile.restricted_access | quote }}
17+
{{ default "restricted_user_access" .Values.authenticatedEmailsFile.restrictedUserAccessKey }}: {{ .Values.authenticatedEmailsFile.restricted_access | quote }}
1818
{{- end }}
1919
{{- end }}

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ spec:
204204

205205
{{- if and (.Values.authenticatedEmailsFile.enabled) (eq .Values.authenticatedEmailsFile.persistence "secret") }}
206206
- name: configaccesslist
207-
secret:
207+
secret:
208208
items:
209-
- key: restricted_user_access
209+
- key: {{ default "restricted_user_access" .Values.authenticatedEmailsFile.restrictedUserAccessKey }}
210210
{{- if .Values.authenticatedEmailsFile.template }}
211211
path: {{ .Values.authenticatedEmailsFile.template }}
212212
{{- else }}
@@ -236,7 +236,7 @@ spec:
236236
name: {{ template "oauth2-proxy.fullname" . }}-accesslist
237237
{{- end }}
238238
items:
239-
- key: restricted_user_access
239+
- key: {{ default "restricted_user_access" .Values.authenticatedEmailsFile.restrictedUserAccessKey }}
240240
{{- if .Values.authenticatedEmailsFile.template }}
241241
path: {{ .Values.authenticatedEmailsFile.template }}
242242
{{- else }}

helm/oauth2-proxy/templates/secret-authenticated-emails-file.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ metadata:
1515
{{- end }}
1616
name: {{ template "oauth2-proxy.fullname" . }}-accesslist
1717
data:
18-
restricted_user_access: {{ .Values.authenticatedEmailsFile.restricted_access | b64enc }}
18+
{{ default "restricted_user_access" .Values.authenticatedEmailsFile.restrictedUserAccessKey }}: {{ .Values.authenticatedEmailsFile.restricted_access | b64enc }}
1919
{{- end }}
2020
{{- end }}

helm/oauth2-proxy/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ authenticatedEmailsFile:
5353
persistence: configmap
5454
# template is the name of the configmap what contains the email user list but has been configured without this chart.
5555
# It's a simpler way to maintain only one configmap (user list) instead changing it for each oauth2-proxy service.
56-
# Be aware the value name in the extern config map in data needs to be named to "restricted_user_access".
56+
# Be aware the value name in the extern config map in data needs to be named to "restricted_user_access" or to the
57+
# provided value in restrictedUserAccessKey field.
5758
template: ""
59+
# The configmap/secret key under which the list of email access is stored
60+
# Defaults to "restricted_user_access" if not filled-in, but can be overridden to allow flexibility
61+
restrictedUserAccessKey: ""
5862
# One email per line
5963
# example:
6064
# restricted_access: |-

0 commit comments

Comments
 (0)