Revert "Fix an issue that a Pod's nominatedNodeName cannot be cleared when the nominated node is deleted"

This reverts commit 369a9001c6.
This commit is contained in:
Wei Huang
2020-06-09 16:47:37 -07:00
parent 6ac3ca4b17
commit 51a9dcce22
4 changed files with 8 additions and 93 deletions

View File

@@ -483,7 +483,7 @@ func noPodsInNamespace(c clientset.Interface, podNamespace string) wait.Conditio
// cleanupPodsInNamespace deletes the pods in the given namespace and waits for them to
// be actually deleted.
func cleanupPodsInNamespace(cs clientset.Interface, t *testing.T, ns string) {
if err := cs.CoreV1().Pods(ns).DeleteCollection(context.TODO(), *metav1.NewDeleteOptions(0), metav1.ListOptions{}); err != nil {
if err := cs.CoreV1().Pods(ns).DeleteCollection(context.TODO(), metav1.DeleteOptions{}, metav1.ListOptions{}); err != nil {
t.Errorf("error while listing pod in namespace %v: %v", ns, err)
return
}