aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/deploy/visualization/charts/grafana/templates/secret.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/deploy/visualization/charts/grafana/templates/secret.yaml')
-rwxr-xr-xvnfs/DAaaS/deploy/visualization/charts/grafana/templates/secret.yaml22
1 files changed, 22 insertions, 0 deletions
diff --git a/vnfs/DAaaS/deploy/visualization/charts/grafana/templates/secret.yaml b/vnfs/DAaaS/deploy/visualization/charts/grafana/templates/secret.yaml
new file mode 100755
index 00000000..a1ea5798
--- /dev/null
+++ b/vnfs/DAaaS/deploy/visualization/charts/grafana/templates/secret.yaml
@@ -0,0 +1,22 @@
+{{- if not .Values.admin.existingSecret }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ template "grafana.fullname" . }}
+ labels:
+ app: {{ template "grafana.name" . }}
+ chart: {{ template "grafana.chart" . }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+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 }}