mirror of https://github.com/k3s-io/k3s
added warning message to display when host_os is found to be darwin since kubelet is not supported in that case.
parent
5b75980c32
commit
9ccade5939
|
@ -318,6 +318,14 @@ cleanup()
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function warning {
|
||||||
|
message=$1
|
||||||
|
|
||||||
|
echo $(tput bold)$(tput setaf 1)
|
||||||
|
echo "WARNING: ${message}"
|
||||||
|
echo $(tput sgr0)
|
||||||
|
}
|
||||||
|
|
||||||
function start_etcd {
|
function start_etcd {
|
||||||
echo "Starting etcd"
|
echo "Starting etcd"
|
||||||
kube::etcd::start
|
kube::etcd::start
|
||||||
|
@ -727,7 +735,20 @@ if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${START_MODE}" != "nokubelet" ]]; then
|
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
|
fi
|
||||||
|
|
||||||
if [[ -n "${PSP_ADMISSION}" && "${ENABLE_RBAC}" = true ]]; then
|
if [[ -n "${PSP_ADMISSION}" && "${ENABLE_RBAC}" = true ]]; then
|
||||||
|
@ -739,3 +760,5 @@ print_success
|
||||||
if [[ "${ENABLE_DAEMON}" = false ]]; then
|
if [[ "${ENABLE_DAEMON}" = false ]]; then
|
||||||
while true; do sleep 1; done
|
while true; do sleep 1; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue