mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 14:11:14 +00:00
Merge pull request #38777 from alejandroEsc/ae/osx_cadvisor
Automatic merge from submit-queue (batch tested with PRs 40126, 40565, 38777, 40564, 40572) Print warning about kubelet not running on darwin via local-up-cluster.sh **What this PR does / why we need it**: As of the time of opening this PR, near the release of v.1.5, using `./hack/local-up-cluster.sh` claims to succeed and run kubelet, but logs, processes, and attempts to hit the service demonstrate that kubelet is NOT running. The issue has been found to be the hard requirements of cadvisor forcing kubelet to force exit when it is found to be unsupported as in the case of DARWIN. My goal here is to bring the issue to attention to others and also help other devs avoid the issue. **Release note**: ```NONE``` kubelet.go and kubelet's server.go file has minimal logic that keeps kubelet from breaking just because osx has not cadvisor support.
This commit is contained in:
@@ -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
|
||||
## 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)
|
||||
warning "kubelet is not currently supported in darwin, kubelet aborted."
|
||||
KUBELET_LOG=""
|
||||
;;
|
||||
Linux)
|
||||
start_kubelet
|
||||
;;
|
||||
*)
|
||||
warning "Unsupported host OS. Must be Linux or Mac OS X, kubelet aborted."
|
||||
;;
|
||||
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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user