Merge pull request #121213 from charles-chenzz/e2e_3085_kep

KEP 3085: check PodReadyToStartContainers condition after volume create
This commit is contained in:
Kubernetes Prow Robot 2023-10-17 20:08:19 +02:00 committed by GitHub
commit 3ae76863a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,6 +134,33 @@ func runPodFailingConditionsTest(f *framework.Framework, hasInitContainers, chec
// Verify PodReady is not set (since sandboxcreation is blocked)
_, err = getTransitionTimeForPodConditionWithStatus(p, v1.PodReady, false)
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)
}
}
}