Use feature gate in integration

Clean up unused import
This commit is contained in:
Harry Zhang
2018-02-07 10:20:45 -08:00
committed by Erick Fejta
parent 20f7f37c49
commit 782a092e2e
5 changed files with 63 additions and 83 deletions

View File

@@ -28,8 +28,8 @@ import (
"k8s.io/client-go/tools/record"
"k8s.io/kubernetes/pkg/api/legacyscheme"
"k8s.io/kubernetes/pkg/scheduler"
"k8s.io/kubernetes/pkg/scheduler/factory"
"k8s.io/kubernetes/test/integration/framework"
utilscheduler "k8s.io/kubernetes/test/integration/scheduler"
)
// ShutdownFunc represents the function handle to be called, typically in a defer handler, to shutdown a running module
@@ -63,22 +63,7 @@ func StartScheduler(clientSet clientset.Interface, enableEquivalenceCache bool)
evtWatch := evtBroadcaster.StartRecordingToSink(&clientv1core.EventSinkImpl{
Interface: clientv1core.New(clientSet.CoreV1().RESTClient()).Events("")})
schedulerConfigurator := factory.NewConfigFactory(
v1.DefaultSchedulerName,
clientSet,
informerFactory.Core().V1().Nodes(),
informerFactory.Core().V1().Pods(),
informerFactory.Core().V1().PersistentVolumes(),
informerFactory.Core().V1().PersistentVolumeClaims(),
informerFactory.Core().V1().ReplicationControllers(),
informerFactory.Extensions().V1beta1().ReplicaSets(),
informerFactory.Apps().V1beta1().StatefulSets(),
informerFactory.Core().V1().Services(),
informerFactory.Policy().V1beta1().PodDisruptionBudgets(),
informerFactory.Storage().V1().StorageClasses(),
v1.DefaultHardPodAffinitySymmetricWeight,
enableEquivalenceCache,
)
schedulerConfigurator := utilscheduler.CreateConfigurator(clientSet, informerFactory)
sched, err := scheduler.NewFromConfigurator(schedulerConfigurator, func(conf *scheduler.Config) {
conf.Recorder = evtBroadcaster.NewRecorder(legacyscheme.Scheme, v1.EventSource{Component: "scheduler"})