Skip to content

Commit

Permalink
Merge pull request #3922 from ctripcloud/fix-plain-calc
Browse files Browse the repository at this point in the history
fix federated-hpa plain metric calc
  • Loading branch information
karmada-bot committed Aug 14, 2023
2 parents 22d4636 + fe0febb commit 54e900c
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 54e900c

Please sign in to comment.