inital admin account

Signed-off-by: Roland.Ma <rolandma@yunify.com>
This commit is contained in:
Roland.Ma
2021-05-21 09:10:13 +00:00
parent 7b565e2412
commit f7d7ed55ff
2 changed files with 25 additions and 0 deletions

View File

@@ -61,3 +61,15 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Returns user's password or use default
*/}}
{{- define "getOrDefaultPass" }}
{{- $pws := (lookup "iam.kubesphere.io/v1alpha2" "User" "" .Name) -}}
{{- if $pws }}
{{- $pws.spec.password -}}
{{- else -}}
{{- .Default -}}
{{- end -}}
{{- end }}