mirror of https://git.rancher.io/charts
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
--- charts-original/templates/secret.yaml
|
|
+++ charts/templates/secret.yaml
|
|
@@ -1,4 +1,4 @@
|
|
-{{- if or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret)) }}
|
|
+{{- if and (or (and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD)) (and .Values.ldap.enabled (not .Values.ldap.existingSecret))) (not .Values.env.GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION) }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
@@ -6,6 +6,10 @@
|
|
namespace: {{ template "grafana.namespace" . }}
|
|
labels:
|
|
{{- include "grafana.labels" . | nindent 4 }}
|
|
+{{- with .Values.annotations }}
|
|
+ annotations:
|
|
+{{ toYaml . | indent 4 }}
|
|
+{{- end }}
|
|
type: Opaque
|
|
data:
|
|
{{- if and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) }}
|
|
@@ -13,7 +17,7 @@
|
|
{{- if .Values.adminPassword }}
|
|
admin-password: {{ .Values.adminPassword | b64enc | quote }}
|
|
{{- else }}
|
|
- admin-password: {{ randAlphaNum 40 | b64enc | quote }}
|
|
+ admin-password: {{ template "grafana.password" . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if not .Values.ldap.existingSecret }}
|