mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
Merge pull request #34786 from davidopp/master
Automatic merge from submit-queue Make NodeController recognize deletion tombstones cc/ @lavalamp @gmarek
This commit is contained in:
commit
0b74e39864
@ -118,7 +118,16 @@ func forcefullyDeleteNode(kubeClient clientset.Interface, nodeName string, force
|
|||||||
func (nc *NodeController) maybeDeleteTerminatingPod(obj interface{}) {
|
func (nc *NodeController) maybeDeleteTerminatingPod(obj interface{}) {
|
||||||
pod, ok := obj.(*api.Pod)
|
pod, ok := obj.(*api.Pod)
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
|
||||||
|
if !ok {
|
||||||
|
glog.Errorf("Couldn't get object from tombstone %#v", obj)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
pod, ok = tombstone.Obj.(*api.Pod)
|
||||||
|
if !ok {
|
||||||
|
glog.Errorf("Tombstone contained object that is not a Pod %#v", obj)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// consider only terminating pods
|
// consider only terminating pods
|
||||||
|
Loading…
Reference in New Issue
Block a user