layer0-web: Set values from environment if they exist
This commit is contained in:
parent
7250fd4ee3
commit
6217109290
|
@ -39,6 +39,18 @@ data:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
PROMETHEUS_MULTIPROC_DIR: "/tmp"
|
PROMETHEUS_MULTIPROC_DIR: "/tmp"
|
||||||
---
|
---
|
||||||
|
{{- range $domain := $domains }}
|
||||||
|
{{- $name := $domain.name -}}
|
||||||
|
{{- $upper_name := $name | upper | replace "." "_" -}}
|
||||||
|
{{- $client_id := printf "%s_%s" $upper_name "OAUTH_CLIENT_ID" }}
|
||||||
|
{{- $client_secret := printf "%s_%s" $upper_name "OAUTH_CLIENT_SECRET" }}
|
||||||
|
{{- if hasKey $.Values.environment $client_id }}
|
||||||
|
{{ set $domain "OAUTH_CLIENT_ID" (get $.Values.environment $client_id) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if hasKey $.Values.environment $client_secret }}
|
||||||
|
{{ set $domain "OAUTH_CLIENT_SECRET" (get $.Values.environment $client_secret) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
|
|
Loading…
Reference in a new issue