From 351fe77741f130573dfff68fefdfdcb3bbee1b4c Mon Sep 17 00:00:00 2001 From: Mario Constanti Date: Fri, 15 Dec 2023 09:58:39 +0100 Subject: [PATCH] fix: kind cluster name must be match exactly (#10) We should match on the exact cluster name (instead of doing some wildcard matching). The current implementation wouldn't create the dedicated `garm` kind cluster if there is already a cluster with a similar name (e.g. `garm-operator`) Signed-off-by: Mario Constanti --- hack/scripts/kind-with-registry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/scripts/kind-with-registry.sh b/hack/scripts/kind-with-registry.sh index e76ffb0..5aa1b41 100755 --- a/hack/scripts/kind-with-registry.sh +++ b/hack/scripts/kind-with-registry.sh @@ -20,7 +20,7 @@ fi KIND_CLUSTER_NAME=${GARM_KIND_CLUSTER_NAME:-"garm"} # 1. If kind cluster already exists exit. -if [[ "$(kind get clusters)" =~ .*"${KIND_CLUSTER_NAME}".* ]]; then +if [[ "$(kind get clusters)" = "${KIND_CLUSTER_NAME}" ]]; then echo "kind cluster already exists, moving on" exit 0 fi