added warning message to display when host_os is found to be darwin since kubelet is not supported in that case.

pull/6/head
Alejandro Escobar 2017-01-26 12:57:58 -08:00
parent 5b75980c32
commit 9ccade5939
1 changed files with 24 additions and 1 deletions

View File

@ -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