diff --git a/pkg/scheduler/eventhandlers.go b/pkg/scheduler/eventhandlers.go index 4cf52f381e2..3cff88e627e 100644 --- a/pkg/scheduler/eventhandlers.go +++ b/pkg/scheduler/eventhandlers.go @@ -24,9 +24,7 @@ import ( "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - appsinformers "k8s.io/client-go/informers/apps/v1" coreinformers "k8s.io/client-go/informers/core/v1" - policyinformers "k8s.io/client-go/informers/policy/v1beta1" storageinformers "k8s.io/client-go/informers/storage/v1" "k8s.io/client-go/tools/cache" ) @@ -325,11 +323,7 @@ func AddAllEventHandlers( podInformer coreinformers.PodInformer, pvInformer coreinformers.PersistentVolumeInformer, pvcInformer coreinformers.PersistentVolumeClaimInformer, - replicationControllerInformer coreinformers.ReplicationControllerInformer, - replicaSetInformer appsinformers.ReplicaSetInformer, - statefulSetInformer appsinformers.StatefulSetInformer, serviceInformer coreinformers.ServiceInformer, - pdbInformer policyinformers.PodDisruptionBudgetInformer, storageClassInformer storageinformers.StorageClassInformer, ) { // scheduled pod cache diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go index 4ef8950b44b..10e1304fa27 100644 --- a/pkg/scheduler/scheduler.go +++ b/pkg/scheduler/scheduler.go @@ -196,7 +196,7 @@ func New(client clientset.Interface, // Create the scheduler. sched := NewFromConfig(config) - AddAllEventHandlers(sched, options.schedulerName, nodeInformer, podInformer, pvInformer, pvcInformer, replicationControllerInformer, replicaSetInformer, statefulSetInformer, serviceInformer, pdbInformer, storageClassInformer) + AddAllEventHandlers(sched, options.schedulerName, nodeInformer, podInformer, pvInformer, pvcInformer, serviceInformer, storageClassInformer) return sched, nil } diff --git a/test/integration/daemonset/daemonset_test.go b/test/integration/daemonset/daemonset_test.go index 48f8dfe8b5c..768aa081c68 100644 --- a/test/integration/daemonset/daemonset_test.go +++ b/test/integration/daemonset/daemonset_test.go @@ -130,11 +130,7 @@ func setupScheduler( informerFactory.Core().V1().Pods(), informerFactory.Core().V1().PersistentVolumes(), informerFactory.Core().V1().PersistentVolumeClaims(), - informerFactory.Core().V1().ReplicationControllers(), - informerFactory.Apps().V1().ReplicaSets(), - informerFactory.Apps().V1().StatefulSets(), informerFactory.Core().V1().Services(), - informerFactory.Policy().V1beta1().PodDisruptionBudgets(), informerFactory.Storage().V1().StorageClasses(), ) diff --git a/test/integration/scheduler/scheduler_test.go b/test/integration/scheduler/scheduler_test.go index 6de176b1d46..1226aa16618 100644 --- a/test/integration/scheduler/scheduler_test.go +++ b/test/integration/scheduler/scheduler_test.go @@ -611,11 +611,7 @@ func TestMultiScheduler(t *testing.T) { podInformer2, context.informerFactory.Core().V1().PersistentVolumes(), context.informerFactory.Core().V1().PersistentVolumeClaims(), - context.informerFactory.Core().V1().ReplicationControllers(), - context.informerFactory.Apps().V1().ReplicaSets(), - context.informerFactory.Apps().V1().StatefulSets(), context.informerFactory.Core().V1().Services(), - context.informerFactory.Policy().V1beta1().PodDisruptionBudgets(), context.informerFactory.Storage().V1().StorageClasses(), ) diff --git a/test/integration/scheduler/util.go b/test/integration/scheduler/util.go index 6351fbeee60..91b999a9567 100644 --- a/test/integration/scheduler/util.go +++ b/test/integration/scheduler/util.go @@ -198,11 +198,7 @@ func initTestSchedulerWithOptions( podInformer, context.informerFactory.Core().V1().PersistentVolumes(), context.informerFactory.Core().V1().PersistentVolumeClaims(), - context.informerFactory.Core().V1().ReplicationControllers(), - context.informerFactory.Apps().V1().ReplicaSets(), - context.informerFactory.Apps().V1().StatefulSets(), context.informerFactory.Core().V1().Services(), - context.informerFactory.Policy().V1beta1().PodDisruptionBudgets(), context.informerFactory.Storage().V1().StorageClasses(), ) diff --git a/test/integration/util/util.go b/test/integration/util/util.go index 441ca90e883..bfbe415a679 100644 --- a/test/integration/util/util.go +++ b/test/integration/util/util.go @@ -82,11 +82,7 @@ func StartScheduler(clientSet clientset.Interface) (factory.Configurator, Shutdo informerFactory.Core().V1().Pods(), informerFactory.Core().V1().PersistentVolumes(), informerFactory.Core().V1().PersistentVolumeClaims(), - informerFactory.Core().V1().ReplicationControllers(), - informerFactory.Apps().V1().ReplicaSets(), - informerFactory.Apps().V1().StatefulSets(), informerFactory.Core().V1().Services(), - informerFactory.Policy().V1beta1().PodDisruptionBudgets(), informerFactory.Storage().V1().StorageClasses(), )