Remove NodeLister from Scheduler Configurator

Signed-off-by: Aldo Culquicondor <acondor@google.com>
This commit is contained in:
Aldo Culquicondor 2019-07-16 14:05:31 -04:00
parent feb40b844c
commit 8e9af0185d
3 changed files with 1 additions and 16 deletions

View File

@ -153,8 +153,6 @@ type Configurator interface {
GetClient() clientset.Interface
// TODO(#80216): Remove these methods from the interface.
// Needs to be exposed for things like integration tests where we want to make fake nodes.
GetNodeLister() corelisters.NodeLister
// Exposed for testing
GetScheduledPodLister() corelisters.PodLister
@ -170,8 +168,6 @@ type configFactory struct {
client clientset.Interface
// a means to list all known scheduled pods.
scheduledPodLister corelisters.PodLister
// a means to list all nodes
nodeLister corelisters.NodeLister
// a means to list all PersistentVolumes
pVLister corelisters.PersistentVolumeLister
// a means to list all PersistentVolumeClaims
@ -281,7 +277,6 @@ func NewConfigFactory(args *ConfigFactoryArgs) Configurator {
c := &configFactory{
client: args.Client,
podQueue: internalqueue.NewSchedulingQueue(stopEverything, framework),
nodeLister: args.NodeInformer.Lister(),
pVLister: args.PvInformer.Lister(),
pVCLister: args.PvcInformer.Lister(),
serviceLister: args.ServiceInformer.Lister(),
@ -324,11 +319,6 @@ func NewConfigFactory(args *ConfigFactoryArgs) Configurator {
return c
}
// GetNodeStore provides the cache to the nodes, mostly internal use, but may also be called by mock-tests.
func (c *configFactory) GetNodeLister() corelisters.NodeLister {
return c.nodeLister
}
func (c *configFactory) GetHardPodAffinitySymmetricWeight() int32 {
return c.hardPodAffinitySymmetricWeight
}

View File

@ -56,11 +56,6 @@ func (fc *FakeConfigurator) MakeDefaultErrorFunc(backoff *internalqueue.PodBacko
return nil
}
// GetNodeLister is not implemented yet.
func (fc *FakeConfigurator) GetNodeLister() corelisters.NodeLister {
return nil
}
// GetClient is not implemented yet.
func (fc *FakeConfigurator) GetClient() clientset.Interface {
return nil

View File

@ -354,7 +354,7 @@ func TestUnschedulableNodes(t *testing.T) {
context := initTest(t, "unschedulable-nodes")
defer cleanupTest(t, context)
nodeLister := context.schedulerConfigFactory.GetNodeLister()
nodeLister := context.schedulerConfig.NodeLister
// NOTE: This test cannot run in parallel, because it is creating and deleting
// non-namespaced objects (Nodes).
defer context.clientSet.CoreV1().Nodes().DeleteCollection(nil, metav1.ListOptions{})