1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00

LowNodeUtilization: express usagePercentage multiplied by 100

Entry params are in interval <0; 100>. Have logs respect that as well.
This commit is contained in:
Jan Chaloupka
2020-11-24 14:48:47 +01:00
parent e679c7fabc
commit cd6f2cd4cb

View File

@@ -248,7 +248,7 @@ func resourceUsagePercentages(nodeUsage NodeUsage) map[v1.ResourceName]float64 {
for resourceName, resourceUsage := range nodeUsage.usage {
cap := nodeCapacity[resourceName]
if !cap.IsZero() {
resourceUsagePercentage[resourceName] = float64(resourceUsage.Value()) / float64(cap.Value())
resourceUsagePercentage[resourceName] = 100 * float64(resourceUsage.Value()) / float64(cap.Value())
}
}