mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 16:21:13 +00:00
Merge pull request #121213 from charles-chenzz/e2e_3085_kep
KEP 3085: check PodReadyToStartContainers condition after volume create
This commit is contained in:
commit
3ae76863a5
@ -134,6 +134,33 @@ func runPodFailingConditionsTest(f *framework.Framework, hasInitContainers, chec
|
|||||||
// Verify PodReady is not set (since sandboxcreation is blocked)
|
// Verify PodReady is not set (since sandboxcreation is blocked)
|
||||||
_, err = getTransitionTimeForPodConditionWithStatus(p, v1.PodReady, false)
|
_, err = getTransitionTimeForPodConditionWithStatus(p, v1.PodReady, false)
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
|
|
||||||
|
ginkgo.By("update pod related volume resource to unblock sandbox creation")
|
||||||
|
|
||||||
|
e2epod.NewPodClient(f).Update(ctx, p.Name, func(pod *v1.Pod) {
|
||||||
|
pod.Spec.Volumes = []v1.Volume{
|
||||||
|
{
|
||||||
|
Name: "secret",
|
||||||
|
VolumeSource: v1.VolumeSource{
|
||||||
|
Secret: &v1.SecretVolumeSource{
|
||||||
|
SecretName: "secret",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
pod.Spec.Containers[0].VolumeMounts = []v1.VolumeMount{
|
||||||
|
{
|
||||||
|
Name: "secret",
|
||||||
|
MountPath: "/config",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Verify PodReadyToStartContainers is set (since sandboxcreation is unblocked)
|
||||||
|
if checkPodReadyToStart {
|
||||||
|
_, err = getTransitionTimeForPodConditionWithStatus(p, v1.PodReadyToStartContainers, true)
|
||||||
|
framework.ExpectNoError(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user