{{- if ($.Values.customSecrets).enabled }} {{- if hasKey .Values.customSecrets "admin" }} {{- with $.Values.customSecrets.admin }} {{- if .enabled }} apiVersion: v1 kind: Secret metadata: name: {{ include "admin.secretName" $ }} namespace: {{ $.Release.Namespace }} type: Opaque data: password: {{ .password | required "customSecrets.admin.password is required!" | b64enc }} {{- end }} {{- end }} {{- end }} {{- end }}