Fix readiness check 15/139715/1
authorwaynedunican <wayne.dunican@est.tech>
Wed, 11 Dec 2024 15:41:02 +0000 (15:41 +0000)
committerwaynedunican <wayne.dunican@est.tech>
Wed, 11 Dec 2024 15:44:50 +0000 (15:44 +0000)
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 <wayne.dunican@est.tech>
csit/resources/scripts/get-cluster-info.sh
csit/run-k8s-csit.sh

index 539bf6a..d8e4217 100755 (executable)
@@ -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
index feab043..a243062 100755 (executable)
@@ -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")