mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Fail kubelet if cadvisor is not started.
This commit is contained in:
parent
4251ebd1eb
commit
973f2fcd86
@ -914,7 +914,9 @@ func (kl *Kubelet) initializeModules() error {
|
||||
// initializeRuntimeDependentModules will initialize internal modules that require the container runtime to be up.
|
||||
func (kl *Kubelet) initializeRuntimeDependentModules() {
|
||||
if err := kl.cadvisor.Start(); err != nil {
|
||||
kl.runtimeState.setInternalError(fmt.Errorf("failed to start cAdvisor %v", err))
|
||||
// Fail kubelet and rely on the babysitter to retry starting kubelet.
|
||||
// TODO(random-liu): Add backoff logic in the babysitter
|
||||
glog.Fatalf("Failed to start cAdvisor %v", err)
|
||||
}
|
||||
// eviction manager must start after cadvisor because it needs to know if the container runtime has a dedicated imagefs
|
||||
if err := kl.evictionManager.Start(kl, kl.getActivePods, evictionMonitoringPeriod); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user