{{- if and .Values.chart.secret.enabled (not .Values.chart.secret.existingSecretName) .Values.chart.secret.data }} apiVersion: v1 kind: Secret metadata: name: {{ include "fullname" . }}-secret labels: {{- include "labels" . | nindent 4 }} type: Opaque data: {{- range $key, $value := .Values.chart.secret.data }} {{ $key }}: {{ $value | b64enc | quote }} {{- end }} {{- end }}