{{- if .Values.auth.enabled }} apiVersion: v1 kind: Secret metadata: name: {{ include "registry.fullname" . }}-auth type: Opaque stringData: htpasswd: | {{- if .Values.auth.htpasswd }} {{ .Values.auth.htpasswd | indent 4 }} {{- else }} {{ (htpasswd .Values.auth.username .Values.auth.password) | indent 4 }} {{- end }} {{- end }}