From e6f214e4d0952f2a75d54dfc7e431b8d8699370a Mon Sep 17 00:00:00 2001 From: Jordi Gil Date: Sun, 4 Feb 2024 10:33:47 +0100 Subject: [PATCH] Fixes kind create cluster script that contained a hardcoded IP for the registry configuration in containerd. Instead it now uses the associated IP of the registry container running in Docker Signed-off-by: Jordi Gil --- hack/ci/create-kind-cluster-with-registry.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hack/ci/create-kind-cluster-with-registry.sh b/hack/ci/create-kind-cluster-with-registry.sh index bb341a114..2feb2c254 100755 --- a/hack/ci/create-kind-cluster-with-registry.sh +++ b/hack/ci/create-kind-cluster-with-registry.sh @@ -64,9 +64,11 @@ fi # # We want a consistent name that works from both ends, so we tell containerd to # alias localhost:${reg_port} to the registry container when pulling images -REGISTRY_DIR="/etc/containerd/certs.d/172.18.0.3:5000" -# retrieve IP address of the container connected to the cluster network + +# Retrieve IP address of the container connected to the cluster network IP_ADDRESS=$(docker inspect --format='{{(index (index .NetworkSettings.Networks "kind") ).IPAddress}}' ${reg_name}) + +REGISTRY_DIR="/etc/containerd/certs.d/${IP_ADDRESS}:5000" for node in $(kind get nodes); do docker exec "${node}" mkdir -p "${REGISTRY_DIR}" cat <