{{- if .Values.auth.enabled }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "nats.fullname" . }}-clients-auth
  namespace: {{ .Release.Namespace }}
  labels:
    app: "{{ template "nats.name" . }}"
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
    test: "{{ .Values.auth.password }}"
type: Opaque
data:
  clients-auth.json: {{ (tpl (.Files.Get "config/client-auth.json") . ) | b64enc }}
{{- end }}

{{- if .Values.auth.enabled }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "nats.fullname" . }}-clients-auth
  namespace: {{ .Release.Namespace }}
  labels:
    app: "{{ template "nats.name" . }}"
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
type: Opaque
data:
  clients-auth.json: {{ (tpl (.Files.Get "config/client-auth.json") . ) | b64enc }}
{{- end }}

Remove password from Secret metadata
Remove password from Secret metadata
