Skip to content

Commit

Permalink
[dex] Fix 'staticClients' env variable usage
Browse files Browse the repository at this point in the history
Fixes gabibbo97#36
Relative to dexidp/dex#1664
Requires Dex >= v2.23.0
  • Loading branch information
xakraz committed Dec 2, 2020
1 parent 06d3672 commit 16033fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/dex/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: dex
version: 4.0.0
version: 4.0.1
description: OpenID Connect Identity (OIDC) and OAuth 2.0 Provider with Pluggable Connectors
type: application
home: https://github.com/dexidp/dex
Expand Down
6 changes: 4 additions & 2 deletions charts/dex/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ connectors: {{ .Values.connectors | toYaml | nindent 2 }}
staticClients:
{{- range $i, $clientData := .Values.staticClients }}
{{- $client := deepCopy $clientData }}
{{- $_ := set $client "id" (printf "$DEX_CLIENT_%d_CLIENT_ID" $i) }}
{{- $_ = set $client "secret" (printf "$DEX_CLIENT_%d_CLIENT_SECRET" $i) }}
{{- $_ := unset $client "id" }}
{{- $_ := set $client "idEnv" (printf "DEX_CLIENT_%d_CLIENT_ID" $i) }}
{{- $_ := unset $client "secret" }}
{{- $_ = set $client "secretEnv" (printf "DEX_CLIENT_%d_CLIENT_SECRET" $i) }}
- {{ $client | toYaml | nindent 4 }}
{{- end }}
{{- end }}
Expand Down

0 comments on commit 16033fe

Please sign in to comment.