Split `post-rollout` webhook into two different webhooks for success and failure
Describe the feature
We currently have the post-rollout webhook, which runs if a canary analysis passes or fails. But it can be useful to have a webhook that just executes if a canary passes and similarly a webhook that executes only if a canary fails.
Proposed solution
- Deprecate the
post-rollouthook. - Introduce two new webhook types:
successandfailure - Run
successwebhooks when a canary passes andfailurewebhooks when a canary fails; if the spec definespost-rolloutwebhook(s), then run them when a canary passes or fails.
+1
This is something I did run into lately too. Currently flagger webhooks doesn't provide a way to run after successful promotion. In my case I want to trigger cache purge only if rollout ended successfully and the feature request above covers that.
+1
the webhook payload contains a field phase that contains the phase of the canary run. for the post-rollout webhook, the phase will be Succeeded if the run succeeded, or Failed if it failed. users can read the value of phase and execute logic accordingly. hence, this "enhancement" is not required.
Hi @aryan9600 , thanks for your answer. Do you have some example ?