File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -473,15 +473,11 @@ function patch_watch_namespace() {
473473function wait_for_deployment() {
474474 local namespace=$1
475475 local name=$2
476+ local retries=" ${3:- 10} "
476477 local needReplicas=$( ${OC} -n ${namespace} get deployment ${name} --no-headers --ignore-not-found -o jsonpath=' {.spec.replicas}' | awk ' {print $1}' )
477478 local readyReplicas=" ${OC} -n ${namespace} get deployment ${name} --no-headers --ignore-not-found -o jsonpath='{.status.readyReplicas}' | grep '${needReplicas} '"
478479 local replicas=" ${OC} -n ${namespace} get deployment ${name} --no-headers --ignore-not-found -o jsonpath='{.status.replicas}' | grep '${needReplicas} '"
479480 local condition=" (${readyReplicas} && ${replicas} )"
480- if [[ $3 != " " ]]; then
481- local retries=$3
482- else
483- local retries=10
484- fi
485481 local sleep_time=30
486482 local total_time_mins=$(( sleep_time * retries / 60 ))
487483 local wait_message=" Waiting for Deployment ${name} to be ready"
You can’t perform that action at this time.
0 commit comments