From 2d1ea7498d5bb12359016ebfb6ad615d34cc4243 Mon Sep 17 00:00:00 2001 From: waynedunican Date: Wed, 11 Dec 2024 15:41:02 +0000 Subject: Fix readiness check Fix readiness check for second apex container Readiness status for apex is now returning "true true" for ready state due to there being two apex containers now coming up in the pod Issue-ID: POLICY-5150 Change-Id: I3765ee4db5170ddf71daca6a4cbdc3c9c2ff5859 Signed-off-by: waynedunican --- csit/resources/scripts/get-cluster-info.sh | 6 +++--- csit/run-k8s-csit.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/csit/resources/scripts/get-cluster-info.sh b/csit/resources/scripts/get-cluster-info.sh index 539bf6a3..d8e4217c 100755 --- a/csit/resources/scripts/get-cluster-info.sh +++ b/csit/resources/scripts/get-cluster-info.sh @@ -76,9 +76,9 @@ function expose_services() { expose_service $DIST_SVC expose_service $ACM_SVC expose_service $POLICY_PPNT_SVC - expose_service POLICY_HTTP_SVC - expose_service POLICY_SIM_SVC - expose_service POLICY_K8S_SVC + expose_service $POLICY_HTTP_SVC + expose_service $POLICY_SIM_SVC + expose_service $POLICY_K8S_SVC setup_message_router_svc sleep 2 diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh index feab0437..a2430623 100755 --- a/csit/run-k8s-csit.sh +++ b/csit/run-k8s-csit.sh @@ -394,7 +394,7 @@ wait_for_pods_running() { pod_status=$(kubectl get pod "$pod" -n "$namespace" --no-headers -o custom-columns=STATUS:.status.phase 2>/dev/null) pod_ready=$(kubectl get pod "$pod" -o jsonpath='{.status.containerStatuses[*].ready}') - if [ "$pod_status" == "Running" ] && [ "$pod_ready" == "true" ]; then + if [ "$pod_status" == "Running" ] && { [ "$pod_ready" == "true" ] || [ "$pod_ready" == "true true" ]; }; then echo "Pod '$pod' in namespace '$namespace' is now in 'Running' state and 'Readiness' is true" else newly_running_pods+=("$pod") -- cgit