Improve docker network logic

Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
This commit is contained in:
Maartje Eyskens
2020-07-21 13:17:15 +02:00
parent 6af8ebc15a
commit b4305bee8f
+8 -3
View File
@@ -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"