mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
revert for non-utilization metrics
This commit is contained in:
parent
6bb73bae06
commit
bb735bf689
@ -210,9 +210,8 @@ func (c *ReplicaCalculator) calcPlainMetricReplicas(metrics metricsclient.PodMet
|
|||||||
if len(missingPods) > 0 {
|
if len(missingPods) > 0 {
|
||||||
if usageRatio < 1.0 {
|
if usageRatio < 1.0 {
|
||||||
// on a scale-down, treat missing pods as using 100% (all) of the resource request
|
// on a scale-down, treat missing pods as using 100% (all) of the resource request
|
||||||
maxTargetUtilization := int64(max(100, int32(targetUtilization)))
|
|
||||||
for podName := range missingPods {
|
for podName := range missingPods {
|
||||||
metrics[podName] = metricsclient.PodMetric{Value: maxTargetUtilization}
|
metrics[podName] = metricsclient.PodMetric{Value: targetUtilization}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// on a scale-up, treat missing pods as using 0% of the resource request
|
// on a scale-up, treat missing pods as using 0% of the resource request
|
||||||
|
Loading…
Reference in New Issue
Block a user