From d73952e35f658f572d2951158728b5b83e19d819 Mon Sep 17 00:00:00 2001 From: Ben Luzarraga <31223504+bluzarraga@users.noreply.github.com> Date: Tue, 23 Sep 2025 14:50:14 -0500 Subject: [PATCH] fix broken wait_for_deployment function (#2631) --- cp3pt0-deployment/common/utils.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cp3pt0-deployment/common/utils.sh b/cp3pt0-deployment/common/utils.sh index 650cb93ec..05d94aea9 100644 --- a/cp3pt0-deployment/common/utils.sh +++ b/cp3pt0-deployment/common/utils.sh @@ -473,15 +473,11 @@ function patch_watch_namespace() { function wait_for_deployment() { local namespace=$1 local name=$2 + local retries="${3:-10}" local needReplicas=$(${OC} -n ${namespace} get deployment ${name} --no-headers --ignore-not-found -o jsonpath='{.spec.replicas}' | awk '{print $1}') local readyReplicas="${OC} -n ${namespace} get deployment ${name} --no-headers --ignore-not-found -o jsonpath='{.status.readyReplicas}' | grep '${needReplicas}'" local replicas="${OC} -n ${namespace} get deployment ${name} --no-headers --ignore-not-found -o jsonpath='{.status.replicas}' | grep '${needReplicas}'" local condition="(${readyReplicas} && ${replicas})" - if [[ $3 != "" ]]; then - local retries=$3 - else - local retries=10 - fi local sleep_time=30 local total_time_mins=$(( sleep_time * retries / 60)) local wait_message="Waiting for Deployment ${name} to be ready"