From e3ca9570a5da118fbf1f5a89ee6c5dfc6d1f9e37 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 12 Mar 2017 00:43:23 -0500 Subject: [PATCH] Delete host exec pods rapidly For some tests this makes namespace deletion faster (we poll for resources at 1/2 their innate termination grace period), thus speeding up the test. --- test/e2e/framework/util.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 08746f6657e..a3512a84589 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -3814,6 +3814,7 @@ func IssueSSHCommand(cmd, provider string, node *v1.Node) error { // NewHostExecPodSpec returns the pod spec of hostexec pod func NewHostExecPodSpec(ns, name string) *v1.Pod { + immediate := int64(0) pod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -3827,8 +3828,9 @@ func NewHostExecPodSpec(ns, name string) *v1.Pod { ImagePullPolicy: v1.PullIfNotPresent, }, }, - HostNetwork: true, - SecurityContext: &v1.PodSecurityContext{}, + HostNetwork: true, + SecurityContext: &v1.PodSecurityContext{}, + TerminationGracePeriodSeconds: &immediate, }, } return pod