Skip to content

Commit

Permalink
Replace wait-for-object-creation with kubectl wait
Browse files Browse the repository at this point in the history
As of kubectl 1.31, there's a `kubectl wait --for=create`.
  • Loading branch information
mflendrich committed Feb 19, 2025
1 parent 16509d2 commit c668063
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hack/lib/kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ function kubectl_create {
}

function wait-for-object-creation {
for i in {1..30}; do
{ kubectl -n "${1}" get "${2}" && break; } || sleep 1
done
kubectl wait --timeout=60s --for=create -n "${1}" "${2}"
}

# $1 - namespace
Expand Down

0 comments on commit c668063

Please sign in to comment.