feat(scheduler): replace several algorithm listers with client listers

This commit is contained in:
draveness
2019-10-18 15:24:35 +08:00
parent 0f7873ad5c
commit e1f86e3460
15 changed files with 180 additions and 101 deletions

View File

@@ -24,6 +24,9 @@ import (
"sync"
"k8s.io/apimachinery/pkg/util/sets"
appslisters "k8s.io/client-go/listers/apps/v1"
corelisters "k8s.io/client-go/listers/core/v1"
policylisters "k8s.io/client-go/listers/policy/v1beta1"
"k8s.io/kubernetes/pkg/scheduler/algorithm"
"k8s.io/kubernetes/pkg/scheduler/algorithm/predicates"
"k8s.io/kubernetes/pkg/scheduler/algorithm/priorities"
@@ -37,11 +40,11 @@ import (
// PluginFactoryArgs are passed to all plugin factory functions.
type PluginFactoryArgs struct {
PodLister algorithm.PodLister
ServiceLister algorithm.ServiceLister
ControllerLister algorithm.ControllerLister
ReplicaSetLister algorithm.ReplicaSetLister
StatefulSetLister algorithm.StatefulSetLister
PDBLister algorithm.PDBLister
ServiceLister corelisters.ServiceLister
ControllerLister corelisters.ReplicationControllerLister
ReplicaSetLister appslisters.ReplicaSetLister
StatefulSetLister appslisters.StatefulSetLister
PDBLister policylisters.PodDisruptionBudgetLister
NodeInfo predicates.NodeInfo
CSINodeInfo predicates.CSINodeInfo
PVInfo predicates.PersistentVolumeInfo