Skip to content

Commit 09b0e71

Browse files
thomaspetitharshavardhana
authored andcommitted
Add clientId existing secret option (minio#18768)
1 parent 6d08af6 commit 09b0e71

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

helm/minio/templates/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,14 @@ spec:
118118
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
119119
value: {{ .Values.oidc.configUrl }}
120120
- name: MINIO_IDENTITY_OPENID_CLIENT_ID
121+
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientIdKey }}
122+
valueFrom:
123+
secretKeyRef:
124+
name: {{ .Values.oidc.existingClientSecretName }}
125+
key: {{ .Values.oidc.existingClientIdKey }}
126+
{{- else }}
121127
value: {{ .Values.oidc.clientId }}
128+
{{- end }}
122129
- name: MINIO_IDENTITY_OPENID_CLIENT_SECRET
123130
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientSecretKey }}
124131
valueFrom:

helm/minio/templates/statefulset.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,14 @@ spec:
156156
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
157157
value: {{ .Values.oidc.configUrl }}
158158
- name: MINIO_IDENTITY_OPENID_CLIENT_ID
159+
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientIdKey }}
160+
valueFrom:
161+
secretKeyRef:
162+
name: {{ .Values.oidc.existingClientSecretName }}
163+
key: {{ .Values.oidc.existingClientIdKey }}
164+
{{- else }}
159165
value: {{ .Values.oidc.clientId }}
166+
{{- end }}
160167
- name: MINIO_IDENTITY_OPENID_CLIENT_SECRET
161168
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientSecretKey }}
162169
valueFrom:

helm/minio/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,9 @@ oidc:
486486
configUrl: "https://identity-provider-url/.well-known/openid-configuration"
487487
clientId: "minio"
488488
clientSecret: ""
489-
# Provide existing client secret from the Kubernetes Secret resource, existing secret will have priority over `clientSecret`
489+
# Provide existing client secret from the Kubernetes Secret resource, existing secret will have priority over `clientId` and/or `clientSecret``
490490
existingClientSecretName: ""
491+
existingClientIdKey: ""
491492
existingClientSecretKey: ""
492493
claimName: "policy"
493494
scopes: "openid,profile,email"

0 commit comments

Comments
 (0)