From 584eb5e947f57f35bf47cbe7960ecdd386477130 Mon Sep 17 00:00:00 2001 From: Rishabh Jain Date: Wed, 30 Jun 2021 16:36:50 +0530 Subject: [PATCH] Update local-cluster-up.sh to auto-detect darwin and skip kubelet and kube-proxy --- hack/local-up-cluster.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 0f46fe53ec6..5a74c703da8 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -1188,9 +1188,22 @@ fi if [[ "${START_MODE}" != "kubeletonly" ]]; then if [[ "${START_MODE}" != "nokubeproxy" ]]; then - start_kubeproxy + ## TODO remove this check if/when kubelet is supported on darwin + # Detect the OS name/arch and display appropriate error. + case "$(uname -s)" in + Darwin) + print_color "kubelet is not currently supported in darwin, kube-proxy aborted." + ;; + Linux) + start_kubeproxy + ;; + *) + print_color "Unsupported host OS. Must be Linux or Mac OS X, kube-proxy aborted." + ;; + esac fi fi + if [[ -n "${PSP_ADMISSION}" && "${AUTHORIZATION_MODE}" = *RBAC* ]]; then create_psp_policy fi