fix federated-hpa plain metric calc

Signed-off-by: zach593 <zach_li@outlook.com>
This commit is contained in:
zongqingli 2023-08-09 16:47:27 +08:00 committed by zach593
parent 8680ff333f
commit fe0febbf1f
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ func (c *ReplicaCalculator) calcPlainMetricReplicas(metrics metricsclient.PodMet
for podName := range missingPods {
metrics[podName] = metricsclient.PodMetric{Value: targetUsage}
}
} else {
} else if usageRatio > 1.0 {
// on a scale-up, treat missing pods as using 0% of the resource request
for podName := range missingPods {
metrics[podName] = metricsclient.PodMetric{Value: 0}