{{- if .Values.filer.enabled }}
apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: {{ include "seaweedfs.fullname" . }}-db-secret
  namespace: {{ .Release.Namespace }}
  annotations:
    "helm.sh/resource-policy": keep
    "helm.sh/hook": "pre-install"
  labels:
    app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
    helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/instance: {{ .Release.Name }}
stringData:
  user: "YourSWUser"
  # auto-generated password
  password: {{ randAlphaNum 10 | sha256sum | b64enc | trunc 32 }}
{{- end }}
