Skip to content

Commit

Permalink
Also wait for all the job pods to be completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
chizhg committed Sep 18, 2020
1 parent e5e518b commit 49c94e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ function wait_until_object_does_not_exist() {
function wait_until_pods_running() {
echo "Waiting until all pods in namespace $1 are up"
kubectl wait pod --for=condition=Ready -n "$1" -l '!job-name' --timeout=5m || return 1
# Also wait for all the job pods to be completed.
kubectl wait job --for=condition=Complete --all -n "$1" || return 1
}

# Waits until all batch jobs complete in the given namespace.
Expand Down

0 comments on commit 49c94e7

Please sign in to comment.