Skip to content

Commit

Permalink
Merge pull request kubernetes#5802 from BigDarkClown/similaalalala
Browse files Browse the repository at this point in the history
Recalculate similar node groups for the best scale-up option
  • Loading branch information
k8s-ci-robot authored May 24, 2023
2 parents d617ab6 + 65c0175 commit 5a84f96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cluster-autoscaler/core/scaleup/orchestrator/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5a84f96

Please sign in to comment.