Merge pull request #87238 from yuzhiquan/patch-scheduler

cleanup(scheduler): remove unused function, remove duplicate comment
This commit is contained in:
Kubernetes Prow Robot 2020-01-15 21:21:46 -08:00 committed by GitHub
commit 550034022f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 12 deletions

View File

@ -44,7 +44,6 @@ go_library(
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
"//staging/src/k8s.io/client-go/listers/core/v1:go_default_library",
"//staging/src/k8s.io/client-go/listers/policy/v1beta1:go_default_library",
"//staging/src/k8s.io/client-go/listers/storage/v1:go_default_library",
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
"//staging/src/k8s.io/client-go/tools/events:go_default_library",
"//vendor/k8s.io/klog:go_default_library",

View File

@ -34,7 +34,6 @@ import (
clientset "k8s.io/client-go/kubernetes"
corelisters "k8s.io/client-go/listers/core/v1"
policylisters "k8s.io/client-go/listers/policy/v1beta1"
storagelisters "k8s.io/client-go/listers/storage/v1"
"k8s.io/client-go/tools/cache"
"k8s.io/klog"
kubefeatures "k8s.io/kubernetes/pkg/features"
@ -191,7 +190,7 @@ func (c *Configurator) createFromProvider(providerName string) (*Scheduler, erro
return c.create([]algorithm.SchedulerExtender{})
}
// CreateFromConfig creates a scheduler from the configuration file
// createFromConfig creates a scheduler from the configuration file
func (c *Configurator) createFromConfig(policy schedulerapi.Policy) (*Scheduler, error) {
lr := frameworkplugins.NewLegacyRegistry()
args := &frameworkplugins.ConfigProducerArgs{}
@ -304,7 +303,6 @@ func (c *Configurator) createFromConfig(policy schedulerapi.Policy) (*Scheduler,
return c.create(extenders)
}
// getPriorityConfigs
// getPriorityConfigs returns priorities configuration: ones that will run as priorities and ones that will run
// as framework plugins. Specifically, a priority will run as a framework plugin if a plugin config producer was
// registered for that priority.
@ -482,6 +480,9 @@ type binder struct {
Client clientset.Interface
}
// Implement Binder interface
var _ Binder = &binder{}
// Bind just does a POST binding RPC.
func (b *binder) Bind(binding *v1.Binding) error {
klog.V(3).Infof("Attempting to bind %v to %v", binding.Name, binding.Target.Name)
@ -495,11 +496,3 @@ func GetPodDisruptionBudgetLister(informerFactory informers.SharedInformerFactor
}
return nil
}
// GetCSINodeLister returns CSINode lister from the given informer factory. Returns nil if CSINodeInfo feature is disabled.
func GetCSINodeLister(informerFactory informers.SharedInformerFactory) storagelisters.CSINodeLister {
if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.CSINodeInfo) {
return informerFactory.Storage().V1().CSINodes().Lister()
}
return nil
}