Skip to content

Commit eec5402

Browse files
Template app-specific oauth2-proxy config
1 parent d2a677d commit eec5402

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

apps/i15-1/helm/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ ui-base:
1313
target:
1414
external:
1515
uri: http://i15-1-blueapi.diamond.ac.uk
16+
17+
authConfigFlags: |
18+
skip_auth_routes = ["GET=^/$", "GET=^/assets"]
19+
api_routes = ["^/oauth2", "^/api"]

helm/templates/_helpers.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,11 @@ http://{{ .target.service.name }}.{{ .Release.Namespace }}.svc.cluster.local:{{
7979
{{- end -}}
8080

8181
{{- index $providers $provider -}}
82-
{{- end -}}
82+
{{- end -}}
83+
84+
{{/*
85+
App-level oauth2proxy config options
86+
*/}}
87+
{{- define "ui-base.extraConfig" -}}
88+
{{- .Values.ui-base.authConfigFlags | default "" -}}
89+
{{- end -}}

helm/templates/configmap.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ data:
1010
cookie_expire = "168h"
1111
cookie_refresh = "45s"
1212
cookie_name = "{{ include "oauth2-proxy.fullname" . }}-cookie"
13-
skip_auth_routes = ["GET=^/$","GET=^/assets",]
14-
api_routes = ["^/oauth2", "^/api"]
15-
skip_provider_button = true
13+
{{ include "ui-base.extraConfig" . | indent 4 }}

0 commit comments

Comments
 (0)