1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-27 22:14:52 +01:00

feat: pod evictor options

This commit is contained in:
Amir Alavi
2024-07-05 21:15:55 -04:00
parent 686417b6de
commit e26f6429a2
18 changed files with 109 additions and 158 deletions

View File

@@ -171,15 +171,7 @@ func TestRemoveDuplicates(t *testing.T) {
eventRecorder := &events.FakeRecorder{}
podEvictor := evictions.NewPodEvictor(
clientSet,
evictionPolicyGroupVersion,
false,
nil,
nil,
false,
eventRecorder,
)
podEvictor := evictions.NewPodEvictor(clientSet, eventRecorder, nil)
defaultevictorArgs := &defaultevictor.DefaultEvictorArgs{
EvictLocalStoragePods: true,

View File

@@ -192,12 +192,10 @@ func runPodLifetimePlugin(
podEvictor := evictions.NewPodEvictor(
clientset,
evictionPolicyGroupVersion,
false,
nil,
maxPodsToEvictPerNamespace,
false,
&events.FakeRecorder{},
evictions.NewOptions().
WithPolicyGroupVersion(evictionPolicyGroupVersion).
WithMaxPodsToEvictPerNamespace(maxPodsToEvictPerNamespace),
)
var thresholdPriority int32
@@ -1579,11 +1577,7 @@ func initPodEvictorOrFail(t *testing.T, clientSet clientset.Interface, getPodsAs
return evictions.NewPodEvictor(
clientSet,
evictionPolicyGroupVersion,
false,
nil,
nil,
false,
eventRecorder,
evictions.NewOptions().WithPolicyGroupVersion(evictionPolicyGroupVersion),
)
}

View File

@@ -163,12 +163,8 @@ func TestTooManyRestarts(t *testing.T) {
podEvictor := evictions.NewPodEvictor(
clientSet,
evictionPolicyGroupVersion,
false,
nil,
nil,
false,
eventRecorder,
evictions.NewOptions().WithPolicyGroupVersion(evictionPolicyGroupVersion),
)
defaultevictorArgs := &defaultevictor.DefaultEvictorArgs{