From 9ccade5939a0d95b26ef83fd27c3d4b4e0cca1f3 Mon Sep 17 00:00:00 2001 From: Alejandro Escobar Date: Thu, 26 Jan 2017 12:57:58 -0800 Subject: [PATCH] added warning message to display when host_os is found to be darwin since kubelet is not supported in that case. --- hack/local-up-cluster.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index f218465a58..2528fb7e73 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -318,6 +318,14 @@ cleanup() exit 0 } +function warning { + message=$1 + + echo $(tput bold)$(tput setaf 1) + echo "WARNING: ${message}" + echo $(tput sgr0) +} + function start_etcd { echo "Starting etcd" kube::etcd::start @@ -727,7 +735,20 @@ if [[ "${START_MODE}" != "kubeletonly" ]]; then fi if [[ "${START_MODE}" != "nokubelet" ]]; then - start_kubelet + ## TODO remove this check if/when kubelet is supported on darwin + # Detect the OS name/arch so that we can find our binary + case "$(uname -s)" in + Darwin) + warning "kubelet is not currently supported in darwin, kubelet aborted." + KUBELET_LOG="" + ;; + Linux) + start_kubelet + ;; + *) + echo "Unsupported host OS. Must be Linux or Mac OS X." >&2 + ;; + esac fi if [[ -n "${PSP_ADMISSION}" && "${ENABLE_RBAC}" = true ]]; then @@ -739,3 +760,5 @@ print_success if [[ "${ENABLE_DAEMON}" = false ]]; then while true; do sleep 1; done fi + +