Skip to content

Commit

Permalink
Document webhooks status codes
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Jan 3, 2019
1 parent 083556b commit 13fffe1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/gitbook/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ And the time it takes for a canary to be rollback:
controlLoopInterval * threshold
```

#### HTTP Metrics
### HTTP Metrics

The canary analysis is using the following Prometheus queries:

Expand Down Expand Up @@ -205,7 +205,7 @@ histogram_quantile(0.99,
)
```

#### Webhooks
### Webhooks

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.
Expand Down Expand Up @@ -234,6 +234,13 @@ Webhook payload:
"token": "16688eb5e9f289f1991c"
}
}
```

Response status codes:

* 200-202 - advance canary by increasing the traffic weight
* timeout or non-2xx - halt advancement and increment failed checks

On a non-2xx response Flagger will include the response body (if any) in the failed checks log and Kubernetes events.


0 comments on commit 13fffe1

Please sign in to comment.