Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions cp3pt0-deployment/common/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading