{{- if and (.Values.outgoingSMTP.enabled) (not .Values.outgoingSMTP.existingSecret) -}} apiVersion: v1 kind: Secret metadata: labels: {{- include "mailhog.labels" . | nindent 4 }} name: {{ template "mailhog.outgoingSMTPSecret" . }} namespace: {{ .Release.Namespace | quote }} type: Opaque data: {{ .Values.outgoingSMTP.fileName }}: {{ .Values.outgoingSMTP.fileContents | toJson | b64enc }} {{- end -}}