Skip to content

Commit

Permalink
Merge pull request #47 from frobware/fix-bz-1670695-v2
Browse files Browse the repository at this point in the history
UPSTREAM: <carry>: fix max cluster size calculation on scale up
  • Loading branch information
openshift-merge-robot authored Mar 7, 2019
2 parents e1a6a09 + 6d9d28e commit 642c114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster-autoscaler/core/scale_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func ScaleUp(context *context.AutoscalingContext, processors *ca_processors.Auto

newNodes := bestOption.NodeCount

if context.MaxNodesTotal > 0 && len(nodes)+newNodes > context.MaxNodesTotal {
if context.MaxNodesTotal > 0 && len(nodes)+newNodes+len(upcomingNodes) > context.MaxNodesTotal {
glog.V(1).Infof("Capping size to max cluster total size (%d)", context.MaxNodesTotal)
newNodes = context.MaxNodesTotal - len(nodes) - len(upcomingNodes)
if newNodes < 1 {
Expand Down

0 comments on commit 642c114

Please sign in to comment.