diff --git a/README.md b/README.md index 110f64bd..1012d5aa 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,18 @@ [![build](https://travis-ci.org/stefanprodan/steerer.svg?branch=master)](https://travis-ci.org/stefanprodan/steerer) [![release](https://img.shields.io/github/release/stefanprodan/steerer/all.svg)](https://github.com/stefanprodan/steerer/releases) +[![report](https://goreportcard.com/badge/github.com/stefanprodan/steerer)](https://goreportcard.com/report/github.com/stefanprodan/steerer) [![license](https://img.shields.io/github/license/stefanprodan/steerer.svg)](https://github.com/stefanprodan/steerer/blob/master/LICENSE) Steerer is a Kubernetes operator that automates the promotion of canary deployments using Istio routing for traffic shifting and Prometheus metrics for canary analysis. +The project is currently in experimental phase and it is expected that breaking changes +to the API will be made in the upcoming releases. ### Install Before installing Steerer make sure you have Istio setup up with Prometheus enabled. -If you are new to Istio you can follow my [GKE service mesh walk-through](https://github.com/stefanprodan/istio-gke). +If you are new to Istio you can follow my [Istio service mesh walk-through](https://github.com/stefanprodan/istio-gke). Deploy Steerer in the `istio-system` namespace using Helm: @@ -25,6 +28,8 @@ helm upgrade --install steerer steerer/steerer \ --set controlLoopInterval=1m ``` +Steerer is compatible with Kubernetes >1.10.0 and Istio >1.0.0. + ### Usage Steerer requires two Kubernetes deployments: one for the version you want to upgrade called _primary_ and one for the _canary_. @@ -149,7 +154,7 @@ spec: The canary analysis is using the following promql queries: -HTTP requests success rate percentage: +_HTTP requests success rate percentage_ ```sql sum( @@ -174,7 +179,7 @@ sum( ) ``` -HTTP requests milliseconds duration P99: +_HTTP requests milliseconds duration P99_ ```sql histogram_quantile(0.99, @@ -190,7 +195,7 @@ histogram_quantile(0.99, ) ``` -### Automated canary analysis and promotion +### Automated canary analysis, promotions and rollbacks ![steerer-canary](https://github.com/stefanprodan/steerer/blob/master/docs/diagrams/steerer-canary-hpa.png) @@ -235,6 +240,10 @@ Rollout output: ``` kubectl -n test describe rollout/podinfo +Status: + Canary Revision: 16271121 + Failed Checks: 6 + State: finished Events: Type Reason Age From Message ---- ------ ---- ---- ------- @@ -306,3 +315,53 @@ Events: Warning Synced 1m steerer Rolling back podinfo-canary.test failed checks threshold reached 10 Warning Synced 1m steerer Canary failed! Scaling down podinfo.test ``` + +Trigger a new rollout by updating the canary image: + +```bash +kubectl -n test set image deployment/podinfo-canary \ +podinfod=quay.io/stefanprodan/podinfo:1.2.1 + +kubectl -n test scale deployment/podinfo-canary \ +--replicas=1 +``` + +Steer detects that the canary revision changed and starts a new rollout: + +``` +kubectl -n test describe rollout/podinfo + +Status: + Canary Revision: 16871136 + Failed Checks: 0 + State: finished +Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Normal Synced 3m steerer Waiting for podinfo.test rollout to finish: 0 of 1 updated replicas are available + Normal Synced 3m steerer Starting rollout for podinfo.test + Normal Synced 3m steerer Advance rollout podinfo.test weight 10 + Normal Synced 3m steerer Advance rollout podinfo.test weight 20 + Normal Synced 3m steerer Advance rollout podinfo.test weight 30 + Normal Synced 2m steerer Advance rollout podinfo.test weight 40 + Normal Synced 2m steerer Advance rollout podinfo.test weight 50 + Normal Synced 1m steerer Advance rollout podinfo.test weight 60 + Normal Synced 1m steerer Advance rollout podinfo.test weight 70 + Normal Synced 55s steerer Advance rollout podinfo.test weight 80 + Normal Synced 45s steerer Advance rollout podinfo.test weight 90 + Normal Synced 35s steerer Advance rollout podinfo.test weight 100 + Normal Synced 25s steerer Copying podinfo-canary.test template spec to podinfo.test + Warning Synced 15s steerer Waiting for podinfo.test rollout to finish: 1 of 2 updated replicas are available + Normal Synced 5s steerer Promotion completed! Scaling down podinfo-canary.test +``` + +### Contributing + +Steerer is Apache 2.0 licensed and accepts contributions via GitHub pull requests. + +When submitting bug reports please include as much details as possible: +* which Steerer version +* which Steerer CRD version +* which Kubernetes/Istio version +* what configuration (rollout, virtual service and workloads definitions) +* what happened (Steerer, Istio Pilot and Proxy logs) diff --git a/docs/diagrams/steerer-canary-hpa.png b/docs/diagrams/steerer-canary-hpa.png index 824c3170..a117b618 100644 Binary files a/docs/diagrams/steerer-canary-hpa.png and b/docs/diagrams/steerer-canary-hpa.png differ diff --git a/docs/diagrams/steerer-canary.png b/docs/diagrams/steerer-canary.png deleted file mode 100644 index de4ef0d1..00000000 Binary files a/docs/diagrams/steerer-canary.png and /dev/null differ diff --git a/docs/diagrams/steerer-overview.png b/docs/diagrams/steerer-overview.png index 7f059740..4a4e30af 100644 Binary files a/docs/diagrams/steerer-overview.png and b/docs/diagrams/steerer-overview.png differ diff --git a/docs/logo/icon-steerer.png b/docs/logo/icon-steerer.png new file mode 100644 index 00000000..0bd033e8 Binary files /dev/null and b/docs/logo/icon-steerer.png differ diff --git a/docs/logo/icon-steerer.svg b/docs/logo/icon-steerer.svg new file mode 100644 index 00000000..7fb3b681 --- /dev/null +++ b/docs/logo/icon-steerer.svg @@ -0,0 +1,20 @@ + + + + istio-refresh + Created with Sketch. + + + + + \ No newline at end of file diff --git a/docs/logo/logo-steerer-white.png b/docs/logo/logo-steerer-white.png new file mode 100644 index 00000000..f10a3f8c Binary files /dev/null and b/docs/logo/logo-steerer-white.png differ diff --git a/docs/logo/logo-steerer.png b/docs/logo/logo-steerer.png new file mode 100644 index 00000000..ecfe253e Binary files /dev/null and b/docs/logo/logo-steerer.png differ diff --git a/docs/logo/logo-steerer.svg b/docs/logo/logo-steerer.svg new file mode 100644 index 00000000..c8b93b69 --- /dev/null +++ b/docs/logo/logo-steerer.svg @@ -0,0 +1,21 @@ + + + + Logo + Created with Sketch. + + + + + \ No newline at end of file