mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Execute pre/post rollout webhooks
- halt the canary advancement if pre-rollout hooks are failing - include the canary status (Succeeded/Failed) in the post-rollout webhook payload - ignore post-rollout webhook failures - log pre/post rollout webhook response result
This commit is contained in:
@@ -15,10 +15,11 @@ import (
|
||||
|
||||
// CallWebhook does a HTTP POST to an external service and
|
||||
// returns an error if the response status code is non-2xx
|
||||
func CallWebhook(name string, namespace string, w flaggerv1.CanaryWebhook) error {
|
||||
func CallWebhook(name string, namespace string, phase flaggerv1.CanaryPhase, w flaggerv1.CanaryWebhook) error {
|
||||
payload := flaggerv1.CanaryWebhookPayload{
|
||||
Name: name,
|
||||
Namespace: namespace,
|
||||
Phase: phase,
|
||||
}
|
||||
|
||||
if w.Metadata != nil {
|
||||
|
||||
Reference in New Issue
Block a user