Skip to content

Commit fb3a70d

Browse files
authored
More consistently check OIDC job readiness (#2335)
* add common-web-ui-config cm to labeling script Signed-off-by: Ben Luzarraga <[email protected]> * update oidc wait logic Signed-off-by: Ben Luzarraga <[email protected]> * update conditions Signed-off-by: Ben Luzarraga <[email protected]> --------- Signed-off-by: Ben Luzarraga <[email protected]>
1 parent f9cf1ac commit fb3a70d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

velero/schedule/common-service-db/cs-db-br-script-cm.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ data:
153153
if [[ $job_exists != "fail" ]]; then
154154
completed=$(oc get job $job_name -n $CSDB_NAMESPACE --no-headers | awk '{print $2}')
155155
retry_count=20
156-
while [[ $completed != "1/1" ]] && [[ $retry_count > 0 ]]
156+
while [[ ( $completed != "1/1" && $completed != "Complete" ) ]] && [[ $retry_count > 0 ]]
157157
do
158158
info "Wait for job $job_name to complete. Try again in 15s."
159159
sleep 15
160160
completed=$(oc get job $job_name -n $CSDB_NAMESPACE --no-headers | awk '{print $2}')
161-
retry_count=$retry_count-1
161+
retry_count=$((retry_count-1))
162162
done
163163
164-
if [[ $retry_count == 0 ]] && [[ $completed != "1/1" ]]; then
164+
if [[ $retry_count == 0 ]] && [[ ( $completed != "1/1" && $completed != "Complete" ) ]]; then
165165
error "Timed out waiting for job $job_name."
166166
else
167167
info "Job $job_name completed."

0 commit comments

Comments
 (0)