From dc3cde88d23edff3946aed46ebd40cfb3620015a Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Wed, 19 Jun 2019 11:03:44 +0300 Subject: [PATCH] Use Helm to install Flagger for Istio e2e tests --- .circleci/config.yml | 2 +- test/README.md | 6 +++--- test/e2e-istio-build.sh | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100755 test/e2e-istio-build.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 07411ff4..9c934cd1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: - checkout - run: test/e2e-kind.sh - run: test/e2e-istio.sh - - run: test/e2e-build.sh + - run: test/e2e-istio-build.sh - run: test/e2e-tests.sh e2e-smi-istio-testing: diff --git a/test/README.md b/test/README.md index 43c04b0a..57bc3950 100644 --- a/test/README.md +++ b/test/README.md @@ -11,9 +11,9 @@ The e2e testing infrastructure is powered by CircleCI and [Kubernetes Kind](http * deploy Tiller on the local cluster [e2e-istio.sh](e2e-istio.sh) * install Istio CRDs with Helm [e2e-istio.sh](e2e-istio.sh) * install Istio control plane and Prometheus with Helm [e2e-istio.sh](e2e-istio.sh) -* build Flagger container image [e2e-build.sh](e2e-build.sh) -* load Flagger image onto the local cluster [e2e-build.sh](e2e-build.sh) -* deploy Flagger in the istio-system namespace [e2e-build.sh](e2e-build.sh) +* build Flagger container image [e2e-istio-build.sh](e2e-istio-build.sh) +* load Flagger image onto the local cluster [e2e-istio-build.sh.sh](e2e-istio-build.sh) +* deploy Flagger in the istio-system namespace [e2e-istio-build.sh.sh](e2e-istio-build.sh) * create a test namespace with Istio injection enabled [e2e-tests.sh](e2e-tests.sh) * deploy the load tester in the test namespace [e2e-tests.sh](e2e-tests.sh) * deploy a demo workload (podinfo) in the test namespace [e2e-tests.sh](e2e-tests.sh) diff --git a/test/e2e-istio-build.sh b/test/e2e-istio-build.sh new file mode 100755 index 00000000..4be983b4 --- /dev/null +++ b/test/e2e-istio-build.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -o errexit + +REPO_ROOT=$(git rev-parse --show-toplevel) +export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" + +echo '>>> Building Flagger' +cd ${REPO_ROOT} && docker build -t test/flagger:latest . -f Dockerfile + +echo '>>> Load Flagger image in Kind' +kind load docker-image test/flagger:latest + +echo '>>> Installing Flagger' +helm upgrade -i flagger ${REPO_ROOT}/charts/flagger \ +--namespace istio-system \ +--set meshProvider=istio + +kubectl -n istio-system set image deployment/flagger flagger=test/flagger:latest +kubectl -n istio-system rollout status deployment/flagger