Merge pull request #5802 from BigDarkClown/similaalalala

Recalculate similar node groups for the best scale-up option
This commit is contained in:
Kubernetes Prow Robot 2023-05-24 04:32:50 -07:00 committed by GitHub
commit 5a84f9628c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -220,11 +220,11 @@ func (o *ScaleUpOrchestrator) ScaleUp(
// TODO(lukaszos) when pursuing scalability update this call with one which takes list of changed node groups so we do not
// do extra API calls. (the call at the bottom of ScaleUp() could be also changed then)
o.clusterStateRegistry.Recalculate()
// Recompute similar node groups
bestOption.SimilarNodeGroups = o.ComputeSimilarNodeGroups(createNodeGroupResult.MainCreatedNodeGroup, nodeInfos, schedulablePods, now)
}
// Recompute similar node groups in case they need to be updated
bestOption.SimilarNodeGroups = o.ComputeSimilarNodeGroups(bestOption.NodeGroup, nodeInfos, schedulablePods, now)
nodeInfo, found := nodeInfos[bestOption.NodeGroup.Id()]
if !found {
// This should never happen, as we already should have retrieved nodeInfo for any considered nodegroup.