diff --git a/.circleci/config.yml b/.circleci/config.yml index 140b716c..9d075c95 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,7 +96,7 @@ jobs: - attach_workspace: at: /tmp/bin - run: test/container-build.sh - - run: test/e2e-kind.sh + - run: test/e2e-kind.sh 0.2.1 - run: test/e2e-supergloo.sh - run: test/e2e-tests.sh canary @@ -107,7 +107,7 @@ jobs: - attach_workspace: at: /tmp/bin - run: test/container-build.sh - - run: test/e2e-kind.sh + - run: test/e2e-kind.sh 0.2.1 - run: test/e2e-gloo.sh - run: test/e2e-gloo-tests.sh diff --git a/test/e2e-istio.sh b/test/e2e-istio.sh index e9266071..6f3832f4 100755 --- a/test/e2e-istio.sh +++ b/test/e2e-istio.sh @@ -15,6 +15,7 @@ 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 kubectl -n istio-system wait --for=condition=complete job/istio-init-crd-11 +kubectl -n istio-system wait --for=condition=complete job/istio-init-crd-12 echo '>>> Installing Istio control plane' helm upgrade -i istio istio.io/istio --wait --namespace istio-system -f ${REPO_ROOT}/test/e2e-istio-values.yaml diff --git a/test/e2e-kind.sh b/test/e2e-kind.sh index 65199647..63458446 100755 --- a/test/e2e-kind.sh +++ b/test/e2e-kind.sh @@ -3,7 +3,11 @@ set -o errexit REPO_ROOT=$(git rev-parse --show-toplevel) -KIND_VERSION=0.3.0 +KIND_VERSION=v0.3.0 + +if [[ "$1" ]]; then + KIND_VERSION=$1 +fi echo ">>> Installing kubectl" curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ diff --git a/test/e2e-supergloo.sh b/test/e2e-supergloo.sh index 21f83614..ed7a122d 100755 --- a/test/e2e-supergloo.sh +++ b/test/e2e-supergloo.sh @@ -3,11 +3,12 @@ set -o errexit ISTIO_VER="1.0.6" +SUPERGLOO_VER="v0.3.13" REPO_ROOT=$(git rev-parse --show-toplevel) export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" echo ">>> Downloading Supergloo CLI" -curl -SsL https://github.com/solo-io/supergloo/releases/download/v0.3.13/supergloo-cli-linux-amd64 > supergloo-cli +curl -SsL https://github.com/solo-io/supergloo/releases/download/${SUPERGLOO_VER}/supergloo-cli-linux-amd64 > supergloo-cli chmod +x supergloo-cli echo ">>> Installing Supergloo" @@ -17,9 +18,17 @@ kubectl create ns istio-system ./supergloo-cli install istio --name test --namespace supergloo-system --auto-inject=true --installation-namespace istio-system --mtls=false --prometheus=true --version ${ISTIO_VER} echo '>>> Waiting for Istio to be ready' -until kubectl -n supergloo-system get mesh test -do - sleep 2 +retries=50 +count=0 +ok=false +until ${ok}; do + kubectl -n supergloo-system get mesh test && ok=true || ok=false + sleep 10 + count=$(($count + 1)) + if [[ ${count} -eq ${retries} ]]; then + echo "No more retries left" + exit 1 + fi done kubectl -n istio-system rollout status deployment/istio-pilot @@ -42,4 +51,4 @@ kubectl -n istio-system set image deployment/flagger flagger=test/flagger:latest kubectl -n istio-system rollout status deployment/flagger echo '>>> Adding Flagger Supergloo RBAC' -kubectl create clusterrolebinding flagger-supergloo --clusterrole=mesh-discovery --serviceaccount=istio-system:flagger \ No newline at end of file +kubectl create clusterrolebinding flagger-supergloo --clusterrole=mesh-discovery --serviceaccount=istio-system:flagger diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index 043d2cc9..829fcf57 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -125,7 +125,7 @@ done echo '✔ Canary promotion test passed' -if [ "$1" = "canary" ]; then +if [[ "$1" = "canary" ]]; then exit 0 fi diff --git a/test/e2e-workload.yaml b/test/e2e-workload.yaml index 83b199d7..56d0dbc3 100644 --- a/test/e2e-workload.yaml +++ b/test/e2e-workload.yaml @@ -41,21 +41,15 @@ spec: - name: PODINFO_UI_COLOR value: blue livenessProbe: - exec: - command: - - podcli - - check - - http - - localhost:9898/healthz + httpGet: + port: 9898 + path: /healthz initialDelaySeconds: 5 timeoutSeconds: 5 readinessProbe: - exec: - command: - - podcli - - check - - http - - localhost:9898/readyz + httpGet: + port: 9898 + path: /readyz initialDelaySeconds: 5 timeoutSeconds: 5 resources: