mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Merge pull request #36430 from kargakis/fix-deployment-progress-estimation
Automatic merge from submit-queue Use the correct time field to estimate progress in deployments Fixes https://github.com/kubernetes/kubernetes/issues/36427 @kubernetes/deployment
This commit is contained in:
commit
2a674307f5
@ -844,7 +844,7 @@ func DeploymentTimedOut(deployment *extensions.Deployment, newStatus *extensions
|
|||||||
// Look at the difference in seconds between now and the last time we reported any
|
// Look at the difference in seconds between now and the last time we reported any
|
||||||
// progress or tried to create a replica set, or resumed a paused deployment and
|
// progress or tried to create a replica set, or resumed a paused deployment and
|
||||||
// compare against progressDeadlineSeconds.
|
// compare against progressDeadlineSeconds.
|
||||||
from := condition.LastTransitionTime
|
from := condition.LastUpdateTime
|
||||||
delta := time.Duration(*deployment.Spec.ProgressDeadlineSeconds) * time.Second
|
delta := time.Duration(*deployment.Spec.ProgressDeadlineSeconds) * time.Second
|
||||||
return from.Add(delta).Before(nowFn())
|
return from.Add(delta).Before(nowFn())
|
||||||
}
|
}
|
||||||
|
@ -1055,9 +1055,9 @@ func TestDeploymentTimedOut(t *testing.T) {
|
|||||||
Status: extensions.DeploymentStatus{
|
Status: extensions.DeploymentStatus{
|
||||||
Conditions: []extensions.DeploymentCondition{
|
Conditions: []extensions.DeploymentCondition{
|
||||||
{
|
{
|
||||||
Type: condType,
|
Type: condType,
|
||||||
Status: status,
|
Status: status,
|
||||||
LastTransitionTime: unversioned.Time{Time: from},
|
LastUpdateTime: unversioned.Time{Time: from},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user