ArgoCD Notifications — notifications about ArgoCD events (sync, health, deploy).
Triggers:
1apiVersion: v12kind: ConfigMap3metadata:4 name: argocd-notifications-cm5 namespace: argocd6data:7 trigger.on-sync-succeeded: |-8 - when: app.status.operationState.phase in ["Succeeded"]9 send: [app-sync-succeeded]10 trigger.on-sync-failed: |-11 - when: app.status.operationState.phase in ["Error", "Failed"]12 send: [app-sync-failed]13 trigger.on-health-degraded: |-14 - when: app.status.health.status == "Degraded"15 send: [app-health-degraded]1617 template.app-sync-succeeded: |18 message: |19 Application {{.app.metadata.name}} sync succeeded.20 Revision: {{.app.status.sync.revision}}21 template.app-sync-failed: |22 message: |23 Application {{.app.metadata.name}} sync FAILED.24 Error: {{.app.status.operationState.message}}2526 service.slack: |27 token: $slack-token28 signingSecret: $slack-signing-secret2930 service.webhook.github: |31 url: https://api.github.com/repos/{owner}/{repo}/statuses/{revision}32 headers:33 - name: Authorization34 value: token $github-token
Application annotations (enabling):
1metadata:2 annotations:3 notifications.argoproj.io/subscribe.on-sync-succeeded.slack: "#deploys"4 notifications.argoproj.io/subscribe.on-sync-failed.slack: "#alerts"5 notifications.argoproj.io/subscribe.on-health-degraded.pagerduty: "service-key"
Services: Slack, GitHub, GitLab, Microsoft Teams, PagerDuty, OpsGenie, Email, Webhook.