Skip to content

Commit 1a5f690

Browse files
committed
e2e: don't use kubelet api to verify pod deletion
Conformance tests must not rely on the kubelet API in order to pass. In this case, I think it's unnecessary to verify that a kubelet observes the deletion within gracePeriod seconds. The remaining checks in this test verify that pod deletion happens, and that the pod is removed.
1 parent cc7c862 commit 1a5f690

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

test/e2e/common/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ go_library(
7171
"//staging/src/k8s.io/client-go/tools/watch:go_default_library",
7272
"//test/e2e/framework:go_default_library",
7373
"//test/e2e/framework/events:go_default_library",
74-
"//test/e2e/framework/kubelet:go_default_library",
7574
"//test/e2e/framework/network:go_default_library",
7675
"//test/e2e/framework/node:go_default_library",
7776
"//test/e2e/framework/pod:go_default_library",

test/e2e/common/pods.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import (
4242
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
4343
"k8s.io/kubernetes/pkg/kubelet"
4444
"k8s.io/kubernetes/test/e2e/framework"
45-
e2ekubelet "k8s.io/kubernetes/test/e2e/framework/kubelet"
4645
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
4746
e2ewebsocket "k8s.io/kubernetes/test/e2e/framework/websocket"
4847
imageutils "k8s.io/kubernetes/test/utils/image"
@@ -301,28 +300,6 @@ var _ = framework.KubeDescribe("Pods", func() {
301300
err = podClient.Delete(context.TODO(), pod.Name, *metav1.NewDeleteOptions(30))
302301
framework.ExpectNoError(err, "failed to delete pod")
303302

304-
ginkgo.By("verifying the kubelet observed the termination notice")
305-
err = wait.Poll(time.Second*5, time.Second*30, func() (bool, error) {
306-
podList, err := e2ekubelet.GetKubeletPods(f.ClientSet, pod.Spec.NodeName)
307-
if err != nil {
308-
framework.Logf("Unable to retrieve kubelet pods for node %v: %v", pod.Spec.NodeName, err)
309-
return false, nil
310-
}
311-
for _, kubeletPod := range podList.Items {
312-
if pod.Name != kubeletPod.Name {
313-
continue
314-
}
315-
if kubeletPod.ObjectMeta.DeletionTimestamp == nil {
316-
framework.Logf("deletion has not yet been observed")
317-
return false, nil
318-
}
319-
return true, nil
320-
}
321-
framework.Logf("no pod exists with the name we were looking for, assuming the termination request was observed and completed")
322-
return true, nil
323-
})
324-
framework.ExpectNoError(err, "kubelet never observed the termination notice")
325-
326303
ginkgo.By("verifying pod deletion was observed")
327304
deleted := false
328305
var lastPod *v1.Pod

0 commit comments

Comments
 (0)