From 3fe8119e0c24727dc2b650a8a43cd98e92f7948a Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Mon, 4 Jan 2021 21:35:54 +0200 Subject: [PATCH] Set Kubernetes min version to 1.16 Signed-off-by: Stefan Prodan --- charts/flagger/Chart.yaml | 2 +- charts/flagger/README.md | 7 +- docs/gitbook/README.md | 2 +- .../install/flagger-install-on-eks-appmesh.md | 15 +++-- .../install/flagger-install-on-kubernetes.md | 67 ++++++------------- .../tutorials/appmesh-progressive-delivery.md | 45 +++++++++---- .../tutorials/contour-progressive-delivery.md | 10 +-- .../crossover-progressive-delivery.md | 4 +- .../tutorials/gloo-progressive-delivery.md | 6 +- docs/gitbook/tutorials/istio-ab-testing.md | 8 +-- .../tutorials/istio-progressive-delivery.md | 8 +-- .../tutorials/kubernetes-blue-green.md | 6 +- .../tutorials/linkerd-progressive-delivery.md | 8 +-- .../tutorials/nginx-progressive-delivery.md | 4 +- docs/gitbook/tutorials/prometheus-operator.md | 15 +++-- .../tutorials/skipper-progressive-delivery.md | 6 +- .../tutorials/traefik-progressive-delivery.md | 4 +- docs/gitbook/usage/how-it-works.md | 2 +- docs/gitbook/usage/webhooks.md | 2 +- test/linkerd/test-canary.sh | 2 +- 20 files changed, 115 insertions(+), 108 deletions(-) diff --git a/charts/flagger/Chart.yaml b/charts/flagger/Chart.yaml index ea928667..4996ce05 100644 --- a/charts/flagger/Chart.yaml +++ b/charts/flagger/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 name: flagger version: 1.5.0 appVersion: 1.5.0 -kubeVersion: ">=1.11.0-0" +kubeVersion: ">=1.16.0-0" engine: gotpl description: Flagger is a progressive delivery operator for Kubernetes home: https://flagger.app diff --git a/charts/flagger/README.md b/charts/flagger/README.md index 9c297ff2..d7a53c0a 100644 --- a/charts/flagger/README.md +++ b/charts/flagger/README.md @@ -7,12 +7,13 @@ Flagger can run automated application analysis, testing, promotion and rollback * A/B Testing (HTTP headers and cookies traffic routing) * Blue/Green (traffic switching and mirroring) -Flagger works with service mesh solutions (Istio, Linkerd, AWS App Mesh) and with Kubernetes ingress controllers (NGINX, Skipper, Gloo, Contour, Traefik). +Flagger works with service mesh solutions (Istio, Linkerd, AWS App Mesh) and with Kubernetes ingress controllers +(NGINX, Skipper, Gloo, Contour, Traefik). Flagger can be configured to send alerts to various chat platforms such as Slack, Microsoft Teams, Discord and Rocket. ## Prerequisites -* Kubernetes >= 1.14 +* Kubernetes >= 1.16 ## Installing the Chart @@ -87,7 +88,7 @@ To install Flagger and Prometheus for **Traefik**: ```console $ helm upgrade -i flagger flagger/flagger \ - --namespace traefik \ + --namespace=traefik \ --set prometheus.install=true \ --set meshProvider=traefik ``` diff --git a/docs/gitbook/README.md b/docs/gitbook/README.md index 9e1d8e51..fc7d67c2 100644 --- a/docs/gitbook/README.md +++ b/docs/gitbook/README.md @@ -4,7 +4,7 @@ description: Flagger is a progressive delivery Kubernetes operator # Introduction -[Flagger](https://github.com/weaveworks/flagger) is a **Kubernetes** operator that automates the promotion of canary deployments using **Istio**, **Linkerd**, **App Mesh**, **NGINX**, **Skipper**, **Contour**, **Gloo** or **Traefik** routing for traffic shifting and **Prometheus** metrics for canary analysis. The canary analysis can be extended with webhooks for running system integration/acceptance tests, load tests, or any other custom validation. +[Flagger](https://github.com/fluxcd/flagger) is a **Kubernetes** operator that automates the promotion of canary deployments using **Istio**, **Linkerd**, **App Mesh**, **NGINX**, **Skipper**, **Contour**, **Gloo** or **Traefik** routing for traffic shifting and **Prometheus** metrics for canary analysis. The canary analysis can be extended with webhooks for running system integration/acceptance tests, load tests, or any other custom validation. Flagger implements a control loop that gradually shifts traffic to the canary while measuring key performance indicators like HTTP requests success rate, requests average duration and pods health. Based on analysis of the **KPIs** a canary is promoted or aborted, and the analysis result is published to **Slack** or **MS Teams**. diff --git a/docs/gitbook/install/flagger-install-on-eks-appmesh.md b/docs/gitbook/install/flagger-install-on-eks-appmesh.md index fa4b8575..70d8a9c9 100644 --- a/docs/gitbook/install/flagger-install-on-eks-appmesh.md +++ b/docs/gitbook/install/flagger-install-on-eks-appmesh.md @@ -16,7 +16,8 @@ The App Mesh integration with EKS is made out of the following components: ## Create a Kubernetes cluster -In order to create an EKS cluster you can use [eksctl](https://eksctl.io). Eksctl is an open source command-line utility made by Weaveworks in collaboration with Amazon. +In order to create an EKS cluster you can use [eksctl](https://eksctl.io). +Eksctl is an open source command-line utility made by Weaveworks in collaboration with Amazon. On MacOS you can install eksctl with Homebrew: @@ -35,7 +36,9 @@ eksctl create cluster --name=appmesh \ --appmesh-access ``` -The above command will create a two nodes cluster with App Mesh [IAM policy](https://docs.aws.amazon.com/app-mesh/latest/userguide/MESH_IAM_user_policies.html) attached to the EKS node instance role. +The above command will create a two nodes cluster with +App Mesh [IAM policy](https://docs.aws.amazon.com/app-mesh/latest/userguide/MESH_IAM_user_policies.html) +attached to the EKS node instance role. Verify the install with: @@ -59,7 +62,7 @@ helm repo add eks https://aws.github.io/eks-charts ## Enable horizontal pod auto-scaling -Install the Horizontal Pod Autoscaler \(HPA\) metrics provider: +Install the Horizontal Pod Autoscaler (HPA) metrics provider: ```bash helm upgrade -i metrics-server stable/metrics-server \ @@ -94,7 +97,8 @@ helm upgrade -i appmesh-controller eks/appmesh-controller \ --wait --namespace appmesh-system ``` -In order to collect the App Mesh metrics that Flagger needs to run the canary analysis, you'll need to setup a Prometheus instance to scrape the Envoy sidecars. +In order to collect the App Mesh metrics that Flagger needs to run the canary analysis, +you'll need to setup a Prometheus instance to scrape the Envoy sidecars. Install the App Mesh Prometheus: @@ -142,5 +146,6 @@ You can access Grafana using port forwarding: kubectl -n appmesh-system port-forward svc/appmesh-grafana 3000:3000 ``` -Now that you have Flagger running, you can try the [App Mesh canary deployments tutorial](https://docs.flagger.app/usage/appmesh-progressive-delivery). +Now that you have Flagger running, you can try the +[App Mesh canary deployments tutorial](https://docs.flagger.app/usage/appmesh-progressive-delivery). diff --git a/docs/gitbook/install/flagger-install-on-kubernetes.md b/docs/gitbook/install/flagger-install-on-kubernetes.md index d66e8cd3..01ba5ef3 100644 --- a/docs/gitbook/install/flagger-install-on-kubernetes.md +++ b/docs/gitbook/install/flagger-install-on-kubernetes.md @@ -4,7 +4,7 @@ This guide walks you through setting up Flagger on a Kubernetes cluster with Hel ## Prerequisites -Flagger requires a Kubernetes cluster **v1.14** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer. ## Install Flagger with Helm @@ -30,9 +30,12 @@ helm upgrade -i flagger flagger/flagger \ --set metricsServer=http://prometheus:9090 ``` -Note that Flagger depends on Istio telemetry and Prometheus, if you're installing Istio with istioctl then you should be using the [default profile](https://istio.io/docs/setup/additional-setup/config-profiles/). +Note that Flagger depends on Istio telemetry and Prometheus, if you're installing +Istio with istioctl then you should be using the +[default profile](https://istio.io/docs/setup/additional-setup/config-profiles/). -For Istio multi-cluster shared control plane you can install Flagger on each remote cluster and set the Istio control plane host cluster kubeconfig: +For Istio multi-cluster shared control plane you can install Flagger on each remote cluster and set the +Istio control plane host cluster kubeconfig: ```bash helm upgrade -i flagger flagger/flagger \ @@ -44,7 +47,9 @@ helm upgrade -i flagger flagger/flagger \ --set istio.kubeconfig.key=kubeconfig ``` -Note that the Istio kubeconfig must be stored in a Kubernetes secret with a data key named `kubeconfig`. For more details on how to configure Istio multi-cluster credentials read the [Istio docs](https://istio.io/docs/setup/install/multicluster/shared-vpn/#credentials). +Note that the Istio kubeconfig must be stored in a Kubernetes secret with a data key named `kubeconfig`. +For more details on how to configure Istio multi-cluster +credentials read the [Istio docs](https://istio.io/docs/setup/install/multicluster/shared-vpn/#credentials). Deploy Flagger for Linkerd: @@ -76,26 +81,6 @@ For ingress controllers, the install instructions are: * [Skipper](https://docs.flagger.app/tutorials/skipper-progressive-delivery) * [Traefik](https://docs.flagger.app/tutorials/traefik-progressive-delivery) -Enable **Slack** notifications: - -```bash -helm upgrade -i flagger flagger/flagger \ ---namespace=istio-system \ ---set crd.create=false \ ---set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \ ---set slack.channel=general \ ---set slack.user=flagger -``` - -Enable **Microsoft Teams** notifications: - -```bash -helm upgrade -i flagger flagger/flagger \ ---namespace=istio-system \ ---set crd.create=false \ ---set msteams.url=https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK -``` - You can use the helm template command and apply the generated yaml with kubectl: ```bash @@ -118,7 +103,8 @@ helm delete flagger The command removes all the Kubernetes components associated with the chart and deletes the release. -> **Note** that on uninstall the Canary CRD will not be removed. Deleting the CRD will make Kubernetes remove all the objects owned by Flagger like Istio virtual services, Kubernetes deployments and ClusterIP services. +> **Note** that on uninstall the Canary CRD will not be removed. Deleting the CRD will make Kubernetes +> remove all the objects owned by Flagger like Istio virtual services, Kubernetes deployments and ClusterIP services. If you want to remove all the objects created by Flagger you have delete the Canary CRD with kubectl: @@ -168,13 +154,13 @@ As an alternative to Helm, Flagger can be installed with Kustomize **3.5.0** or Install Flagger for Istio: ```bash -kustomize build https://github.com/weaveworks/flagger/kustomize/istio | kubectl apply -f - +kustomize build https://github.com/fluxcd/flagger/kustomize/istio?ref=main | kubectl apply -f - ``` Install Flagger for AWS App Mesh: ```bash -kustomize build https://github.com/weaveworks/flagger/kustomize/appmesh | kubectl apply -f - +kustomize build https://github.com/fluxcd/flagger/kustomize/appmesh?ref=main | kubectl apply -f - ``` This deploys Flagger and sets the metrics server URL to App Mesh's Prometheus instance. @@ -182,7 +168,7 @@ This deploys Flagger and sets the metrics server URL to App Mesh's Prometheus in Install Flagger for Linkerd: ```bash -kustomize build https://github.com/weaveworks/flagger/kustomize/linkerd | kubectl apply -f - +kustomize build https://github.com/fluxcd/flagger/kustomize/linkerd?ref=main | kubectl apply -f - ``` This deploys Flagger in the `linkerd` namespace and sets the metrics server URL to Linkerd's Prometheus instance. @@ -190,7 +176,7 @@ This deploys Flagger in the `linkerd` namespace and sets the metrics server URL If you want to install a specific Flagger release, add the version number to the URL: ```bash -kustomize build https://github.com/weaveworks/flagger/kustomize/linkerd?ref=v1.0.0 | kubectl apply -f - +kustomize build https://github.com/fluxcd/flagger/kustomize/linkerd?ref=v1.0.0 | kubectl apply -f - ``` **Generic installer** @@ -198,12 +184,14 @@ kustomize build https://github.com/weaveworks/flagger/kustomize/linkerd?ref=v1.0 Install Flagger and Prometheus for Contour, Gloo, NGINX, Skipper, or Traefik ingress: ```bash -kustomize build https://github.com/weaveworks/flagger/kustomize/kubernetes | kubectl apply -f - +kustomize build https://github.com/fluxcd/flagger/kustomize/kubernetes?ref=main | kubectl apply -f - ``` -This deploys Flagger and Prometheus in the `flagger-system` namespace, sets the metrics server URL to `http://flagger-prometheus.flagger-system:9090` and the mesh provider to `kubernetes`. +This deploys Flagger and Prometheus in the `flagger-system` namespace, +sets the metrics server URL to `http://flagger-prometheus.flagger-system:9090` and the mesh provider to `kubernetes`. -The Prometheus instance has a two hours data retention and is configured to scrape all pods in your cluster that have the `prometheus.io/scrape: "true"` annotation. +The Prometheus instance has a two hours data retention and is configured to scrape all pods in your cluster +that have the `prometheus.io/scrape: "true"` annotation. To target a different provider you can specify it in the canary custom resource: @@ -227,7 +215,7 @@ Create a kustomization file using Flagger as base and patch the container args: cat > kustomization.yaml <= 1.16) configured with App Mesh, +you can find the installation guide [here](https://docs.flagger.app/install/flagger-install-on-eks-appmesh). ## Bootstrap -Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler \(HPA\), then creates a series of objects \(Kubernetes deployments, ClusterIP services, App Mesh virtual nodes and services\). These objects expose the application on the mesh and drive the canary analysis and promotion. The only App Mesh object you need to create by yourself is the mesh resource. +Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler (HPA), +then creates a series of objects (Kubernetes deployments, ClusterIP services, +App Mesh virtual nodes and services). +These objects expose the application on the mesh and drive the canary analysis and promotion. +The only App Mesh object you need to create by yourself is the mesh resource. Create a mesh called `global`: @@ -37,7 +43,7 @@ EOF Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the canary analysis: @@ -162,9 +168,13 @@ virtualservice.appmesh.k8s.aws/podinfo virtualservice.appmesh.k8s.aws/podinfo-canary ``` -After the boostrap, the podinfo deployment will be scaled to zero and the traffic to `podinfo.test` will be routed to the primary pods. During the canary analysis, the `podinfo-canary.test` address can be used to target directly the canary pods. +After the boostrap, the podinfo deployment will be scaled to zero and the traffic to `podinfo.test` +will be routed to the primary pods. +During the canary analysis, the `podinfo-canary.test` address can be used to target directly the canary pods. -App Mesh blocks all egress traffic by default. If your application needs to call another service, you have to create an App Mesh virtual service for it and add the virtual service name to the backend list. +App Mesh blocks all egress traffic by default. +If your application needs to call another service, you have to create an App Mesh virtual service for it +and add the virtual service name to the backend list. ```yaml service: @@ -174,7 +184,7 @@ App Mesh blocks all egress traffic by default. If your application needs to call - arn:aws:appmesh:eu-west-1:12345678910:mesh/my-mesh/virtualService/backend2 ``` -## Setup App Mesh Gateway \(optional\) +## Setup App Mesh Gateway (optional) In order to expose the podinfo app outside the mesh you can use the App Mesh Gateway. @@ -225,7 +235,7 @@ Open your browser and navigate to the ingress address to access podinfo UI. A canary deployment is triggered by changes in any of the following objects: -* Deployment PodSpec \(container image, command, ports, env, resources, etc\) +* Deployment PodSpec (container image, command, ports, env, resources, etc) * ConfigMaps and Secrets mounted as volumes or mapped to environment variables Trigger a canary deployment by updating the container image: @@ -268,7 +278,9 @@ When the canary analysis starts, Flagger will call the pre-rollout webhooks befo **Note** that if you apply new changes to the deployment during the canary analysis, Flagger will restart the analysis. -During the analysis the canary’s progress can be monitored with Grafana. The App Mesh dashboard URL is [http://localhost:3000/d/flagger-appmesh/appmesh-canary?refresh=10s&orgId=1&var-namespace=test&var-primary=podinfo-primary&var-canary=podinfo](http://localhost:3000/d/flagger-appmesh/appmesh-canary?refresh=10s&orgId=1&var-namespace=test&var-primary=podinfo-primary&var-canary=podinfo). +During the analysis the canary’s progress can be monitored with Grafana. +The App Mesh dashboard URL is +[http://localhost:3000/d/flagger-appmesh/appmesh-canary?refresh=10s&orgId=1&var-namespace=test&var-primary=podinfo-primary&var-canary=podinfo](http://localhost:3000/d/flagger-appmesh/appmesh-canary?refresh=10s&orgId=1&var-namespace=test&var-primary=podinfo-primary&var-canary=podinfo). ![App Mesh Canary Dashboard](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/flagger-grafana-appmesh.png) @@ -316,7 +328,8 @@ Generate latency: watch -n 1 curl http://podinfo-canary.test:9898/delay/1 ``` -When the number of failed checks reaches the canary analysis threshold, the traffic is routed back to the primary, the canary is scaled to zero and the rollout is marked as failed. +When the number of failed checks reaches the canary analysis threshold, the traffic is routed back to the primary, +the canary is scaled to zero and the rollout is marked as failed. ```text kubectl -n appmesh-system logs deploy/flagger -f | jq .msg @@ -335,13 +348,16 @@ Rolling back podinfo.test failed checks threshold reached 5 Canary failed! Scaling down podinfo.test ``` -If you’ve enabled the Slack notifications, you’ll receive a message if the progress deadline is exceeded, or if the analysis reached the maximum number of failed checks: +If you’ve enabled the Slack notifications, you’ll receive a message if the progress deadline is exceeded, +or if the analysis reached the maximum number of failed checks: ![Flagger Slack Notifications](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/slack-canary-failed.png) ## A/B Testing -Besides weighted routing, Flagger can be configured to route traffic to the canary based on HTTP match conditions. In an A/B testing scenario, you'll be using HTTP headers or cookies to target a certain segment of your users. This is particularly useful for frontend applications that require session affinity. +Besides weighted routing, Flagger can be configured to route traffic to the canary based on HTTP match conditions. +In an A/B testing scenario, you'll be using HTTP headers or cookies to target a certain segment of your users. +This is particularly useful for frontend applications that require session affinity. ![Flagger A/B Testing Stages](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-abtest-steps.png) @@ -408,5 +424,8 @@ Routing all traffic to primary Promotion completed! Scaling down podinfo.test ``` -For an in-depth look at the analysis process read the [usage docs](../usage/how-it-works.md). - +The above procedure can be extended with +[custom metrics](../usage/metrics.md) checks, +[webhooks](../usage/webhooks.md), +[manual promotion](../usage/webhooks.md#manual-gating) approval and +[Slack or MS Teams](../usage/alerting.md) notifications. diff --git a/docs/gitbook/tutorials/contour-progressive-delivery.md b/docs/gitbook/tutorials/contour-progressive-delivery.md index bc6a250d..464daa2f 100644 --- a/docs/gitbook/tutorials/contour-progressive-delivery.md +++ b/docs/gitbook/tutorials/contour-progressive-delivery.md @@ -6,7 +6,7 @@ This guide shows you how to use [Contour](https://projectcontour.io/) ingress co ## Prerequisites -Flagger requires a Kubernetes cluster **v1.11** or newer and Contour **v1.0** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer and Contour **v1.0** or newer. Install Contour on a cluster with LoadBalancer support: @@ -16,10 +16,10 @@ kubectl apply -f https://projectcontour.io/quickstart/contour.yaml The above command will deploy Contour and an Envoy daemonset in the `projectcontour` namespace. -Install Flagger using Kustomize \(kubectl 1.14\) in the `projectcontour` namespace: +Install Flagger using Kustomize (kubectl 1.14) in the `projectcontour` namespace: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/contour +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/contour?ref=main ``` The above command will deploy Flagger and Prometheus configured to scrape the Contour's Envoy instances. @@ -51,13 +51,13 @@ kubectl create ns test Install the load testing service to generate traffic during the canary analysis: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/tester +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main ``` Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Create a canary custom resource \(replace `app.example.com` with your own domain\): diff --git a/docs/gitbook/tutorials/crossover-progressive-delivery.md b/docs/gitbook/tutorials/crossover-progressive-delivery.md index 4f0b21d3..a4d24df1 100644 --- a/docs/gitbook/tutorials/crossover-progressive-delivery.md +++ b/docs/gitbook/tutorials/crossover-progressive-delivery.md @@ -6,7 +6,7 @@ Crossover is a minimal Envoy xDS implementation supports [Service Mesh Interface ## Prerequisites -Flagger requires a Kubernetes cluster **v1.11** or newer and Envoy paired with [Crossover](https://github.com/mumoshu/crossover) sidecar. +Flagger requires a Kubernetes cluster **v1.16** or newer and Envoy paired with [Crossover](https://github.com/mumoshu/crossover) sidecar. Create a test namespace: @@ -58,7 +58,7 @@ Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the canary analysis: diff --git a/docs/gitbook/tutorials/gloo-progressive-delivery.md b/docs/gitbook/tutorials/gloo-progressive-delivery.md index 797594dc..9c3a24d1 100644 --- a/docs/gitbook/tutorials/gloo-progressive-delivery.md +++ b/docs/gitbook/tutorials/gloo-progressive-delivery.md @@ -9,7 +9,7 @@ This guide shows you how to use the [Gloo Edge](https://gloo.solo.io/) ingress c This guide was written for Flagger version **1.5.0** or higher. Prior versions of Flagger used Gloo upstream groups to handle canaries, but newer versions of Flagger use Gloo route tables to handle canaries as well as A/B testing. -Flagger requires a Kubernetes cluster **v1.11** or newer and Gloo Edge ingress **1.6.0** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer and Gloo Edge ingress **1.6.0** or newer. Install Gloo with Helm v3: @@ -44,13 +44,13 @@ kubectl create ns test Create a deployment and a horizontal pod autoscaler: ```bash -kubectl -n test apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl -n test apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the canary analysis: ```bash -kubectl -n test apply -k github.com/weaveworks/flagger//kustomize/tester +kubectl -n test apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main ``` Create a virtual service definition that references a route table that will be generated by Flagger \(replace `app.example.com` with your own domain\): diff --git a/docs/gitbook/tutorials/istio-ab-testing.md b/docs/gitbook/tutorials/istio-ab-testing.md index 23990066..1dc1617b 100644 --- a/docs/gitbook/tutorials/istio-ab-testing.md +++ b/docs/gitbook/tutorials/istio-ab-testing.md @@ -8,7 +8,7 @@ Besides weighted routing, Flagger can be configured to route traffic to the cana ## Prerequisites -Flagger requires a Kubernetes cluster **v1.14** or newer and Istio **v1.0** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer and Istio **v1.0** or newer. Install Istio with telemetry support and Prometheus: @@ -21,7 +21,7 @@ kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.8/sampl Install Flagger in the `istio-system` namespace: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/istio +kubectl apply -k github.com/fluxcd/flagger//kustomize/istio ``` Create an ingress gateway to expose the demo app outside of the mesh: @@ -56,13 +56,13 @@ kubectl label namespace test istio-injection=enabled Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the canary analysis: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/tester +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main ``` Create a canary custom resource \(replace example.com with your own domain\): diff --git a/docs/gitbook/tutorials/istio-progressive-delivery.md b/docs/gitbook/tutorials/istio-progressive-delivery.md index 99d1af63..d938d42e 100644 --- a/docs/gitbook/tutorials/istio-progressive-delivery.md +++ b/docs/gitbook/tutorials/istio-progressive-delivery.md @@ -6,7 +6,7 @@ This guide shows you how to use Istio and Flagger to automate canary deployments ## Prerequisites -Flagger requires a Kubernetes cluster **v1.14** or newer and Istio **v1.5** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer and Istio **v1.5** or newer. Install Istio with telemetry support and Prometheus: @@ -19,7 +19,7 @@ kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.8/sampl Install Flagger in the `istio-system` namespace: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/istio +kubectl apply -k github.com/fluxcd/flagger//kustomize/istio ``` Create an ingress gateway to expose the demo app outside of the mesh: @@ -56,13 +56,13 @@ kubectl label namespace test istio-injection=enabled Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the canary analysis: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/tester +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main ``` Create a canary custom resource \(replace example.com with your own domain\): diff --git a/docs/gitbook/tutorials/kubernetes-blue-green.md b/docs/gitbook/tutorials/kubernetes-blue-green.md index be1dff78..03536986 100644 --- a/docs/gitbook/tutorials/kubernetes-blue-green.md +++ b/docs/gitbook/tutorials/kubernetes-blue-green.md @@ -8,7 +8,7 @@ For applications that are not deployed on a service mesh, Flagger can orchestrat ## Prerequisites -Flagger requires a Kubernetes cluster **v1.11** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer. Install Flagger and the Prometheus add-on: @@ -53,13 +53,13 @@ kubectl create ns test Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the analysis: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/tester +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main ``` Create a canary custom resource: diff --git a/docs/gitbook/tutorials/linkerd-progressive-delivery.md b/docs/gitbook/tutorials/linkerd-progressive-delivery.md index 6c7fb92c..e480208c 100644 --- a/docs/gitbook/tutorials/linkerd-progressive-delivery.md +++ b/docs/gitbook/tutorials/linkerd-progressive-delivery.md @@ -6,12 +6,12 @@ This guide shows you how to use Linkerd and Flagger to automate canary deploymen ## Prerequisites -Flagger requires a Kubernetes cluster **v1.11** or newer and Linkerd **2.4** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer and Linkerd **2.4** or newer. Install Flagger in the linkerd namespace: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/linkerd +kubectl apply -k github.com/fluxcd/flagger//kustomize/linkerd ``` Note that you'll need kubectl 1.14 or newer to run the above command. @@ -30,13 +30,13 @@ kubectl annotate namespace test linkerd.io/inject=enabled Install the load testing service to generate traffic during the canary analysis: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/tester +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main ``` Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Create a canary custom resource for the podinfo deployment: diff --git a/docs/gitbook/tutorials/nginx-progressive-delivery.md b/docs/gitbook/tutorials/nginx-progressive-delivery.md index 6539a97f..2fce78c7 100644 --- a/docs/gitbook/tutorials/nginx-progressive-delivery.md +++ b/docs/gitbook/tutorials/nginx-progressive-delivery.md @@ -6,7 +6,7 @@ This guide shows you how to use the NGINX ingress controller and Flagger to auto ## Prerequisites -Flagger requires a Kubernetes cluster **v1.14** or newer and NGINX ingress **v0.41** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer and NGINX ingress **v0.41** or newer. Install the NGINX ingress controller with Helm v3: @@ -46,7 +46,7 @@ kubectl create ns test Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the canary analysis: diff --git a/docs/gitbook/tutorials/prometheus-operator.md b/docs/gitbook/tutorials/prometheus-operator.md index a8e18b70..d3b081eb 100644 --- a/docs/gitbook/tutorials/prometheus-operator.md +++ b/docs/gitbook/tutorials/prometheus-operator.md @@ -4,19 +4,22 @@ This guide show you how to use Prometheus Operator for canary analysis. ## Prerequisites +Flagger requires a Kubernetes cluster **v1.16** or newer. + Install Prometheus Operator with Helm v3: ```bash -helm repo add stable https://kubernetes-charts.storage.googleapis.com +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts kubectl create ns monitoring -helm upgrade -i prometheus stable/prometheus-operator \ +helm upgrade -i prometheus prometheus-community/kube-prometheus-stack \ --namespace monitoring \ --set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false \ --set fullnameOverride=prometheus ``` -The `prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false` option allows Prometheus operator to watch serviceMonitors outside of his namespace. +The `prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false` +option allows Prometheus operator to watch serviceMonitors outside of his namespace. Install Flagger by setting the metrics server to Prometheus: @@ -84,7 +87,8 @@ spec: app: podinfo-canary ``` -We are setting `interval: 5s` to have a more aggressive scraping. If you do not define it, you must to use a longer interval in the Canary object. +We are setting `interval: 5s` to have a more aggressive scraping. +If you do not define it, you must to use a longer interval in the Canary object. ## Metric templates @@ -191,5 +195,6 @@ spec: Based on the above specification, Flagger creates the primary and canary Kubernetes ClusterIP service. -During the canary analysis, Prometheus will scrape the canary service and Flagger will use the HTTP error rate and latency queries to determine if the release should be promoted or rolled back. +During the canary analysis, Prometheus will scrape the canary service and Flagger will use the HTTP error rate +and latency queries to determine if the release should be promoted or rolled back. diff --git a/docs/gitbook/tutorials/skipper-progressive-delivery.md b/docs/gitbook/tutorials/skipper-progressive-delivery.md index adde932f..5963578b 100644 --- a/docs/gitbook/tutorials/skipper-progressive-delivery.md +++ b/docs/gitbook/tutorials/skipper-progressive-delivery.md @@ -6,7 +6,7 @@ This guide shows you how to use the [Skipper ingress controller](https://opensou ## Prerequisites -Flagger requires a Kubernetes cluster **v1.14** or newer and Skipper ingress **0.11.40** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer and Skipper ingress **0.11.40** or newer. Install Skipper ingress-controller using [upstream definition](https://opensource.zalando.com/skipper/kubernetes/ingress-controller/#install-skipper-as-ingress-controller). @@ -31,7 +31,7 @@ Certain arguments are relevant: Install Flagger using kustomize: ```bash -kustomize build https://github.com/weaveworks/flagger/kustomize/kubernetes | kubectl apply -f - +kustomize build https://github.com/fluxcd/flagger/kustomize/kubernetes | kubectl apply -f - ``` ## Bootstrap @@ -47,7 +47,7 @@ kubectl create ns test Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the canary analysis: diff --git a/docs/gitbook/tutorials/traefik-progressive-delivery.md b/docs/gitbook/tutorials/traefik-progressive-delivery.md index 5722ce87..bb162caa 100644 --- a/docs/gitbook/tutorials/traefik-progressive-delivery.md +++ b/docs/gitbook/tutorials/traefik-progressive-delivery.md @@ -4,7 +4,7 @@ This guide shows you how to use the [Traefik](https://doc.traefik.io/traefik/) a ## Prerequisites -Flagger requires a Kubernetes cluster **v1.14** or newer and Traefik **v2.3** or newer. +Flagger requires a Kubernetes cluster **v1.16** or newer and Traefik **v2.3** or newer. Install Traefik with Helm v3: @@ -40,7 +40,7 @@ kubectl create ns test Create a deployment and a horizontal pod autoscaler: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main ``` Deploy the load testing service to generate traffic during the canary analysis: diff --git a/docs/gitbook/usage/how-it-works.md b/docs/gitbook/usage/how-it-works.md index e58f7ad5..88a090fd 100644 --- a/docs/gitbook/usage/how-it-works.md +++ b/docs/gitbook/usage/how-it-works.md @@ -1,6 +1,6 @@ # How it works -[Flagger](https://github.com/weaveworks/flagger) can be configured to automate the release process for Kubernetes workloads with a custom resource named canary. +[Flagger](https://github.com/fluxcd/flagger) can be configured to automate the release process for Kubernetes workloads with a custom resource named canary. ## Canary resource diff --git a/docs/gitbook/usage/webhooks.md b/docs/gitbook/usage/webhooks.md index 92aa36fa..40cc91ea 100644 --- a/docs/gitbook/usage/webhooks.md +++ b/docs/gitbook/usage/webhooks.md @@ -127,7 +127,7 @@ Flagger comes with a load testing service based on [rakyll/hey](https://github.c First you need to deploy the load test runner in a namespace with sidecar injection enabled: ```bash -kubectl apply -k github.com/weaveworks/flagger//kustomize/tester +kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main ``` Or by using Helm: diff --git a/test/linkerd/test-canary.sh b/test/linkerd/test-canary.sh index c7a85aff..499bdecd 100755 --- a/test/linkerd/test-canary.sh +++ b/test/linkerd/test-canary.sh @@ -7,7 +7,7 @@ set -o errexit REPO_ROOT=$(git rev-parse --show-toplevel) cat <