From 53bd173b2527d6850d1aaa7fc1a23b7ebc27b676 Mon Sep 17 00:00:00 2001 From: Daniel Kiptoon Date: Sun, 25 Feb 2024 20:39:00 +0300 Subject: [PATCH] ensure meshsync pod is ready before deploying test pod Signed-off-by: Daniel Kiptoon --- .github/workflows/e2etests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2etests.yml b/.github/workflows/e2etests.yml index 2237faa5..0f18ecba 100644 --- a/.github/workflows/e2etests.yml +++ b/.github/workflows/e2etests.yml @@ -143,6 +143,7 @@ jobs: kubectl scale --replicas=1 deployment ${DEPLOYMENT_NAME} -n meshery kubectl rollout status deployment ${DEPLOYMENT_NAME} -n $NAMESPACE kubectl get pods -A + kubectl wait --for=condition=Ready pod --all --all-namespaces --timeout=300s # Deploy pod kubectl run nginx-pod --image=nginx --labels=app=web,tier=frontend,purpose=meshsync-test kubectl wait --for=condition=Ready pod --all --all-namespaces --timeout=300s @@ -157,8 +158,7 @@ jobs: echo "this is $svcip" SECONDS=0 end=$((SECONDS+300)) - while [ $SECONDS -lt $end ]; do - echo $podname + while [ $SECONDS -lt $end ]; do echo $(kubectl logs pod/$podname -n meshery) result=$(curl -s --location "${svcip}/api/system/meshsync/resources?kind=Pod&spec=true&annotations=true&labels=true&clusterIds=%5B\"${CLUSTER_ID}\"%5D&page=0&pagesize=25&search=&order=&sort=desc" \ --header "meshery-token: ${{ secrets.PROVIDER_TOKEN }}" \