We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a03482 commit c82ee6dCopy full SHA for c82ee6d
charts/templates/secret.yaml
@@ -1,3 +1,9 @@
1
+{{- $adminPassword := (randAlphaNum 8) | b64enc | quote }}
2
+{{- $secret := (lookup "v1" "Secret" .Release.Namespace .Release.Name ) }}
3
+{{- if $secret }}
4
+{{- $adminPassword = index $secret.data "password" }}
5
+{{- end -}}
6
+
7
apiVersion: v1
8
kind: Secret
9
metadata:
@@ -6,6 +12,11 @@ metadata:
12
labels:
13
{{- include "marklogic.labels" . | nindent 4 }}
14
type: kubernetes.io/basic-auth
15
+data:
16
+ {{- if .Values.auth.adminPassword }}
17
+ password: {{ .Values.auth.adminPassword }}
18
+ {{- else }}
19
+ password: {{ $adminPassword }}
20
+ {{- end }}
21
stringData:
10
22
username: {{ .Values.auth.adminUsername}}
11
- password: {{ .Values.auth.adminPassword}}
0 commit comments