chore: call close framework when finishing

Signed-off-by: googs1025 <googs1025@gmail.com>
This commit is contained in:
googs1025
2024-07-03 14:18:25 +08:00
parent 7e1a5a0ea8
commit d4627f16a5
14 changed files with 98 additions and 42 deletions

View File

@@ -42,7 +42,7 @@ func SetupPluginWithInformers(
objs []runtime.Object,
) framework.Plugin {
objs = append([]runtime.Object{&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ""}}}, objs...)
informerFactory := informers.NewSharedInformerFactory(fake.NewSimpleClientset(objs...), 0)
informerFactory := informers.NewSharedInformerFactory(fake.NewClientset(objs...), 0)
fh, err := frameworkruntime.NewFramework(ctx, nil, nil,
frameworkruntime.WithSnapshotSharedLister(sharedLister),
frameworkruntime.WithInformerFactory(informerFactory))