23 lines
724 B
YAML
23 lines
724 B
YAML
{{- if (eq (include "cost-analyzer.grafanaEnabled" .) "true") }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ template "grafana.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app: {{ template "grafana.name" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
type: Opaque
|
|
data:
|
|
admin-user: {{ .Values.grafana.adminUser | b64enc | quote }}
|
|
{{- if .Values.grafana.adminPassword }}
|
|
admin-password: {{ .Values.grafana.adminPassword | b64enc | quote }}
|
|
{{- else }}
|
|
admin-password: {{ randAlphaNum 40 | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if not .Values.grafana.ldap.existingSecret }}
|
|
ldap-toml: {{ .Values.grafana.ldap.config | b64enc | quote }}
|
|
{{- end }}
|
|
{{ end }}
|