@@ -54,6 +54,7 @@ import (
54
54
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration"
55
55
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions"
56
56
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone"
57
+ frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime"
57
58
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
58
59
fakeframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/fake"
59
60
internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache"
@@ -89,7 +90,7 @@ func NewNoPodsFilterPlugin(_ runtime.Object, _ framework.FrameworkHandle) (frame
89
90
90
91
type numericMapPlugin struct {}
91
92
92
- func newNumericMapPlugin () framework .PluginFactory {
93
+ func newNumericMapPlugin () frameworkruntime .PluginFactory {
93
94
return func (_ runtime.Object , _ framework.FrameworkHandle ) (framework.Plugin , error ) {
94
95
return & numericMapPlugin {}, nil
95
96
}
@@ -113,7 +114,7 @@ func (pl *numericMapPlugin) ScoreExtensions() framework.ScoreExtensions {
113
114
114
115
type reverseNumericMapPlugin struct {}
115
116
116
- func newReverseNumericMapPlugin () framework .PluginFactory {
117
+ func newReverseNumericMapPlugin () frameworkruntime .PluginFactory {
117
118
return func (_ runtime.Object , _ framework.FrameworkHandle ) (framework.Plugin , error ) {
118
119
return & reverseNumericMapPlugin {}, nil
119
120
}
@@ -154,7 +155,7 @@ func (pl *reverseNumericMapPlugin) NormalizeScore(_ context.Context, _ *framewor
154
155
155
156
type trueMapPlugin struct {}
156
157
157
- func newTrueMapPlugin () framework .PluginFactory {
158
+ func newTrueMapPlugin () frameworkruntime .PluginFactory {
158
159
return func (_ runtime.Object , _ framework.FrameworkHandle ) (framework.Plugin , error ) {
159
160
return & trueMapPlugin {}, nil
160
161
}
@@ -183,7 +184,7 @@ func (pl *trueMapPlugin) NormalizeScore(_ context.Context, _ *framework.CycleSta
183
184
184
185
type falseMapPlugin struct {}
185
186
186
- func newFalseMapPlugin () framework .PluginFactory {
187
+ func newFalseMapPlugin () frameworkruntime .PluginFactory {
187
188
return func (_ runtime.Object , _ framework.FrameworkHandle ) (framework.Plugin , error ) {
188
189
return & falseMapPlugin {}, nil
189
190
}
@@ -705,7 +706,7 @@ func TestGenericScheduler(t *testing.T) {
705
706
}
706
707
707
708
snapshot := internalcache .NewSnapshot (test .pods , nodes )
708
- fwk , err := st .NewFramework (test .registerPlugins , framework .WithSnapshotSharedLister (snapshot ))
709
+ fwk , err := st .NewFramework (test .registerPlugins , frameworkruntime .WithSnapshotSharedLister (snapshot ))
709
710
if err != nil {
710
711
t .Fatal (err )
711
712
}
@@ -1026,9 +1027,9 @@ func TestZeroRequest(t *testing.T) {
1026
1027
}
1027
1028
fwk , err := st .NewFramework (
1028
1029
pluginRegistrations ,
1029
- framework .WithInformerFactory (informerFactory ),
1030
- framework .WithSnapshotSharedLister (snapshot ),
1031
- framework .WithClientSet (client ),
1030
+ frameworkruntime .WithInformerFactory (informerFactory ),
1031
+ frameworkruntime .WithSnapshotSharedLister (snapshot ),
1032
+ frameworkruntime .WithClientSet (client ),
1032
1033
)
1033
1034
if err != nil {
1034
1035
t .Fatalf ("error creating framework: %+v" , err )
@@ -1538,7 +1539,7 @@ func TestSelectNodesForPreemption(t *testing.T) {
1538
1539
registerPlugins := append ([]st.RegisterPluginFunc {registerFakeFilterFunc }, test .registerPlugins ... )
1539
1540
// Use a real snapshot since it's needed in some Filter Plugin (e.g., PodAffinity)
1540
1541
snapshot := internalcache .NewSnapshot (test .pods , nodes )
1541
- fwk , err := st .NewFramework (registerPlugins , framework .WithSnapshotSharedLister (snapshot ))
1542
+ fwk , err := st .NewFramework (registerPlugins , frameworkruntime .WithSnapshotSharedLister (snapshot ))
1542
1543
if err != nil {
1543
1544
t .Fatal (err )
1544
1545
}
@@ -1825,7 +1826,7 @@ func TestPickOneNodeForPreemption(t *testing.T) {
1825
1826
nodes = append (nodes , makeNode (n , schedutil .DefaultMilliCPURequest * 5 , schedutil .DefaultMemoryRequest * 5 ))
1826
1827
}
1827
1828
snapshot := internalcache .NewSnapshot (test .pods , nodes )
1828
- fwk , err := st .NewFramework (test .registerPlugins , framework .WithSnapshotSharedLister (snapshot ))
1829
+ fwk , err := st .NewFramework (test .registerPlugins , frameworkruntime .WithSnapshotSharedLister (snapshot ))
1829
1830
if err != nil {
1830
1831
t .Fatal (err )
1831
1832
}
@@ -2338,12 +2339,12 @@ func TestPreempt(t *testing.T) {
2338
2339
snapshot := internalcache .NewSnapshot (test .pods , nodes )
2339
2340
fwk , err := st .NewFramework (
2340
2341
test .registerPlugins ,
2341
- framework .WithClientSet (client ),
2342
- framework .WithEventRecorder (& events.FakeRecorder {}),
2343
- framework .WithExtenders (extenders ),
2344
- framework .WithPodNominator (podNominator ),
2345
- framework .WithSnapshotSharedLister (snapshot ),
2346
- framework .WithInformerFactory (informers .NewSharedInformerFactory (client , 0 )),
2342
+ frameworkruntime .WithClientSet (client ),
2343
+ frameworkruntime .WithEventRecorder (& events.FakeRecorder {}),
2344
+ frameworkruntime .WithExtenders (extenders ),
2345
+ frameworkruntime .WithPodNominator (podNominator ),
2346
+ frameworkruntime .WithSnapshotSharedLister (snapshot ),
2347
+ frameworkruntime .WithInformerFactory (informers .NewSharedInformerFactory (client , 0 )),
2347
2348
)
2348
2349
if err != nil {
2349
2350
t .Fatal (err )
0 commit comments