Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit d6b2815

Browse files
committed
Correct the template for the secrets
If the values were not provided by the user, the resulting base64 encoded default value was just an empty string. Since the values were not wrapped in quotes, this would be interpreted as a nil value and throw errors. Signed-off-by: Daniel Herman <[email protected]>
1 parent f3ecbcd commit d6b2815

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

deploy/charts/kube-oidc-proxy/templates/secret_config.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,24 @@ data:
66
oidc.issuer-url: {{ .Values.oidc.issuerUrl | b64enc }}
77
oidc.username-claim: {{ .Values.oidc.usernameClaim | b64enc }}
88
oidc.client-id: {{ .Values.oidc.clientId | b64enc }}
9-
oidc.username-prefix: {{ .Values.oidc.usernamePrefix | default "" | b64enc }}
10-
oidc.groups-claim: {{ .Values.oidc.groupsClaim | default "" | b64enc }}
11-
oidc.groups-prefix: {{ .Values.oidc.groupsPrefix | default "" | b64enc }}
12-
oidc.signing-algs: {{ join "," .Values.oidc.signingAlgs | default "" | b64enc }}
9+
{{- if .Values.oidc.usernamePrefix }}
10+
oidc.username-prefix: {{ .Values.oidc.usernamePrefix | b64enc }}
11+
{{- end }}
12+
{{- if .Values.oidc.groupsClaim }}
13+
oidc.groups-claim: {{ .Values.oidc.groupsClaim | b64enc }}
14+
{{- end }}
15+
{{- if .Values.oidc.groupsPrefix }}
16+
oidc.groups-prefix: {{ .Values.oidc.groupsPrefix | b64enc }}
17+
{{- end }}
18+
{{- if .Values.oidc.signingAlgs }}
19+
oidc.signing-algs: {{ join "," .Values.oidc.signingAlgs | b64enc }}
20+
{{- end }}
21+
{{ if .Values.oidc.requiredClaims }}
1322
oidc.required-claims: {{ include "requiredClaims" . | b64enc }}
14-
api-audiences: {{ join "," .Values.oidc.apiAudiences | default "" | b64enc }}
23+
{{- end }}
24+
{{- if .Values.oidc.apiAudiences -}}
25+
api-audiences: {{ join "," .Values.oidc.apiAudiences | b64enc }}
26+
{{- end }}
1527
kind: Secret
1628
metadata:
1729
name: {{ include "kube-oidc-proxy.fullname" . }}-config

0 commit comments

Comments
 (0)