mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-27 13:15:36 +00:00
Revert "Merge pull request #92817 from kmala/kubelet"
This reverts commit88512be213
, reversing changes made toc3b888f647
.
This commit is contained in:
committed by
Sergey Kanzhelev
parent
e414d4e5c2
commit
4c9e96c238
@@ -669,7 +669,6 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
|
||||
}
|
||||
klet.containerGC = containerGC
|
||||
klet.containerDeletor = newPodContainerDeletor(klet.containerRuntime, integer.IntMax(containerGCPolicy.MaxPerPodContainer, minDeadContainerInPod))
|
||||
klet.sandboxDeleter = newPodSandboxDeleter(klet.containerRuntime)
|
||||
|
||||
// setup imageManager
|
||||
imageManager, err := images.NewImageGCManager(klet.containerRuntime, klet.StatsProvider, kubeDeps.Recorder, nodeRef, imageGCPolicy, crOptions.PodSandboxImage)
|
||||
@@ -1104,9 +1103,6 @@ type Kubelet struct {
|
||||
// trigger deleting containers in a pod
|
||||
containerDeletor *podContainerDeletor
|
||||
|
||||
// trigger deleting sandboxes in a pod
|
||||
sandboxDeleter *podSandboxDeleter
|
||||
|
||||
// config iptables util rules
|
||||
makeIPTablesUtilChains bool
|
||||
|
||||
@@ -1933,9 +1929,6 @@ func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handle
|
||||
klog.V(4).Infof("SyncLoop (PLEG): ignore irrelevant event: %#v", e)
|
||||
}
|
||||
}
|
||||
if e.Type == pleg.ContainerRemoved {
|
||||
kl.deletePodSandbox(e.ID)
|
||||
}
|
||||
|
||||
if e.Type == pleg.ContainerDied {
|
||||
if containerID, ok := e.Data.(string); ok {
|
||||
@@ -2259,16 +2252,6 @@ func (kl *Kubelet) fastStatusUpdateOnce() {
|
||||
}
|
||||
}
|
||||
|
||||
func (kl *Kubelet) deletePodSandbox(podID types.UID) {
|
||||
if podStatus, err := kl.podCache.Get(podID); err == nil {
|
||||
toKeep := 1
|
||||
if kl.IsPodDeleted(podID) {
|
||||
toKeep = 0
|
||||
}
|
||||
kl.sandboxDeleter.deleteSandboxesInPod(podStatus, toKeep)
|
||||
}
|
||||
}
|
||||
|
||||
// isSyncPodWorthy filters out events that are not worthy of pod syncing
|
||||
func isSyncPodWorthy(event *pleg.PodLifecycleEvent) bool {
|
||||
// ContainerRemoved doesn't affect pod state
|
||||
|
Reference in New Issue
Block a user