mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
fix readiness flake in UnhealthyPodEvictionPolicy
This commit is contained in:
parent
79fee524e6
commit
3f8d799c9f
@ -474,7 +474,7 @@ var _ = SIGDescribe("DisruptionController", func() {
|
||||
rs.Labels["name"] = rsName
|
||||
initialDelaySeconds := framework.PodStartTimeout.Seconds() + 30
|
||||
if tc.podsShouldBecomeReadyFirst {
|
||||
initialDelaySeconds = 0
|
||||
initialDelaySeconds = 20
|
||||
}
|
||||
rs.Spec.Template.Spec.Containers[0].ReadinessProbe = &v1.Probe{
|
||||
ProbeHandler: v1.ProbeHandler{
|
||||
@ -511,6 +511,9 @@ var _ = SIGDescribe("DisruptionController", func() {
|
||||
Namespace: ns,
|
||||
},
|
||||
}
|
||||
// New pods can be created between the evictions by a replica set controller.
|
||||
// This can affect the PDB, and pods could potentially be evicted that shouldn't be.
|
||||
// To prevent this, there should always be a sufficient pod readiness delay (see initialDelaySeconds).
|
||||
err = cs.CoreV1().Pods(ns).EvictV1(ctx, e)
|
||||
if err == nil {
|
||||
evictedPods.Insert(pod.Name)
|
||||
|
Loading…
Reference in New Issue
Block a user