Skip to content

Commit

Permalink
fix: kind cluster name must be match exactly (#10)
Browse files Browse the repository at this point in the history
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 <mario.constanti@mercedes-benz.com>
  • Loading branch information
bavarianbidi committed Dec 15, 2023
1 parent d756101 commit 351fe77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/scripts/kind-with-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 351fe77

Please sign in to comment.