Skip to content

Commit

Permalink
More consistently check OIDC job readiness (#2335)
Browse files Browse the repository at this point in the history
* add common-web-ui-config cm to labeling script

Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>

* update oidc wait logic

Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>

* update conditions

Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>

---------

Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
  • Loading branch information
bluzarraga authored Jan 7, 2025
1 parent f9cf1ac commit fb3a70d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions velero/schedule/common-service-db/cs-db-br-script-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ data:
if [[ $job_exists != "fail" ]]; then
completed=$(oc get job $job_name -n $CSDB_NAMESPACE --no-headers | awk '{print $2}')
retry_count=20
while [[ $completed != "1/1" ]] && [[ $retry_count > 0 ]]
while [[ ( $completed != "1/1" && $completed != "Complete" ) ]] && [[ $retry_count > 0 ]]
do
info "Wait for job $job_name to complete. Try again in 15s."
sleep 15
completed=$(oc get job $job_name -n $CSDB_NAMESPACE --no-headers | awk '{print $2}')
retry_count=$retry_count-1
retry_count=$((retry_count-1))
done
if [[ $retry_count == 0 ]] && [[ $completed != "1/1" ]]; then
if [[ $retry_count == 0 ]] && [[ ( $completed != "1/1" && $completed != "Complete" ) ]]; then
error "Timed out waiting for job $job_name."
else
info "Job $job_name completed."
Expand Down

0 comments on commit fb3a70d

Please sign in to comment.