Skip to content

Commit 2f2f385

Browse files
Merge pull request #124 from adlnc/main
extraArgs as a list
2 parents 8968e29 + 5d70b1f commit 2f2f385

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
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: 6.7.2
2+
version: 6.7.3
33
apiVersion: v2
44
appVersion: 7.4.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/

helm/oauth2-proxy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Parameter | Description | Default
114114
`config.google.existingConfig` | existing Kubernetes configmap to use for the service account file. See [google secret template](https://github.com/oauth2-proxy/manifests/blob/master/helm/oauth2-proxy/templates/google-secret.yaml) for the required values | `nil`
115115
`config.google.groups` | restrict logins to members of these google groups | `[]`
116116
`containerPort` | used to customise port on the deployment | `""`
117-
`extraArgs` | key:value list of extra arguments to give the binary | `{}`
117+
`extraArgs` | Extra arguments to give the binary. Either as a map with key:value pairs or as a list type, which allows to configure the same flag multiple times. (e.g. `["--allowed-role=CLIENT_ID:CLIENT_ROLE_NAME_A", "--allowed-role=CLIENT_ID:CLIENT_ROLE_NAME_B"]`). | `{}` or `[]`
118118
`extraEnv` | key:value list of extra environment variables to give the binary | `[]`
119119
`extraVolumes` | list of extra volumes | `[]`
120120
`extraVolumeMounts` | list of extra volumeMounts | `[]`
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
extraArgs:
2+
pass-authorization-header: "true"
3+
request-logging: "true"
4+
allowed-role: client_id:client_role
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extraArgs:
2+
- "--pass-authorization-header=true"
3+
- "--request-logging=true"
4+
- --allowed-role=client_id:client_role_A
5+
- --allowed-role=client_id_B:client_role_C

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,19 @@ spec:
7070
{{- if .Values.config.cookieName }}
7171
- --cookie-name={{ .Values.config.cookieName }}
7272
{{- end }}
73-
{{- range $key, $value := .Values.extraArgs }}
73+
{{- if kindIs "map" .Values.extraArgs }}
74+
{{- range $key, $value := .Values.extraArgs }}
7475
{{- if $value }}
7576
- --{{ $key }}={{ $value }}
7677
{{- else }}
7778
- --{{ $key }}
7879
{{- end }}
80+
{{- end }}
81+
{{- end }}
82+
{{- if kindIs "slice" .Values.extraArgs }}
83+
{{- with .Values.extraArgs }}
84+
{{- toYaml . | nindent 10 }}
85+
{{- end }}
7986
{{- end }}
8087
{{- if or .Values.config.existingConfig .Values.config.configFile }}
8188
- --config=/etc/oauth2_proxy/oauth2_proxy.cfg

0 commit comments

Comments
 (0)