Add grace period to volume_io tests

This speeds up termination of client pods.
pull/8/head
Jan Safranek 2018-03-02 16:41:40 +01:00
parent f0fc0e1555
commit 410b724026
1 changed files with 3 additions and 1 deletions

View File

@ -65,6 +65,7 @@ var md5hashes = map[int64]string{
func makePodSpec(config framework.VolumeTestConfig, dir, initCmd string, volsrc v1.VolumeSource, podSecContext *v1.PodSecurityContext) *v1.Pod {
volName := fmt.Sprintf("%s-%s", config.Prefix, "io-volume")
var gracePeriod int64 = 1
return &v1.Pod{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
@ -111,7 +112,8 @@ func makePodSpec(config framework.VolumeTestConfig, dir, initCmd string, volsrc
},
},
},
SecurityContext: podSecContext,
TerminationGracePeriodSeconds: &gracePeriod,
SecurityContext: podSecContext,
Volumes: []v1.Volume{
{
Name: volName,