helm-charts/nextcloud/templates/secrets.yaml

22 lines
832 B
YAML
Raw Normal View History

2021-01-17 01:09:41 +00:00
apiVersion: v1
kind: Secret
metadata:
name: {{ template "nextcloud.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
helm.sh/chart: {{ include "nextcloud.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
nextcloud-username: {{ .Values.nextcloud.username | b64enc | quote }}
{{ if .Values.nextcloud.password }}
nextcloud-password: {{ .Values.nextcloud.password | b64enc | quote }}
{{ else }}
nextcloud-password: {{ randAlphaNum 10 | b64enc | quote }}
{{ end }}
{{- if .Values.nextcloud.mail.enabled }}
smtp-username: {{ default "" .Values.nextcloud.mail.smtp.name | b64enc | quote }}
smtp-password: {{ default "" .Values.nextcloud.mail.smtp.password | b64enc | quote }}
{{- end }}