mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #48595 from bonowang/master
Automatic merge from submit-queue (batch tested with PRs 48997, 48595, 48898, 48711, 48972) remove useless code in podautoscaler **What this PR does / why we need it**: code optimization,remove some useless code. **Special notes for your reviewer:** My first Kubernetes PR,please let me know if anything wrong on this one. **Release note**: ```release-note NONE ```
This commit is contained in:
commit
e7dff4fd12
@ -250,9 +250,6 @@ func (c *ReplicaCalculator) calcPlainMetricReplicas(metrics metricsclient.PodMet
|
||||
|
||||
// re-run the utilization calculation with our new numbers
|
||||
newUsageRatio, _ := metricsclient.GetMetricUtilizationRatio(metrics, targetUtilization)
|
||||
if err != nil {
|
||||
return 0, utilization, err
|
||||
}
|
||||
|
||||
if math.Abs(1.0-newUsageRatio) <= tolerance || (usageRatio < 1.0 && newUsageRatio > 1.0) || (usageRatio > 1.0 && newUsageRatio < 1.0) {
|
||||
// return the current replicas if the change would be too small,
|
||||
|
Loading…
Reference in New Issue
Block a user