# helm_charts_sasl-scram-secret.yaml
{{-  if and .Values.sasl.scram.enabled (not (hasKey .Values.sasl.scram "useExistingSecret")) -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "schema-registry.fullname" . }}-sasl-scram-secret
  labels:
    app: {{ template "schema-registry.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  scram-client-password: {{ .Values.sasl.scram.clientPassword | b64enc }}
  zookeeper-client-password: {{ .Values.sasl.scram.zookeeperClientPassword | b64enc }}
{{- end -}}