Skip to content

Commit 788f70f

Browse files
authored
Merge pull request #47 from trick77/fix/argocd-drop-on-sync-succeeded
fix(argocd): drop on-sync-succeeded trigger to avoid reconcile-storm
2 parents 9450796 + cff964b commit 788f70f

2 files changed

Lines changed: 8 additions & 17 deletions

File tree

docs/argocd-notification-template.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ data:
3838
send: [app-deployed-riptide]
3939
when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
4040
41-
trigger.on-sync-succeeded: |
42-
- description: Sync succeeded
43-
oncePer: app.status.operationState.syncResult.revision
44-
send: [app-deployed-riptide]
45-
when: app.status.operationState.phase in ['Succeeded']
46-
4741
trigger.on-sync-failed: |
4842
- description: Sync failed
4943
oncePer: app.status.operationState.syncResult.revision

docs/setup-argocd-notification.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,14 @@ This adds:
9797
`.app.status.summary.images`). `images` is the bridge for joining Argo CD
9898
events to pipeline events: `revision` is the GitOps-repo SHA, but image
9999
tags typically embed the App-repo commit SHA that the pipeline reports.
100-
- `trigger.on-deployed`, `trigger.on-sync-succeeded`, `trigger.on-sync-failed`
101-
(riptide-flavored)
100+
- `trigger.on-deployed` and `trigger.on-sync-failed` (riptide-flavored).
101+
We do **not** ship `on-sync-succeeded`: every ArgoCD reconciliation
102+
enters a brief `Succeeded` operationState, which would flood the
103+
collector with thousands of no-op events. `on-deployed` already
104+
predicates on `health.status == 'Healthy'` and is the right primitive
105+
for "this revision actually rolled out". Apps without a health hook
106+
(CRDs, Jobs) should expose a health hook rather than reintroduce the
107+
noisier trigger.
102108

103109
> **Required field, hard cutover.** `images` is required on the receiver
104110
> side — webhooks rendered by an outdated ConfigMap will be rejected with
@@ -120,15 +126,6 @@ log pattern, plus a missing `notified.notifications.argoproj.io`
120126
annotation on the Application, is the canonical "no subscription matches
121127
this app" signature.
122128

123-
> **Why only `on-deployed` + `on-sync-failed`.** `on-deployed` already
124-
> covers the success path (sync `Succeeded` *and* health `Healthy`), so
125-
> adding `on-sync-succeeded` would just fire a second webhook for the same
126-
> event. Riptide deduplicates by `delivery_id`, so the second insert is
127-
> dropped, but you'd still see noise in logs and notifications-controller
128-
> traffic. If your team has Applications whose `health.status` never
129-
> reaches `Healthy` (CRDs without a health hook, Jobs, etc.), swap
130-
> `on-deployed` for `on-sync-succeeded` instead — never subscribe to both.
131-
132129
> **OpenShift GitOps gotcha.** On argocd-operator-managed ArgoCD (the
133130
> OpenShift GitOps stack), do **not** rely on
134131
> `spec.notifications.subscriptions` on the ArgoCD CR or on a global

0 commit comments

Comments
 (0)