From 5d0939af7d7c69e5262cf90ddd7a2126d88d9ff9 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 3 Jan 2019 16:11:30 +0200 Subject: [PATCH] Add webhook docs --- README.md | 19 ++++++++++++++++++- docs/gitbook/how-it-works.md | 23 +++++++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cf1b9d70..5910ad9b 100644 --- a/README.md +++ b/README.md @@ -126,9 +126,10 @@ spec: webhooks: - name: integration-tests url: http://podinfo.test:9898/echo - timeout: 5s + timeout: 1m metadata: test: "all" + token: "16688eb5e9f289f1991c" ``` The canary analysis is using the following promql queries: @@ -174,6 +175,22 @@ histogram_quantile(0.99, ) ``` +The canary analysis can be extended with webhooks. +Flagger would call a URL (HTTP POST) and determine from the response status code (HTTP 2xx) if the canary is failing or not. + +Webhook payload: + +```json +{ + "name": "podinfo", + "namespace": "test", + "metadata": { + "test": "all", + "token": "16688eb5e9f289f1991c" + } +} +``` + ### Automated canary analysis, promotions and rollbacks Create a test namespace with Istio sidecar injection enabled: diff --git a/docs/gitbook/how-it-works.md b/docs/gitbook/how-it-works.md index bbf66335..2a311dd5 100644 --- a/docs/gitbook/how-it-works.md +++ b/docs/gitbook/how-it-works.md @@ -62,9 +62,10 @@ spec: webhooks: - name: integration-tests url: http://podinfo.test:9898/echo - timeout: 5s + timeout: 1m metadata: test: "all" + token: "16688eb5e9f289f1991c" ``` ### Canary Deployment @@ -105,7 +106,7 @@ You can change the canary analysis _max weight_ and the _step weight_ percentage ### Canary Analisys - The canary analysis is using the following Prometheus queries: +The canary analysis is using the following Prometheus queries: **HTTP requests success rate percentage** @@ -148,3 +149,21 @@ histogram_quantile(0.99, ) ``` + +The canary analysis can be extended with webhooks. +Flagger would call a URL (HTTP POST) and determine from the response status code (HTTP 2xx) if the canary is failing or not. + +Webhook payload: + +```json +{ + "name": "podinfo", + "namespace": "test", + "metadata": { + "test": "all", + "token": "16688eb5e9f289f1991c" + } +} + + +