Skip to content

Commit

Permalink
Merge pull request #2436 from Jeffwan/skip_first_acceptable_range_check
Browse files Browse the repository at this point in the history
Skip acceptable range check before it has data
  • Loading branch information
k8s-ci-robot authored Dec 10, 2019
2 parents 7c45ece + 0d278a2 commit bf3a9fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cluster-autoscaler/clusterstate/clusterstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,11 @@ func (csr *ClusterStateRegistry) IsNodeGroupSafeToScaleUp(nodeGroup cloudprovide
}

func (csr *ClusterStateRegistry) getProvisionedAndTargetSizesForNodeGroup(nodeGroupName string) (provisioned, target int, ok bool) {
if len(csr.acceptableRanges) == 0 {
klog.Warningf("AcceptableRanges have not been populated yet. Skip checking")
return 0, 0, false
}

acceptable, found := csr.acceptableRanges[nodeGroupName]
if !found {
klog.Warningf("Failed to find acceptable ranges for %v", nodeGroupName)
Expand Down

0 comments on commit bf3a9fb

Please sign in to comment.