aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/charts/grafana/templates/secret.yaml
blob: 5f176df23685b6e09664fe7379ce9e8004261191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{{- if and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "grafana.fullname" . }}
  namespace: {{ template "grafana.namespace" . }}
  labels:
    {{- include "grafana.labels" . | nindent 4 }}
type: Opaque
data:
  admin-user: {{ .Values.adminUser | b64enc | quote }}
  {{- if .Values.adminPassword }}
  admin-password: {{ .Values.adminPassword | b64enc | quote }}
  {{- else }}
  admin-password: {{ randAlphaNum 40 | b64enc | quote }}
  {{- end }}
  {{- if not .Values.ldap.existingSecret }}
  ldap-toml: {{ .Values.ldap.config | b64enc | quote }}
  {{- end }}
{{- end }}