Skip to content

Commit

Permalink
Merge pull request kubernetes#1786 from jkaniuk/inactive-pods
Browse files Browse the repository at this point in the history
Do not wait for inactive pods during scale down
  • Loading branch information
k8s-ci-robot authored Apr 26, 2021
2 parents 05b63b3 + dfbc01a commit 4353625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clusterloader2/pkg/measurement/util/wait_for_pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func WaitForPods(clientSet clientset.Interface, stopCh <-chan struct{}, options
}
// When using preemptibles on large scale, number of ready nodes is not stable and reaching DesiredPodCount could take a very long time.
// Overall number of pods (especially Inactive pods) should not grow unchecked.
if options.CountErrorMargin > 0 && podsStatus.RunningUpdated >= desiredPodCount-options.CountErrorMargin && len(pods) <= desiredPodCount {
if options.CountErrorMargin > 0 && podsStatus.RunningUpdated >= desiredPodCount-options.CountErrorMargin && len(pods)-podsStatus.Inactive <= desiredPodCount && podsStatus.Inactive <= options.CountErrorMargin {
return nil
}
oldPods = pods
Expand Down

0 comments on commit 4353625

Please sign in to comment.