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

ListPodsOnANode: allow to include/exclude namespaces

Info: field selector is still not properly mocked so it's not possible to unit test it
This commit is contained in:
Jan Chaloupka
2020-07-11 20:21:28 +02:00
parent 74f70fdbc9
commit 11f1333af7
11 changed files with 303 additions and 23 deletions

View File

@@ -44,13 +44,23 @@ type DeschedulerStrategy struct {
Params *StrategyParameters
}
// Only one of its members may be specified
// Namespaces carries a list of included/excluded namespaces
// for which a given strategy is applicable
type Namespaces struct {
Include []string
Exclude []string
}
// Besides Namespaces only one of its members may be specified
// TODO(jchaloup): move Namespaces to individual strategies once the policy
// version is bumped to v1alpha2
type StrategyParameters struct {
NodeResourceUtilizationThresholds *NodeResourceUtilizationThresholds
NodeAffinityType []string
PodsHavingTooManyRestarts *PodsHavingTooManyRestarts
MaxPodLifeTimeSeconds *uint
RemoveDuplicates *RemoveDuplicates
Namespaces Namespaces
}
type Percentage float64