Skip to content

Commit

Permalink
Merge pull request #56 from NIAEFEUP/fix/dev-script-mac
Browse files Browse the repository at this point in the history
Fix kind cluster setup script on Mac
  • Loading branch information
LuisDuarte1 authored May 22, 2024
2 parents 863713d + 7bdb523 commit 65cb91e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dev/setup-kind-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 65cb91e

Please sign in to comment.