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:
stefanprodan
2019-04-13 15:43:23 +03:00
parent e0fc5ecb39
commit edcff9cd15
3 changed files with 54 additions and 8 deletions
+2 -1
View File
@@ -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 {