mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Speed up volume tests by reducing pod grace period
busybox based pods don't react to docker stop nicely. By reducing the pod grace period we can save ~29 seconds per volume test.
This commit is contained in:
parent
be8f1cea80
commit
acbe62cff5
@ -359,6 +359,7 @@ func VolumeTestCleanup(f *Framework, config VolumeTestConfig) {
|
|||||||
// pod.
|
// pod.
|
||||||
func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGroup *int64, tests []VolumeTest) {
|
func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGroup *int64, tests []VolumeTest) {
|
||||||
By(fmt.Sprint("starting ", config.Prefix, " client"))
|
By(fmt.Sprint("starting ", config.Prefix, " client"))
|
||||||
|
var gracePeriod int64 = 1
|
||||||
clientPod := &v1.Pod{
|
clientPod := &v1.Pod{
|
||||||
TypeMeta: metav1.TypeMeta{
|
TypeMeta: metav1.TypeMeta{
|
||||||
Kind: "Pod",
|
Kind: "Pod",
|
||||||
@ -387,6 +388,7 @@ func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGro
|
|||||||
VolumeMounts: []v1.VolumeMount{},
|
VolumeMounts: []v1.VolumeMount{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
TerminationGracePeriodSeconds: &gracePeriod,
|
||||||
SecurityContext: &v1.PodSecurityContext{
|
SecurityContext: &v1.PodSecurityContext{
|
||||||
SELinuxOptions: &v1.SELinuxOptions{
|
SELinuxOptions: &v1.SELinuxOptions{
|
||||||
Level: "s0:c0,c1",
|
Level: "s0:c0,c1",
|
||||||
|
Loading…
Reference in New Issue
Block a user