diff --git a/helmchart/single-sign-on/templates/deployment-userfrontend.yaml b/helmchart/single-sign-on/templates/deployment-userfrontend.yaml index fd8599e542c99e8a555417313436bdcfa15393c8..3fc7ea494f195d29e4e525d3097dd50dc7a4cab1 100644 --- a/helmchart/single-sign-on/templates/deployment-userfrontend.yaml +++ b/helmchart/single-sign-on/templates/deployment-userfrontend.yaml @@ -38,13 +38,13 @@ spec: - name: OAUTH_CLIENT_ID valueFrom: secretKeyRef: - name: userpanel-oauth2-client - key: client_id + name: oauth2-clients + key: {{ .Values.userpanel.applicationName }}_client_id - name: OAUTH_CLIENT_SECRET valueFrom: secretKeyRef: - name: userpanel-oauth2-client - key: client_secret + name: oauth2-clients + key: {{ .Values.userpanel.applicationName }}_client_secret ports: - name: userpanel containerPort: 3000 diff --git a/helmchart/single-sign-on/templates/job-create-oauth2-client-userpanel.yaml b/helmchart/single-sign-on/templates/job-create-oauth2-client-userpanel.yaml index b27efc1506d1ef960ba3849aa10295aca55fb1c8..8ca434ea2e9fa915467cb1ecdda48f9b83705308 100644 --- a/helmchart/single-sign-on/templates/job-create-oauth2-client-userpanel.yaml +++ b/helmchart/single-sign-on/templates/job-create-oauth2-client-userpanel.yaml @@ -27,12 +27,12 @@ spec: valueFrom: secretKeyRef: name: oauth2-clients - key: {{ .clientName }}.client_id + key: {{ .clientName }}_client_id - name: CLIENT_SECRET valueFrom: secretKeyRef: name: oauth2-clients - key: {{ .clientName }}.client_secret + key: {{ .clientName }}_client_secret - name: CLIENT_NAME value: {{ .clientName | quote }} - name: REDIRECT_URI diff --git a/helmchart/single-sign-on/templates/secret-oauth2-client-userpanel.yaml b/helmchart/single-sign-on/templates/secret-oauth2-client-userpanel.yaml index baad37d53c9aeced695dd7fb24f28b885fb064b6..efefd9b9624b25123e7aff3a95b1955e715d3b58 100644 --- a/helmchart/single-sign-on/templates/secret-oauth2-client-userpanel.yaml +++ b/helmchart/single-sign-on/templates/secret-oauth2-client-userpanel.yaml @@ -5,7 +5,6 @@ metadata: type: Opaque data: {{- range .Values.oAuthClients }} - {{ .clientName }}: - client_id: {{ .clientName | b64enc }} - client_secret: {{ .clientSecret | b64enc }} + {{ .clientName }}_client_id: {{ .clientName | b64enc }} + {{ .clientName }}_client_secret: {{ .clientSecret | b64enc }} {{- end }} diff --git a/helmchart/single-sign-on/values.yaml b/helmchart/single-sign-on/values.yaml index fc40409fcb6684f2abd3035ebcaf72a0e0b48088..0658978888deb0c8ada0db7264c15023e2e4e20f 100644 --- a/helmchart/single-sign-on/values.yaml +++ b/helmchart/single-sign-on/values.yaml @@ -16,6 +16,10 @@ loginProviderImage: singleSignOnHost: &SSO_HOST sso.oas.example.net userpanel: + # userpanel.applicationName is the name of the application. This is a duplicate of + # userbackend.applications[0].name but helm < 3.0 doesn't supprt direct references to + # list items in template files so we need to keep it for now + applicationName: &USER_PANEL user-panel image: # userpanel.image.tag and userpanel.image.pullPolicy should be the same as # userbackend.image.tag and userpanel.image.pullPolicy as the images are released @@ -34,7 +38,7 @@ userbackend: # after the installation of the user backend. username: "admin" applications: - - name: &user-panel user-panel + - name: *USER_PANEL desctiption: Administration interface to manage user accounts # username.password is the password of the admin user password: "YouReallyNeedToChangeThis" @@ -107,7 +111,7 @@ hydra: oAuthClients: # oauthClients[].clientName is the name of the oauth client that needs to be the same as # the application name in userbackend.applications[].name -- clientName: *user-panel +- clientName: *USER_PANEL # oauthClients[].clientSecret is the secret the client uses to authenticate - clientSecret: "YouReallyNeedToChangeThis" # oAuthClients[].redirectUri is the url the user will be redirected to by hydra when the