Skip to content

Commit

Permalink
UPSTREAM: <carry>: openshift: move maxnodes total event
Browse files Browse the repository at this point in the history
Emit MaxNodesTotalReached in scale up when the condition is reached.
  • Loading branch information
frobware committed Jun 20, 2019
1 parent eb75e6d commit 0947e64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cluster-autoscaler/core/scale_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ func ScaleUp(context *context.AutoscalingContext, processors *ca_processors.Auto
klog.V(1).Infof("Capping size to max cluster total size (%d)", context.MaxNodesTotal)
newNodes = context.MaxNodesTotal - len(nodes) - len(upcomingNodes)
if newNodes < 1 {
context.LogRecorder.Eventf(apiv1.EventTypeWarning, "MaxNodesTotalReached", "Max total nodes in cluster reached")
return &status.ScaleUpStatus{Result: status.ScaleUpError}, errors.NewAutoscalerError(
errors.TransientError,
"max node total count already reached")
Expand Down

0 comments on commit 0947e64

Please sign in to comment.