diff --git a/deploy/charts/kube-oidc-proxy/Chart.yaml b/deploy/charts/kube-oidc-proxy/Chart.yaml index eec351398..91ec980f1 100644 --- a/deploy/charts/kube-oidc-proxy/Chart.yaml +++ b/deploy/charts/kube-oidc-proxy/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "v0.3.0" description: A Helm chart for kube-oidc-proxy home: https://github.com/jetstack/kube-oidc-proxy name: kube-oidc-proxy -version: 0.3.0 +version: 0.3.1 maintainers: - name: mhrabovcin - name: joshvanl diff --git a/deploy/charts/kube-oidc-proxy/templates/secret_config.yaml b/deploy/charts/kube-oidc-proxy/templates/secret_config.yaml index e7f6ecb4a..41fbf3f9d 100644 --- a/deploy/charts/kube-oidc-proxy/templates/secret_config.yaml +++ b/deploy/charts/kube-oidc-proxy/templates/secret_config.yaml @@ -1,29 +1,43 @@ apiVersion: v1 +kind: Secret +metadata: + name: {{ include "kube-oidc-proxy.fullname" . }}-config + labels: + {{ include "kube-oidc-proxy.labels" . | indent 4 }} +type: Opaque data: - {{ if .Values.oidc.caPEM }} + {{- if .Values.oidc.caPEM }} oidc.ca-pem: {{ .Values.oidc.caPEM | default "" | b64enc }} - {{ end }} + {{- end }} + + {{- if .Values.oidc.issuerUrl }} oidc.issuer-url: {{ .Values.oidc.issuerUrl | b64enc }} - oidc.username-claim: {{ .Values.oidc.usernameClaim | b64enc }} + {{- end }} + + {{- if .Values.oidc.usernameClaim }} + oidc.username-claim: {{ .Values.oidc.usernameClaim | default "" | b64enc }} + {{- end }} + + {{- if .Values.oidc.clientId }} oidc.client-id: {{ .Values.oidc.clientId | b64enc }} + {{- end }} + {{- if .Values.oidc.usernamePrefix }} - oidc.username-prefix: {{ .Values.oidc.usernamePrefix | b64enc }} + oidc.username-prefix: {{ .Values.oidc.usernamePrefix | default "" | b64enc }} {{- end }} + {{- if .Values.oidc.groupsClaim }} - oidc.groups-claim: {{ .Values.oidc.groupsClaim | b64enc }} + oidc.groups-claim: {{ .Values.oidc.groupsClaim | default "" | b64enc }} {{- end }} + {{- if .Values.oidc.groupsPrefix }} - oidc.groups-prefix: {{ .Values.oidc.groupsPrefix | b64enc }} + oidc.groups-prefix: {{ .Values.oidc.groupsPrefix | default "" | b64enc }} {{- end }} + {{- if .Values.oidc.signingAlgs }} - oidc.signing-algs: {{ join "," .Values.oidc.signingAlgs | b64enc }} + oidc.signing-algs: {{ join "," .Values.oidc.signingAlgs | default "" | b64enc }} {{- end }} - {{ if .Values.oidc.requiredClaims }} + + {{- if .Values.oidc.requiredClaims }} oidc.required-claims: {{ include "requiredClaims" . | b64enc }} {{- end }} -kind: Secret -metadata: - name: {{ include "kube-oidc-proxy.fullname" . }}-config - labels: -{{ include "kube-oidc-proxy.labels" . | indent 4 }} -type: Opaque