From 7bdb523eb272e0c4b15c49e4c4ba56bb8664aa9a Mon Sep 17 00:00:00 2001 From: thePeras Date: Wed, 22 May 2024 16:13:02 +0100 Subject: [PATCH] Fix kind cluster setup script on Mac --- dev/setup-kind-cluster.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dev/setup-kind-cluster.sh b/dev/setup-kind-cluster.sh index 457480a..dcf0c9a 100755 --- a/dev/setup-kind-cluster.sh +++ b/dev/setup-kind-cluster.sh @@ -3,14 +3,20 @@ KIND_EXECUTABLE=kind KUBECTL_EXECUTABLE=kubectl CILIUM_EXECUTABLE=cilium-cli +CILIUM_MAC_OS_EXECUTABLE=cilium + +if [ "$(uname)" == "Darwin" ]; then + CILIUM_EXECUTABLE=cilium +fi + HELM_EXECUTABLE=helm # first check if the kind executable exists command -v $KIND_EXECUTABLE >/dev/null 2>&1 || { echo >&2 "I require '$KIND_EXECUTABLE' but it's not installed. Aborting."; exit 1; } command -v $KUBECTL_EXECUTABLE >/dev/null 2>&1 || { echo >&2 "I require '$KUBECTL_EXECUTABLE' but it's not installed. Aborting."; exit 1; } -command -v $CILIUM_EXECUTABLE >/dev/null 2>&1 || { echo >&2 "I require '$CILIUM_EXECUTABLE' but it's not installed. Aborting."; exit 1; } -command -v $HELM_EXECUTABLE >/dev/null 2>&1 || { echo >&2 "I require '$CILIUM_EXECUTABLE' but it's not installed. Aborting."; exit 1; } +command -v $CILIUM_EXECUTABLE >/dev/null 2>&1 || command -v $CILIUM_MAC_OS_EXECUTABLE >/dev/null 2>&1 || { echo >&2 "I require '$CILIUM_EXECUTABLE' or '$CILIUM_MAC_OS_EXECUTABLE' but it's not installed. Aborting."; exit 1; } +command -v $HELM_EXECUTABLE >/dev/null 2>&1 || { echo >&2 "I require '$HELM_EXECUTABLE' but it's not installed. Aborting."; exit 1; } # Create "kind" network, deleting any old ones if they exist