layer0-web: Make sure that environment variables are set
If the corresponding secrets exist, we put them in the environment
This commit is contained in:
parent
6217109290
commit
b5cc15a319
|
@ -35,6 +35,26 @@ spec:
|
|||
mountPath: /srv/domains.json
|
||||
subPath: domains.json
|
||||
readOnly: true
|
||||
{{- if.Values.global.domains }}
|
||||
env:
|
||||
{{- range $domain := .Values.global.domains }}
|
||||
{{- $name := $domain.name -}}
|
||||
{{- $upper_name := upper $name | replace "." "_" -}}
|
||||
{{- $lower_name := lower $name | replace "." "-" -}}
|
||||
{{- $client_id := printf "%s_%s" $upper_name "OAUTH_CLIENT_ID" }}
|
||||
{{- $client_secret := printf "%s_%s" $upper_name "OAUTH_CLIENT_SECRET" }}
|
||||
- name: {{ $client_id }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: layer1-port-owncloud-{{ $lower_name }}
|
||||
key: oauth-client-id
|
||||
- name: {{ $client_secret }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: layer1-port-owncloud-{{ $lower_name }}
|
||||
key: oauth-client-secret
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: mservice
|
||||
|
|
Loading…
Reference in a new issue