mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	use handle DeletedFinalStateUnknown objects in function deleteNode
This commit is contained in:
		@@ -114,9 +114,14 @@ func (g *graphPopulator) updateNode(oldObj, obj interface{}) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (g *graphPopulator) deleteNode(obj interface{}) {
 | 
					func (g *graphPopulator) deleteNode(obj interface{}) {
 | 
				
			||||||
	node := obj.(*api.Node)
 | 
						if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok {
 | 
				
			||||||
 | 
							obj = tombstone.Obj
 | 
				
			||||||
	// TODO(mtaufen): ensure len(nodeName) > 0 in all cases (would sure be nice to have a dependently-typed language here...)
 | 
						}
 | 
				
			||||||
 | 
						node, ok := obj.(*api.Node)
 | 
				
			||||||
 | 
						if !ok {
 | 
				
			||||||
 | 
							glog.Infof("unexpected type %T", obj)
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// NOTE: We don't remove the node, because if the node is re-created not all pod -> node
 | 
						// NOTE: We don't remove the node, because if the node is re-created not all pod -> node
 | 
				
			||||||
	// links are re-established (we don't get relevant events because the no mutations need
 | 
						// links are re-established (we don't get relevant events because the no mutations need
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user