Skip to content

Commit b014022

Browse files
authored
Merge pull request kubernetes#93306 from bart0sh/PR0092-revert-foreground-deletion
Revert "e2epod: use foreground deletion"
2 parents 32438cf + 6a40cc9 commit b014022

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

test/e2e/framework/pod/delete.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func DeletePodOrFail(c clientset.Interface, ns, name string) {
4848
}
4949

5050
// DeletePodWithWait deletes the passed-in pod and waits for the pod to be terminated. Resilient to the pod
51-
// not existing. Also waits for all owned resources to be deleted.
51+
// not existing.
5252
func DeletePodWithWait(c clientset.Interface, pod *v1.Pod) error {
5353
if pod == nil {
5454
return nil
@@ -57,17 +57,10 @@ func DeletePodWithWait(c clientset.Interface, pod *v1.Pod) error {
5757
}
5858

5959
// DeletePodWithWaitByName deletes the named and namespaced pod and waits for the pod to be terminated. Resilient to the pod
60-
// not existing. Also waits for all owned resources to be deleted.
60+
// not existing.
6161
func DeletePodWithWaitByName(c clientset.Interface, podName, podNamespace string) error {
6262
e2elog.Logf("Deleting pod %q in namespace %q", podName, podNamespace)
63-
deletionPolicy := metav1.DeletePropagationForeground
64-
err := c.CoreV1().Pods(podNamespace).Delete(context.TODO(), podName,
65-
metav1.DeleteOptions{
66-
// If the pod is the owner of some resources (like ephemeral inline volumes),
67-
// then we want to be sure that those are also gone before we return.
68-
// Blocking pod deletion via metav1.DeletePropagationForeground achieves that.
69-
PropagationPolicy: &deletionPolicy,
70-
})
63+
err := c.CoreV1().Pods(podNamespace).Delete(context.TODO(), podName, metav1.DeleteOptions{})
7164
if err != nil {
7265
if apierrors.IsNotFound(err) {
7366
return nil // assume pod was already deleted

0 commit comments

Comments
 (0)