{{- if and .Values.notifications.enabled .Values.notifications.secret.create }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "argo-cd.notifications.secretName" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
{{- if .Values.notifications.secret.annotations }}
annotations:
{{- range $key, $value := .Values.notifications.secret.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
type: Opaque
stringData:
{{- with .Values.notifications.secret.items }}
{{ toYaml . | nindent 2 }}