{{- if and (not .Values.email.existingSecret) (.Values.email.alert) }} --- apiVersion: v1 kind: Secret metadata: name: {{ include "semaphoreui.fullname" . }}-email namespace: {{ .Release.Namespace }} labels: {{- include "semaphoreui.labels" . | nindent 4 }} {{- if .Values.labels }} {{- toYaml .Values.labels | nindent 4 }} {{- end }} {{- if .Values.annotations }} annotations: {{- toYaml .Values.annotations | nindent 4 }} {{- end }} type: Opaque data: {{ .Values.email.usernameKey }}: {{ .Values.email.username | b64enc }} {{ .Values.email.passwordKey }}: {{ .Values.email.password | b64enc }} {{- end }}