diff --git a/devel/ci-run-e2e.sh b/devel/ci-run-e2e.sh index 396d14786..a345a0b01 100755 --- a/devel/ci-run-e2e.sh +++ b/devel/ci-run-e2e.sh @@ -54,9 +54,14 @@ fi # When running in our CI environment the Docker network's subnet choice will cause issues with routing # This works this around till we have a way to properly patch this. -docker network create --driver=bridge --subnet=192.168.0.0/16 --gateway 192.168.0.1 kind -# Wait a second for the network to be created so kind does not overwrite it -sleep 5 +if ! docker network inspect kind ; then + docker network create --driver=bridge --subnet=192.168.0.0/16 --gateway 192.168.0.1 kind +fi + +# Wait for the network to be created so kind does not overwrite it +while ! docker network inspect kind ; do + sleep 100ms +done echo "Ensuring a kind cluster exists..." "${SCRIPT_ROOT}/cluster/create.sh"