apiVersion: v1
kind: Secret
metadata:
  name: {{ template "common.names.fullname" . }}
  labels: {{ include "common.labels" . | nindent 4 }}
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 }}
