apiVersion: v1
kind: Secret
metadata:
  name: {{ template "mssql.fullname" . }}-secret
  labels:
    app: {{ template "mssql.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  {{ if .Values.sapassword }}
  sapassword:  {{ .Values.sapassword | b64enc | quote }}
  {{ else }}
  sapassword: {{ randAlphaNum 20 | b64enc | quote }}
  {{ end }}