Skip to content

Commit

Permalink
Support of the namespaceLabelSelector in DefaultEvictor
Browse files Browse the repository at this point in the history
 plugin
  • Loading branch information
RomanenkoDenys committed Oct 30, 2024
1 parent 3adaea9 commit 0dd74d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/framework/plugins/defaultevictor/defaultevictor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,16 +922,16 @@ func initializePlugin(ctx context.Context, test testCase) (frameworktypes.Plugin
objs = append(objs, pdb)
}

for _, namespace := range test.namespaces {
objs = append(objs, namespace)
for _, ns := range test.namespaces {
objs = append(objs, ns)
}

fakeClient := fake.NewSimpleClientset(objs...)

sharedInformerFactory := informers.NewSharedInformerFactory(fakeClient, 0)
podInformer := sharedInformerFactory.Core().V1().Pods().Informer()
_ = sharedInformerFactory.Policy().V1().PodDisruptionBudgets().Lister()

_ = sharedInformerFactory.Core().V1().Namespaces().Lister()
getPodsAssignedToNode, err := podutil.BuildGetPodsAssignedToNodeFunc(podInformer)
if err != nil {
return nil, fmt.Errorf("build get pods assigned to node function error: %v", err)
Expand Down

0 comments on commit 0dd74d4

Please sign in to comment.