Skip to content

Commit

Permalink
Merge pull request kubernetes#90 from frobware/add-cluster-size-reach…
Browse files Browse the repository at this point in the history
…ed-event

UPSTREAM: <carry>: openshift: record max-nodes-total event
  • Loading branch information
openshift-merge-robot authored May 2, 2019
2 parents 291cdcd + 1a96ed4 commit 9b2cf49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cluster-autoscaler/core/static_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ func (a *StaticAutoscaler) RunOnce(currentTime time.Time) errors.AutoscalerError
klog.V(1).Info("No unschedulable pods")
} else if a.MaxNodesTotal > 0 && len(readyNodes) >= a.MaxNodesTotal {
scaleUpStatus.Result = status.ScaleUpNoOptionsAvailable
klog.V(1).Info("Max total nodes in cluster reached")
msg := "Max total nodes in cluster reached"
klog.V(1).Info(msg)
autoscalingContext.LogRecorder.Eventf(apiv1.EventTypeWarning, "MaxNodesTotalReached", msg)
} else if allPodsAreNew(unschedulablePodsToHelp, currentTime) {
// The assumption here is that these pods have been created very recently and probably there
// is more pods to come. In theory we could check the newest pod time but then if pod were created
Expand Down

0 comments on commit 9b2cf49

Please sign in to comment.