1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-27 05:46:13 +01:00

add namespace filter to nodeutilization

This commit is contained in:
Lucas Severo Alves
2022-09-28 16:02:25 +02:00
parent 7777d5aa40
commit 398ffa7ee0
8 changed files with 178 additions and 3 deletions

View File

@@ -19,7 +19,16 @@ import (
)
func ValidateHighNodeUtilizationArgs(args *HighNodeUtilizationArgs) error {
return validateThresholds(args.Thresholds)
// only exclude can be set, or not at all
if args.EvictableNamespaces != nil && len(args.EvictableNamespaces.Include) > 0 {
return fmt.Errorf("only Exclude namespaces can be set, inclusion is not supported")
}
err := validateThresholds(args.Thresholds)
if err != nil {
return err
}
return nil
}
func ValidateLowNodeUtilizationArgs(args *LowNodeUtilizationArgs) error {