mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 13:29:11 +01:00
chore: log average and assessed thresholds
when calculating the average an applying the deviations it would be nice to also see the assessed values. this commit makes the descheduler logs these values when using level 3.
This commit is contained in:
@@ -92,16 +92,6 @@ func NewLowNodeUtilization(
|
||||
)
|
||||
}
|
||||
|
||||
// underCriteria and overCriteria are slices used for logging purposes.
|
||||
// we assemble them only once.
|
||||
underCriteria, overCriteria := []any{}, []any{}
|
||||
for name := range args.Thresholds {
|
||||
underCriteria = append(underCriteria, name, args.Thresholds[name])
|
||||
}
|
||||
for name := range args.TargetThresholds {
|
||||
overCriteria = append(overCriteria, name, args.TargetThresholds[name])
|
||||
}
|
||||
|
||||
podFilter, err := podutil.
|
||||
NewOptions().
|
||||
WithFilter(handle.Evictor().Filter).
|
||||
@@ -127,8 +117,8 @@ func NewLowNodeUtilization(
|
||||
return &LowNodeUtilization{
|
||||
handle: handle,
|
||||
args: args,
|
||||
underCriteria: underCriteria,
|
||||
overCriteria: overCriteria,
|
||||
underCriteria: thresholdsToKeysAndValues(args.Thresholds),
|
||||
overCriteria: thresholdsToKeysAndValues(args.TargetThresholds),
|
||||
resourceNames: resourceNames,
|
||||
extendedResourceNames: extendedResourceNames,
|
||||
podFilter: podFilter,
|
||||
|
||||
Reference in New Issue
Block a user