{{- if (include "grafana.createSMTPSecret" .) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "common.names.fullname" . }}-smtp
  namespace: {{ .Release.Namespace }}
  labels: {{- include "common.labels.standard" . | nindent 4 }}
    app.kubernetes.io/component: grafana
type: Opaque
data:
  GF_SMTP_USER: {{ .Values.smtp.user | b64enc | quote }}
  GF_SMTP_PASSWORD: {{ .Values.smtp.password | b64enc | quote }}
{{- end }}
