mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
remove useless code
This commit is contained in:
parent
a9bf44101b
commit
bbb0365d8d
@ -250,9 +250,6 @@ func (c *ReplicaCalculator) calcPlainMetricReplicas(metrics metricsclient.PodMet
|
|||||||
|
|
||||||
// re-run the utilization calculation with our new numbers
|
// re-run the utilization calculation with our new numbers
|
||||||
newUsageRatio, _ := metricsclient.GetMetricUtilizationRatio(metrics, targetUtilization)
|
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) {
|
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,
|
// return the current replicas if the change would be too small,
|
||||||
|
Loading…
Reference in New Issue
Block a user