Skip to content

Commit

Permalink
fix federated-hpa plain metric calc
Browse files Browse the repository at this point in the history
Signed-off-by: zach593 <zach_li@outlook.com>
  • Loading branch information
zongqingli authored and zach593 committed Aug 9, 2023
1 parent 8680ff3 commit fe0febb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/federatedhpa/replica_calculator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit fe0febb

Please sign in to comment.