mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Container deletion should still happen when pod is removed from pod manager
This commit is contained in:
parent
faffbe4e18
commit
8ee2dc88f2
@ -2188,14 +2188,13 @@ func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handle
|
|||||||
case e := <-plegCh:
|
case e := <-plegCh:
|
||||||
if isSyncPodWorthy(e) {
|
if isSyncPodWorthy(e) {
|
||||||
// PLEG event for a pod; sync it.
|
// PLEG event for a pod; sync it.
|
||||||
pod, ok := kl.podManager.GetPodByUID(e.ID)
|
if pod, ok := kl.podManager.GetPodByUID(e.ID); ok {
|
||||||
if !ok {
|
glog.V(2).Infof("SyncLoop (PLEG): %q, event: %#v", format.Pod(pod), e)
|
||||||
|
handler.HandlePodSyncs([]*api.Pod{pod})
|
||||||
|
} else {
|
||||||
// If the pod no longer exists, ignore the event.
|
// If the pod no longer exists, ignore the event.
|
||||||
glog.V(4).Infof("SyncLoop (PLEG): ignore irrelevant event: %#v", e)
|
glog.V(4).Infof("SyncLoop (PLEG): ignore irrelevant event: %#v", e)
|
||||||
break
|
|
||||||
}
|
}
|
||||||
glog.V(2).Infof("SyncLoop (PLEG): %q, event: %#v", format.Pod(pod), e)
|
|
||||||
handler.HandlePodSyncs([]*api.Pod{pod})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if e.Type == pleg.ContainerDied {
|
if e.Type == pleg.ContainerDied {
|
||||||
|
Loading…
Reference in New Issue
Block a user