mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 11:48:15 +00:00
Make NodeController recognize deletion tombstones.
This commit is contained in:
@@ -118,8 +118,17 @@ 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 {
|
||||||
|
tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
|
||||||
|
if !ok {
|
||||||
|
glog.Errorf("Couldn't get object from tombstone %#v", obj)
|
||||||
return
|
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
|
||||||
if pod.DeletionTimestamp == nil {
|
if pod.DeletionTimestamp == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user