From 3b8c2858705d9f902464751abdfecf72b92220e1 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Tue, 18 Feb 2020 18:13:20 +0200 Subject: [PATCH] Move examples to tutorials docs --- .gitbook.yaml | 13 ++++- docs/gitbook/SUMMARY.md | 22 ++++---- .../appmesh-progressive-delivery.md | 0 .../contour-progressive-delivery.md | 0 .../crossover-progressive-delivery.md | 0 .../gloo-progressive-delivery.md | 0 .../istio-ab-testing.md} | 0 .../istio-progressive-delivery.md} | 0 .../kubernetes-blue-green.md} | 0 .../linkerd-progressive-delivery.md | 0 .../nginx-progressive-delivery.md | 0 docs/gitbook/usage/alerting.md | 52 ------------------ docs/gitbook/usage/monitoring.md | 53 +++++++++++++++++++ 13 files changed, 77 insertions(+), 63 deletions(-) rename docs/gitbook/{usage => tutorials}/appmesh-progressive-delivery.md (100%) rename docs/gitbook/{usage => tutorials}/contour-progressive-delivery.md (100%) rename docs/gitbook/{usage => tutorials}/crossover-progressive-delivery.md (100%) rename docs/gitbook/{usage => tutorials}/gloo-progressive-delivery.md (100%) rename docs/gitbook/{usage/ab-testing.md => tutorials/istio-ab-testing.md} (100%) rename docs/gitbook/{usage/progressive-delivery.md => tutorials/istio-progressive-delivery.md} (100%) rename docs/gitbook/{usage/blue-green.md => tutorials/kubernetes-blue-green.md} (100%) rename docs/gitbook/{usage => tutorials}/linkerd-progressive-delivery.md (100%) rename docs/gitbook/{usage => tutorials}/nginx-progressive-delivery.md (100%) diff --git a/.gitbook.yaml b/.gitbook.yaml index 184ffc3d..ef0ea31a 100644 --- a/.gitbook.yaml +++ b/.gitbook.yaml @@ -1 +1,12 @@ -root: ./docs/gitbook \ No newline at end of file +root: ./docs/gitbook + +redirects: + usage/progressive-delivery: tutorials/istio-progressive-delivery.md + usage/ab-testing: tutorials/istio-ab-testing.md + usage/blue-green: tutorials/kubernetes-blue-green.md + usage/appmesh-progressive-delivery: tutorials/appmesh-progressive-delivery.md + usage/linkerd-progressive-delivery: tutorials/linkerd-progressive-delivery.md + usage/contour-progressive-delivery: tutorials/contour-progressive-delivery.md + usage/gloo-progressive-delivery: tutorials/gloo-progressive-delivery.md + usage/nginx-progressive-delivery: tutorials/nginx-progressive-delivery.md + usage/crossover-progressive-delivery: tutorials/crossover-progressive-delivery.md diff --git a/docs/gitbook/SUMMARY.md b/docs/gitbook/SUMMARY.md index cabaf9dc..9566f601 100644 --- a/docs/gitbook/SUMMARY.md +++ b/docs/gitbook/SUMMARY.md @@ -3,6 +3,7 @@ * [Introduction](README.md) * [How it works](how-it-works.md) * [FAQ](faq.md) +* [Development guide](dev-guide.md) ## Install @@ -13,20 +14,21 @@ ## Usage -* [Istio Canary Deployments](usage/progressive-delivery.md) -* [Istio A/B Testing](usage/ab-testing.md) -* [Linkerd Canary Deployments](usage/linkerd-progressive-delivery.md) -* [App Mesh Canary Deployments](usage/appmesh-progressive-delivery.md) -* [NGINX Canary Deployments](usage/nginx-progressive-delivery.md) -* [Gloo Canary Deployments](usage/gloo-progressive-delivery.md) -* [Contour Canary Deployments](usage/contour-progressive-delivery.md) -* [Crossover Canary Deployments](usage/crossover-progressive-delivery.md) -* [Blue/Green Deployments](usage/blue-green.md) -* [Monitoring](usage/monitoring.md) +* [Deployment Strategies](usage/deployment-strategies.md) * [Alerting](usage/alerting.md) +* [Monitoring](usage/monitoring.md) ## Tutorials +* [Istio Canary Deployments](tutorials/istio-progressive-delivery.md) +* [Istio A/B Testing](tutorials/istio-ab-testing.md) +* [Linkerd Canary Deployments](tutorials/linkerd-progressive-delivery.md) +* [App Mesh Canary Deployments](tutorials/appmesh-progressive-delivery.md) +* [NGINX Canary Deployments](tutorials/nginx-progressive-delivery.md) +* [Gloo Canary Deployments](tutorials/gloo-progressive-delivery.md) +* [Contour Canary Deployments](tutorials/contour-progressive-delivery.md) +* [Blue/Green Deployments](tutorials/kubernetes-blue-green.md) +* [Crossover Canary Deployments](tutorials/crossover-progressive-delivery.md) * [SMI Istio Canary Deployments](tutorials/flagger-smi-istio.md) * [Canaries with Helm charts and GitOps](tutorials/canary-helm-gitops.md) * [Zero downtime deployments](tutorials/zero-downtime-deployments.md) diff --git a/docs/gitbook/usage/appmesh-progressive-delivery.md b/docs/gitbook/tutorials/appmesh-progressive-delivery.md similarity index 100% rename from docs/gitbook/usage/appmesh-progressive-delivery.md rename to docs/gitbook/tutorials/appmesh-progressive-delivery.md diff --git a/docs/gitbook/usage/contour-progressive-delivery.md b/docs/gitbook/tutorials/contour-progressive-delivery.md similarity index 100% rename from docs/gitbook/usage/contour-progressive-delivery.md rename to docs/gitbook/tutorials/contour-progressive-delivery.md diff --git a/docs/gitbook/usage/crossover-progressive-delivery.md b/docs/gitbook/tutorials/crossover-progressive-delivery.md similarity index 100% rename from docs/gitbook/usage/crossover-progressive-delivery.md rename to docs/gitbook/tutorials/crossover-progressive-delivery.md diff --git a/docs/gitbook/usage/gloo-progressive-delivery.md b/docs/gitbook/tutorials/gloo-progressive-delivery.md similarity index 100% rename from docs/gitbook/usage/gloo-progressive-delivery.md rename to docs/gitbook/tutorials/gloo-progressive-delivery.md diff --git a/docs/gitbook/usage/ab-testing.md b/docs/gitbook/tutorials/istio-ab-testing.md similarity index 100% rename from docs/gitbook/usage/ab-testing.md rename to docs/gitbook/tutorials/istio-ab-testing.md diff --git a/docs/gitbook/usage/progressive-delivery.md b/docs/gitbook/tutorials/istio-progressive-delivery.md similarity index 100% rename from docs/gitbook/usage/progressive-delivery.md rename to docs/gitbook/tutorials/istio-progressive-delivery.md diff --git a/docs/gitbook/usage/blue-green.md b/docs/gitbook/tutorials/kubernetes-blue-green.md similarity index 100% rename from docs/gitbook/usage/blue-green.md rename to docs/gitbook/tutorials/kubernetes-blue-green.md diff --git a/docs/gitbook/usage/linkerd-progressive-delivery.md b/docs/gitbook/tutorials/linkerd-progressive-delivery.md similarity index 100% rename from docs/gitbook/usage/linkerd-progressive-delivery.md rename to docs/gitbook/tutorials/linkerd-progressive-delivery.md diff --git a/docs/gitbook/usage/nginx-progressive-delivery.md b/docs/gitbook/tutorials/nginx-progressive-delivery.md similarity index 100% rename from docs/gitbook/usage/nginx-progressive-delivery.md rename to docs/gitbook/tutorials/nginx-progressive-delivery.md diff --git a/docs/gitbook/usage/alerting.md b/docs/gitbook/usage/alerting.md index be6f46c8..17fe1531 100644 --- a/docs/gitbook/usage/alerting.md +++ b/docs/gitbook/usage/alerting.md @@ -53,55 +53,3 @@ Besides Slack, you can use Alertmanager to trigger alerts when a canary deployme description: "Workload {{ $labels.name }} namespace {{ $labels.namespace }}" ``` -### Event Webhook - -Flagger can be configured to send event payloads to a specified webhook: - -```bash -helm upgrade -i flagger flagger/flagger \ ---set eventWebhook=https://example.com/flagger-canary-event-webhook -``` - -The environment variable *EVENT_WEBHOOK_URL* can be used for activating the event-webhook, too. -This is handy for using a secret to store a sensible value that could contain api keys for example. - -When configured, every action that Flagger takes during a canary deployment will be sent as JSON via an HTTP POST -request. The JSON payload has the following schema: - -```json -{ - "name": "string (canary name)", - "namespace": "string (canary namespace)", - "phase": "string (canary phase)", - "metadata": { - "eventMessage": "string (canary event message)", - "eventType": "string (canary event type)", - "timestamp": "string (unix timestamp ms)" - } -} -``` - -Example: - -```json -{ - "name": "podinfo", - "namespace": "default", - "phase": "Progressing", - "metadata": { - "eventMessage": "New revision detected! Scaling up podinfo.default", - "eventType": "Normal", - "timestamp": "1578607635167" - } -} -``` - -The event webhook can be overwritten at canary level with: - -```yaml - canaryAnalysis: - webhooks: - - name: "send to Slack" - type: event - url: http://event-recevier.notifications/slack -``` diff --git a/docs/gitbook/usage/monitoring.md b/docs/gitbook/usage/monitoring.md index 4f60151f..d1c37043 100644 --- a/docs/gitbook/usage/monitoring.md +++ b/docs/gitbook/usage/monitoring.md @@ -40,6 +40,59 @@ Scaling down podinfo.test Promotion completed! podinfo.test ``` +### Event Webhook + +Flagger can be configured to send event payloads to a specified webhook: + +```bash +helm upgrade -i flagger flagger/flagger \ +--set eventWebhook=https://example.com/flagger-canary-event-webhook +``` + +The environment variable *EVENT_WEBHOOK_URL* can be used for activating the event-webhook, too. +This is handy for using a secret to store a sensible value that could contain api keys for example. + +When configured, every action that Flagger takes during a canary deployment will be sent as JSON via an HTTP POST +request. The JSON payload has the following schema: + +```json +{ + "name": "string (canary name)", + "namespace": "string (canary namespace)", + "phase": "string (canary phase)", + "metadata": { + "eventMessage": "string (canary event message)", + "eventType": "string (canary event type)", + "timestamp": "string (unix timestamp ms)" + } +} +``` + +Example: + +```json +{ + "name": "podinfo", + "namespace": "default", + "phase": "Progressing", + "metadata": { + "eventMessage": "New revision detected! Scaling up podinfo.default", + "eventType": "Normal", + "timestamp": "1578607635167" + } +} +``` + +The event webhook can be overwritten at canary level with: + +```yaml + canaryAnalysis: + webhooks: + - name: "send to Slack" + type: event + url: http://event-recevier.notifications/slack +``` + ### Metrics Flagger exposes Prometheus metrics that can be used to determine the canary analysis status and