diff --git a/.circleci/config.yml b/.circleci/config.yml index ecdc397e..48310eb4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,7 +81,7 @@ jobs: - run: test/container-build.sh - run: test/e2e-kind.sh - run: test/e2e-istio.sh - - run: test/e2e-tests.sh + - run: test/e2e-istio-tests.sh e2e-kubernetes-daemonset-testing: machine: true @@ -105,28 +105,6 @@ jobs: - run: test/e2e-kubernetes.sh - run: test/e2e-kubernetes-tests-deployment.sh - e2e-kubernetes-svc-testing: - machine: true - steps: - - checkout - - attach_workspace: - at: /tmp/bin - - run: test/container-build.sh - - run: test/e2e-kind.sh - - run: test/e2e-kubernetes.sh - - run: test/e2e-kubernetes-svc-tests.sh - - e2e-smi-istio-testing: - machine: true - steps: - - checkout - - attach_workspace: - at: /tmp/bin - - run: test/container-build.sh - - run: test/e2e-kind.sh - - run: test/e2e-smi-istio.sh - - run: test/e2e-tests.sh canary - e2e-gloo-testing: machine: true steps: diff --git a/cmd/flagger/main.go b/cmd/flagger/main.go index 708ab504..ec9ef41b 100644 --- a/cmd/flagger/main.go +++ b/cmd/flagger/main.go @@ -125,6 +125,9 @@ func main() { } // use a remote cluster for routing if a service mesh kubeconfig is specified + if kubeconfigServiceMesh == "" { + kubeconfigServiceMesh = kubeconfig + } cfgHost, err := clientcmd.BuildConfigFromFlags(masterURL, kubeconfigServiceMesh) if err != nil { logger.Fatalf("Error building host kubeconfig: %v", err) diff --git a/test/e2e-tests.sh b/test/e2e-istio-tests.sh similarity index 85% rename from test/e2e-tests.sh rename to test/e2e-istio-tests.sh index a19ef5ed..31600601 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-istio-tests.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # This script runs e2e tests for Canary, B/G and A/B initialization, analysis and promotion -# Prerequisites: Kubernetes Kind, Helm and Istio +# Prerequisites: Kubernetes Kind and Istio set -o errexit @@ -15,9 +15,36 @@ echo '>>> Installing the load tester' kubectl apply -k ${REPO_ROOT}/kustomize/tester kubectl -n test rollout status deployment/flagger-loadtester -echo '>>> Initialising canary' +echo '>>> Deploy podinfo' kubectl apply -f ${REPO_ROOT}/test/e2e-workload.yaml +echo '>>> Create latency metric template' +cat <>> Initialising canary' cat <>> Downloading Istio ${ISTIO_VER}" +cd ${REPO_ROOT}/bin && \ +curl -L https://istio.io/downloadIstio | ISTIO_VERSION=${ISTIO_VER} sh - + 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 +${REPO_ROOT}/bin/istio-${ISTIO_VER}/bin/istioctl manifest apply --set profile=default -echo '>>> Installing Istio CRDs' -helm upgrade -i istio-init istio.io/istio-init --wait --namespace istio-system - -echo '>>> Waiting for Istio CRDs to be ready' -kubectl -n istio-system wait --for=condition=complete job/istio-init-crd-10-${ISTIO_VER} -kubectl -n istio-system wait --for=condition=complete job/istio-init-crd-11-${ISTIO_VER} -kubectl -n istio-system wait --for=condition=complete job/istio-init-crd-14-${ISTIO_VER} - -echo '>>> Installing Istio control plane' -helm upgrade -i istio istio.io/istio --wait --namespace istio-system -f ${REPO_ROOT}/test/e2e-istio-values.yaml +kubectl -n istio-system rollout status deployment/prometheus kubectl -n istio-system get all