From 14214bc2fe4e49c313a4ec9799a302d1a13d3c05 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 11:14:07 +0200 Subject: [PATCH 01/10] e2e: Update Helm to v3.0.3 --- test/e2e-kind.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/e2e-kind.sh b/test/e2e-kind.sh index 4298cf96..6ce283e4 100755 --- a/test/e2e-kind.sh +++ b/test/e2e-kind.sh @@ -3,7 +3,7 @@ set -o errexit REPO_ROOT=$(git rev-parse --show-toplevel) -HELM_VERSION=v2.16.1 +HELM_VERSION=v3.0.3 KIND_VERSION=v0.7.0 KUBE_VERSION=v1.14.10 @@ -29,7 +29,3 @@ kubectl get pods --all-namespaces echo ">>> Installing Helm" curl -sSL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar xz && sudo mv linux-amd64/helm /usr/local/bin/ && rm -rf linux-amd64 -echo '>>> Installing Tiller' -kubectl --namespace kube-system create sa tiller -kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller -helm init --service-account tiller --upgrade --wait From c88fa5d8821ed93f6cf5a70b6e964b7fd3e307dd Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 11:14:26 +0200 Subject: [PATCH 02/10] e2e: Update Gloo to v1.3.5 --- test/e2e-gloo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e-gloo.sh b/test/e2e-gloo.sh index 83c1edf5..954a1959 100755 --- a/test/e2e-gloo.sh +++ b/test/e2e-gloo.sh @@ -2,7 +2,7 @@ set -o errexit -GLOO_VER="0.20.2" +GLOO_VER="1.3.5" REPO_ROOT=$(git rev-parse --show-toplevel) echo '>>> Installing Gloo' @@ -12,7 +12,7 @@ helm upgrade -i gloo gloo/gloo --version ${GLOO_VER} \ --set discovery.enabled=true kubectl -n gloo-system rollout status deployment/gloo -kubectl -n gloo-system rollout status deployment/gateway-proxy-v2 +kubectl -n gloo-system rollout status deployment/gateway kubectl -n gloo-system get all echo '>>> Installing Flagger' From 089aa1fe2232c88497c47734988327590026e3f8 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 11:23:10 +0200 Subject: [PATCH 03/10] e2e: Create namespaces for Helm v3 --- test/e2e-gloo.sh | 1 + test/e2e-istio.sh | 1 + test/e2e-nginx.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/test/e2e-gloo.sh b/test/e2e-gloo.sh index 954a1959..6d5036b3 100755 --- a/test/e2e-gloo.sh +++ b/test/e2e-gloo.sh @@ -7,6 +7,7 @@ REPO_ROOT=$(git rev-parse --show-toplevel) echo '>>> Installing Gloo' helm repo add gloo https://storage.googleapis.com/solo-public-helm +kubectl create ns gloo-system helm upgrade -i gloo gloo/gloo --version ${GLOO_VER} \ --namespace gloo-system \ --set discovery.enabled=true diff --git a/test/e2e-istio.sh b/test/e2e-istio.sh index 7d43a676..e368d804 100755 --- a/test/e2e-istio.sh +++ b/test/e2e-istio.sh @@ -6,6 +6,7 @@ ISTIO_VER="1.4.3" REPO_ROOT=$(git rev-parse --show-toplevel) echo ">>> Installing Istio ${ISTIO_VER}" +kubectl create ns istio-system helm repo add istio.io https://storage.googleapis.com/istio-release/releases/${ISTIO_VER}/charts echo '>>> Installing Istio CRDs' diff --git a/test/e2e-nginx.sh b/test/e2e-nginx.sh index a4b0221b..cb506e64 100755 --- a/test/e2e-nginx.sh +++ b/test/e2e-nginx.sh @@ -6,6 +6,7 @@ REPO_ROOT=$(git rev-parse --show-toplevel) NGINX_VERSION=1.26.0 echo '>>> Installing NGINX Ingress' +kubectl create ns ingress-nginx helm upgrade -i nginx-ingress stable/nginx-ingress --version=${NGINX_VERSION} \ --wait \ --namespace ingress-nginx \ From 71a220d4322682dbc9007415437218601756fd47 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 11:47:38 +0200 Subject: [PATCH 04/10] e2e: Fix Gloo routes --- test/e2e-gloo-tests.sh | 5 ++--- test/e2e-kind.sh | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/e2e-gloo-tests.sh b/test/e2e-gloo-tests.sh index eea2b99b..2bddfb13 100755 --- a/test/e2e-gloo-tests.sh +++ b/test/e2e-gloo-tests.sh @@ -27,10 +27,9 @@ spec: virtualHost: domains: - app.example.com - name: podinfo routes: - - matcher: - prefix: / + - matchers: + - prefix: / routeAction: upstreamGroup: name: podinfo diff --git a/test/e2e-kind.sh b/test/e2e-kind.sh index 6ce283e4..762da168 100755 --- a/test/e2e-kind.sh +++ b/test/e2e-kind.sh @@ -28,4 +28,4 @@ kubectl get pods --all-namespaces echo ">>> Installing Helm" curl -sSL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar xz && sudo mv linux-amd64/helm /usr/local/bin/ && rm -rf linux-amd64 - +helm repo add stable https://kubernetes-charts.storage.googleapis.com/ From 78dacc98fa202f8547426c631b1858d9728ce549 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 12:05:02 +0200 Subject: [PATCH 05/10] e2e: Fix NGINX helm uninstall --- test/e2e-nginx-cleanup.sh | 4 ++-- test/e2e-nginx-custom-annotations.sh | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/e2e-nginx-cleanup.sh b/test/e2e-nginx-cleanup.sh index c7f43af9..c27e482a 100755 --- a/test/e2e-nginx-cleanup.sh +++ b/test/e2e-nginx-cleanup.sh @@ -3,10 +3,10 @@ set -o errexit echo '>>> Deleting NGINX Ingress' -helm delete --purge nginx-ingress +helm delete nginx-ingress -n ingress-nginx echo '>>> Deleting Flagger' -helm delete --purge flagger +helm delete flagger -n ingress-nginx echo '>>> Cleanup test namespace' kubectl delete namespace test --ignore-not-found=true \ No newline at end of file diff --git a/test/e2e-nginx-custom-annotations.sh b/test/e2e-nginx-custom-annotations.sh index c2eb9bf6..3ae36f6c 100755 --- a/test/e2e-nginx-custom-annotations.sh +++ b/test/e2e-nginx-custom-annotations.sh @@ -25,8 +25,7 @@ echo '>>> Loading Flagger image' kind load docker-image test/flagger:latest echo '>>> Installing Flagger' -helm install ${REPO_ROOT}/charts/flagger \ ---name flagger \ +helm upgrade -i flagger ${REPO_ROOT}/charts/flagger \ --namespace ingress-nginx \ --set prometheus.install=true \ --set ingressAnnotationsPrefix="custom.ingress.kubernetes.io" \ From 0bd66f4603bebeef418d03256cdcf052a17787bb Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 12:19:36 +0200 Subject: [PATCH 06/10] e2e: Update Gloo gateway proxy address --- test/e2e-gloo-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e-gloo-tests.sh b/test/e2e-gloo-tests.sh index 2bddfb13..f686a0b1 100755 --- a/test/e2e-gloo-tests.sh +++ b/test/e2e-gloo-tests.sh @@ -78,13 +78,13 @@ spec: timeout: 10s metadata: type: bash - cmd: "curl -sd 'test' -H 'Host: app.example.com' http://gateway-proxy-v2.gloo-system/token | grep token" + cmd: "curl -sd 'test' -H 'Host: app.example.com' http://gateway-proxy.gloo-system/token | grep token" - name: load-test url: http://flagger-loadtester.test/ timeout: 5s metadata: type: cmd - cmd: "hey -z 2m -q 5 -c 2 -host app.example.com http://gateway-proxy-v2.gloo-system" + cmd: "hey -z 2m -q 5 -c 2 -host app.example.com http://gateway-proxy.gloo-system" logCmdOutput: "true" EOF From bd3435b82d996f44e505be744b6df0715d17156d Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 12:41:23 +0200 Subject: [PATCH 07/10] Update Gloo docs to v1.3.5 --- .../usage/gloo-progressive-delivery.md | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/docs/gitbook/usage/gloo-progressive-delivery.md b/docs/gitbook/usage/gloo-progressive-delivery.md index bb68506b..2529d126 100644 --- a/docs/gitbook/usage/gloo-progressive-delivery.md +++ b/docs/gitbook/usage/gloo-progressive-delivery.md @@ -6,13 +6,13 @@ This guide shows you how to use the [Gloo](https://gloo.solo.io/) ingress contro ### Prerequisites -Flagger requires a Kubernetes cluster **v1.11** or newer and Gloo ingress **0.13.29** or newer. +Flagger requires a Kubernetes cluster **v1.11** or newer and Gloo ingress **1.3.5** or newer. -Install Gloo with Helm: +Install Gloo with Helm v3: ```bash helm repo add gloo https://storage.googleapis.com/solo-public-helm - +kubectl create ns gloo-system helm upgrade -i gloo gloo/gloo \ --namespace gloo-system ``` @@ -76,10 +76,9 @@ spec: virtualHost: domains: - 'app.example.com' - name: podinfo.test routes: - - matcher: - prefix: / + - matchers: + - prefix: / routeAction: upstreamGroup: name: podinfo @@ -112,9 +111,6 @@ spec: apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler name: podinfo - # the maximum time in seconds for the canary deployment - # to make progress before it is rollback (default 600s) - progressDeadlineSeconds: 60 service: # ClusterIP port number port: 9898 @@ -143,7 +139,7 @@ spec: # milliseconds threshold: 500 interval: 30s - # testing (optinal) + # testing (optional) webhooks: - name: acceptance-test type: pre-rollout @@ -157,7 +153,7 @@ spec: timeout: 5s metadata: type: cmd - cmd: "hey -z 2m -q 5 -c 2 -host app.example.com http://gateway-proxy-v2.gloo-system" + cmd: "hey -z 2m -q 5 -c 2 -host app.example.com http://gateway-proxy.gloo-system" ``` Save the above resource as podinfo-canary.yaml and then apply it: @@ -348,7 +344,7 @@ podinfod=stefanprodan/podinfo:3.1.3 Generate 404s: ```bash -watch curl -H 'Host: app.example.com' http://gateway-proxy-v2.gloo-system/status/400 +watch curl -H 'Host: app.example.com' http://gateway-proxy.gloo-system/status/400 ``` Watch Flagger logs: From 6347861fdab0db5f6b45abba8ecbe1f6fd78befa Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 12:59:13 +0200 Subject: [PATCH 08/10] Update docs to Helm v3 --- .../install/flagger-install-on-kubernetes.md | 25 ++++++++----------- .../usage/nginx-progressive-delivery.md | 3 ++- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/docs/gitbook/install/flagger-install-on-kubernetes.md b/docs/gitbook/install/flagger-install-on-kubernetes.md index 92b601fd..129d76b6 100644 --- a/docs/gitbook/install/flagger-install-on-kubernetes.md +++ b/docs/gitbook/install/flagger-install-on-kubernetes.md @@ -1,13 +1,10 @@ # Flagger install on Kubernetes -This guide walks you through setting up Flagger on a Kubernetes cluster with Helm or Kustomize. +This guide walks you through setting up Flagger on a Kubernetes cluster with Helm v3 or Kustomize. ### Prerequisites -Flagger requires a Kubernetes cluster **v1.11** or newer with the following admission controllers enabled: - -* MutatingAdmissionWebhook -* ValidatingAdmissionWebhook +Flagger requires a Kubernetes cluster **v1.11** or newer. ### Install Flagger with Helm @@ -75,25 +72,24 @@ helm upgrade -i flagger flagger/flagger \ --set msteams.url=https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK ``` -If you don't have Tiller you can use the helm template command and apply the generated yaml with kubectl: +You can use the helm template command and apply the generated yaml with kubectl: ```bash # generate helm fetch --untar --untardir . flagger/flagger && -helm template flagger \ ---name flagger \ +helm template flagger ./flagger \ --namespace=istio-system \ --set metricsServer=http://prometheus.istio-system:9090 \ -> $HOME/flagger.yaml +> flagger.yaml # apply -kubectl apply -f $HOME/flagger.yaml +kubectl apply -f flagger.yaml ``` To uninstall the Flagger release with Helm run: ```text -helm delete --purge flagger +helm delete flagger ``` The command removes all the Kubernetes components associated with the chart and deletes the release. @@ -127,13 +123,12 @@ Or use helm template command and apply the generated yaml with kubectl: ```bash # generate helm fetch --untar --untardir . flagger/grafana && -helm template grafana \ ---name flagger-grafana \ +helm template flagger-grafana ./grafana \ --namespace=istio-system \ -> $HOME/flagger-grafana.yaml +> flagger-grafana.yaml # apply -kubectl apply -f $HOME/flagger-grafana.yaml +kubectl apply -f flagger-grafana.yaml ``` You can access Grafana using port forwarding: diff --git a/docs/gitbook/usage/nginx-progressive-delivery.md b/docs/gitbook/usage/nginx-progressive-delivery.md index ea686b96..b5fedb4b 100644 --- a/docs/gitbook/usage/nginx-progressive-delivery.md +++ b/docs/gitbook/usage/nginx-progressive-delivery.md @@ -8,9 +8,10 @@ This guide shows you how to use the NGINX ingress controller and Flagger to auto Flagger requires a Kubernetes cluster **v1.11** or newer and NGINX ingress **0.24** or newer. -Install NGINX with Helm: +Install NGINX with Helm v3: ```bash +kubectl create ns ingress-nginx helm upgrade -i nginx-ingress stable/nginx-ingress \ --namespace ingress-nginx \ --set controller.stats.enabled=true \ From 67ba14e438c3fafe9f12e6caa8b8f892903e2d61 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 17:22:30 +0200 Subject: [PATCH 09/10] e2e: Update Linkerd to v2.7.0 --- test/e2e-linkerd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e-linkerd.sh b/test/e2e-linkerd.sh index db6e8791..1657d68d 100755 --- a/test/e2e-linkerd.sh +++ b/test/e2e-linkerd.sh @@ -2,7 +2,7 @@ set -o errexit -LINKERD_VER="stable-2.6.1" +LINKERD_VER="stable-2.7.0" REPO_ROOT=$(git rev-parse --show-toplevel) curl -SsL https://github.com/linkerd/linkerd2/releases/download/${LINKERD_VER}/linkerd2-cli-${LINKERD_VER}-linux > ${REPO_ROOT}/bin/linkerd From 39e44e6a7add18614508306fdfd9970eb543c171 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 13 Feb 2020 17:42:58 +0200 Subject: [PATCH 10/10] e2e: Update Istio to v1.4.4 --- test/e2e-istio.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e-istio.sh b/test/e2e-istio.sh index e368d804..b655af2b 100755 --- a/test/e2e-istio.sh +++ b/test/e2e-istio.sh @@ -2,7 +2,7 @@ set -o errexit -ISTIO_VER="1.4.3" +ISTIO_VER="1.4.4" REPO_ROOT=$(git rev-parse --show-toplevel) echo ">>> Installing Istio ${ISTIO_VER}"