Skip to content

Commit

Permalink
Merge pull request #5514 from yaroslava-serdiuk/min-size-fix
Browse files Browse the repository at this point in the history
Fix RemovableAt()
  • Loading branch information
k8s-ci-robot authored Feb 16, 2023
2 parents 19487b0 + 6b9d55b commit 2f1c895
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster-autoscaler/core/scaledown/unneeded/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ func (n *Nodes) unremovableReason(context *context.AutoscalingContext, v *node,
if reason := verifyMinSize(node.Name, nodeGroup, nodeGroupSize, as); reason != simulator.NoReason {
return reason
}
nodeGroupSize[nodeGroup.Id()]--

resourceDelta, err := n.limitsFinder.DeltaForNode(context, node, nodeGroup, resourcesWithLimits)
if err != nil {
Expand All @@ -209,6 +208,7 @@ func (n *Nodes) unremovableReason(context *context.AutoscalingContext, v *node,
return simulator.MinimalResourceLimitExceeded
}

nodeGroupSize[nodeGroup.Id()]--
return simulator.NoReason
}

Expand Down

0 comments on commit 2f1c895

Please sign in to comment.