Skip to content

Commit a9e829d

Browse files
committed
add kubectl and helm checks
Allow the setup-minikube command to check for helm and kubectl because minikube will want to use kubectl right away, and helm is needed for logging later on.
1 parent 9e5d3c7 commit a9e829d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

resources/scripts/setup_minikube.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,24 @@ else
7272
ERROR_CODE=127
7373
fi
7474

75+
kubectl_path=$(command -v kubectl || true)
76+
if [ -n "$kubectl_path" ]; then
77+
print_partial_message " ⭐️ Found " "kubectl" ": $kubectl_path " "$BOLD"
78+
else
79+
print_partial_message " 💥 Could not find " "kubectl" ". Please follow this link to install it..." "$BOLD"
80+
print_message "" " https://kubernetes.io/docs/tasks/tools/" "$BOLD"
81+
ERROR_CODE=127
82+
fi
83+
84+
helm_path=$(command -v helm || true)
85+
if [ -n "$helm_path" ]; then
86+
print_partial_message " ⭐️ Found " "helm" ": $helm_path" "$BOLD"
87+
else
88+
print_partial_message " 💥 Could not find " "helm" ". Please follow this link to install it..." "$BOLD"
89+
print_message "" " https://helm.sh/docs/intro/install/" "$BOLD"
90+
ERROR_CODE=127
91+
fi
92+
7593
if [ $ERROR_CODE -ne 0 ]; then
7694
print_message "" "There were errors in the setup process. Please fix them and try again." "$BOLD"
7795
exit $ERROR_CODE

0 commit comments

Comments
 (0)