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.
This commit is contained in:
@@ -3814,6 +3814,7 @@ func IssueSSHCommand(cmd, provider string, node *v1.Node) error {
|
|||||||
|
|
||||||
// NewHostExecPodSpec returns the pod spec of hostexec pod
|
// NewHostExecPodSpec returns the pod spec of hostexec pod
|
||||||
func NewHostExecPodSpec(ns, name string) *v1.Pod {
|
func NewHostExecPodSpec(ns, name string) *v1.Pod {
|
||||||
|
immediate := int64(0)
|
||||||
pod := &v1.Pod{
|
pod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: name,
|
Name: name,
|
||||||
@@ -3827,8 +3828,9 @@ func NewHostExecPodSpec(ns, name string) *v1.Pod {
|
|||||||
ImagePullPolicy: v1.PullIfNotPresent,
|
ImagePullPolicy: v1.PullIfNotPresent,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
HostNetwork: true,
|
HostNetwork: true,
|
||||||
SecurityContext: &v1.PodSecurityContext{},
|
SecurityContext: &v1.PodSecurityContext{},
|
||||||
|
TerminationGracePeriodSeconds: &immediate,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return pod
|
return pod
|
||||||
|
|||||||
Reference in New Issue
Block a user