Skip to content

Commit c73ff97

Browse files
author
draveness
committed
feat(scheduler): rename PluginContext to CycleState
1 parent 3c0bc3c commit c73ff97

File tree

20 files changed

+294
-294
lines changed

20 files changed

+294
-294
lines changed

pkg/scheduler/core/extender_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ func TestGenericSchedulerWithExtenders(t *testing.T) {
557557
schedulerapi.DefaultPercentageOfNodesToScore,
558558
false)
559559
podIgnored := &v1.Pod{}
560-
result, err := scheduler.Schedule(framework.NewPluginContext(), podIgnored)
560+
result, err := scheduler.Schedule(framework.NewCycleState(), podIgnored)
561561
if test.expectsErr {
562562
if err == nil {
563563
t.Errorf("Unexpected non-error, result %+v", result)

pkg/scheduler/core/generic_scheduler.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ func (f *FitError) Error() string {
134134
// onto machines.
135135
// TODO: Rename this type.
136136
type ScheduleAlgorithm interface {
137-
Schedule(*framework.PluginContext, *v1.Pod) (scheduleResult ScheduleResult, err error)
137+
Schedule(*framework.CycleState, *v1.Pod) (scheduleResult ScheduleResult, err error)
138138
// Preempt receives scheduling errors for a pod and tries to create room for
139139
// the pod by preempting lower priority pods if possible.
140140
// It returns the node where preemption happened, a list of preempted pods, a
141141
// list of pods whose nominated node name should be removed, and error if any.
142-
Preempt(*framework.PluginContext, *v1.Pod, error) (selectedNode *v1.Node, preemptedPods []*v1.Pod, cleanupNominatedPods []*v1.Pod, err error)
142+
Preempt(*framework.CycleState, *v1.Pod, error) (selectedNode *v1.Node, preemptedPods []*v1.Pod, cleanupNominatedPods []*v1.Pod, err error)
143143
// Predicates() returns a pointer to a map of predicate functions. This is
144144
// exposed for testing.
145145
Predicates() map[string]predicates.FitPredicate
@@ -191,7 +191,7 @@ func (g *genericScheduler) snapshot() error {
191191
// Schedule tries to schedule the given pod to one of the nodes in the node list.
192192
// If it succeeds, it will return the name of the node.
193193
// If it fails, it will return a FitError error with reasons.
194-
func (g *genericScheduler) Schedule(pluginContext *framework.PluginContext, pod *v1.Pod) (result ScheduleResult, err error) {
194+
func (g *genericScheduler) Schedule(state *framework.CycleState, pod *v1.Pod) (result ScheduleResult, err error) {
195195
trace := utiltrace.New("Scheduling", utiltrace.Field{Key: "namespace", Value: pod.Namespace}, utiltrace.Field{Key: "name", Value: pod.Name})
196196
defer trace.LogIfLong(100 * time.Millisecond)
197197

@@ -200,7 +200,7 @@ func (g *genericScheduler) Schedule(pluginContext *framework.PluginContext, pod
200200
}
201201

202202
// Run "prefilter" plugins.
203-
preFilterStatus := g.framework.RunPreFilterPlugins(pluginContext, pod)
203+
preFilterStatus := g.framework.RunPreFilterPlugins(state, pod)
204204
if !preFilterStatus.IsSuccess() {
205205
return result, preFilterStatus.AsError()
206206
}
@@ -216,13 +216,13 @@ func (g *genericScheduler) Schedule(pluginContext *framework.PluginContext, pod
216216

217217
trace.Step("Basic checks done")
218218
startPredicateEvalTime := time.Now()
219-
filteredNodes, failedPredicateMap, filteredNodesStatuses, err := g.findNodesThatFit(pluginContext, pod)
219+
filteredNodes, failedPredicateMap, filteredNodesStatuses, err := g.findNodesThatFit(state, pod)
220220
if err != nil {
221221
return result, err
222222
}
223223

224224
// Run "postfilter" plugins.
225-
postfilterStatus := g.framework.RunPostFilterPlugins(pluginContext, pod, filteredNodes, filteredNodesStatuses)
225+
postfilterStatus := g.framework.RunPostFilterPlugins(state, pod, filteredNodes, filteredNodesStatuses)
226226
if !postfilterStatus.IsSuccess() {
227227
return result, postfilterStatus.AsError()
228228
}
@@ -254,7 +254,7 @@ func (g *genericScheduler) Schedule(pluginContext *framework.PluginContext, pod
254254
}
255255

256256
metaPrioritiesInterface := g.priorityMetaProducer(pod, g.nodeInfoSnapshot.NodeInfoMap)
257-
priorityList, err := PrioritizeNodes(pod, g.nodeInfoSnapshot.NodeInfoMap, metaPrioritiesInterface, g.prioritizers, filteredNodes, g.extenders, g.framework, pluginContext)
257+
priorityList, err := PrioritizeNodes(pod, g.nodeInfoSnapshot.NodeInfoMap, metaPrioritiesInterface, g.prioritizers, filteredNodes, g.extenders, g.framework, state)
258258
if err != nil {
259259
return result, err
260260
}
@@ -326,7 +326,7 @@ func (g *genericScheduler) selectHost(nodeScoreList framework.NodeScoreList) (st
326326
// other pods with the same priority. The nominated pod prevents other pods from
327327
// using the nominated resources and the nominated pod could take a long time
328328
// before it is retried after many other pending pods.
329-
func (g *genericScheduler) Preempt(pluginContext *framework.PluginContext, pod *v1.Pod, scheduleErr error) (*v1.Node, []*v1.Pod, []*v1.Pod, error) {
329+
func (g *genericScheduler) Preempt(state *framework.CycleState, pod *v1.Pod, scheduleErr error) (*v1.Node, []*v1.Pod, []*v1.Pod, error) {
330330
// Scheduler may return various types of errors. Consider preemption only if
331331
// the error is of type FitError.
332332
fitError, ok := scheduleErr.(*FitError)
@@ -351,7 +351,7 @@ func (g *genericScheduler) Preempt(pluginContext *framework.PluginContext, pod *
351351
if err != nil {
352352
return nil, nil, nil, err
353353
}
354-
nodeToVictims, err := g.selectNodesForPreemption(pluginContext, pod, g.nodeInfoSnapshot.NodeInfoMap, potentialNodes, g.predicates,
354+
nodeToVictims, err := g.selectNodesForPreemption(state, pod, g.nodeInfoSnapshot.NodeInfoMap, potentialNodes, g.predicates,
355355
g.predicateMetaProducer, g.schedulingQueue, pdbs)
356356
if err != nil {
357357
return nil, nil, nil, err
@@ -470,7 +470,7 @@ func (g *genericScheduler) numFeasibleNodesToFind(numAllNodes int32) (numNodes i
470470

471471
// Filters the nodes to find the ones that fit based on the given predicate functions
472472
// Each node is passed through the predicate functions to determine if it is a fit
473-
func (g *genericScheduler) findNodesThatFit(pluginContext *framework.PluginContext, pod *v1.Pod) ([]*v1.Node, FailedPredicateMap, framework.NodeToStatusMap, error) {
473+
func (g *genericScheduler) findNodesThatFit(state *framework.CycleState, pod *v1.Pod) ([]*v1.Node, FailedPredicateMap, framework.NodeToStatusMap, error) {
474474
var filtered []*v1.Node
475475
failedPredicateMap := FailedPredicateMap{}
476476
filteredNodesStatuses := framework.NodeToStatusMap{}
@@ -499,7 +499,7 @@ func (g *genericScheduler) findNodesThatFit(pluginContext *framework.PluginConte
499499
nodeName := g.cache.NodeTree().Next()
500500

501501
fits, failedPredicates, status, err := g.podFitsOnNode(
502-
pluginContext,
502+
state,
503503
pod,
504504
meta,
505505
g.nodeInfoSnapshot.NodeInfoMap[nodeName],
@@ -619,7 +619,7 @@ func addNominatedPods(pod *v1.Pod, meta predicates.PredicateMetadata,
619619
// add the nominated pods. Removal of the victims is done by SelectVictimsOnNode().
620620
// It removes victims from meta and NodeInfo before calling this function.
621621
func (g *genericScheduler) podFitsOnNode(
622-
pluginContext *framework.PluginContext,
622+
state *framework.CycleState,
623623
pod *v1.Pod,
624624
meta predicates.PredicateMetadata,
625625
info *schedulernodeinfo.NodeInfo,
@@ -684,7 +684,7 @@ func (g *genericScheduler) podFitsOnNode(
684684
}
685685
}
686686

687-
status = g.framework.RunFilterPlugins(pluginContext, pod, nodeInfoToUse)
687+
status = g.framework.RunFilterPlugins(state, pod, nodeInfoToUse)
688688
if !status.IsSuccess() && !status.IsUnschedulable() {
689689
return false, failedPredicates, status, status.AsError()
690690
}
@@ -707,7 +707,7 @@ func PrioritizeNodes(
707707
nodes []*v1.Node,
708708
extenders []algorithm.SchedulerExtender,
709709
fwk framework.Framework,
710-
pluginContext *framework.PluginContext) (framework.NodeScoreList, error) {
710+
state *framework.CycleState) (framework.NodeScoreList, error) {
711711
// If no priority configs are provided, then the EqualPriority function is applied
712712
// This is required to generate the priority list in the required format
713713
if len(priorityConfigs) == 0 && len(extenders) == 0 {
@@ -793,7 +793,7 @@ func PrioritizeNodes(
793793
}
794794

795795
// Run the Score plugins.
796-
scoresMap, scoreStatus := fwk.RunScorePlugins(pluginContext, pod, nodes)
796+
scoresMap, scoreStatus := fwk.RunScorePlugins(state, pod, nodes)
797797
if !scoreStatus.IsSuccess() {
798798
return framework.NodeScoreList{}, scoreStatus.AsError()
799799
}
@@ -1005,7 +1005,7 @@ func pickOneNodeForPreemption(nodesToVictims map[*v1.Node]*extenderv1.Victims) *
10051005
// selectNodesForPreemption finds all the nodes with possible victims for
10061006
// preemption in parallel.
10071007
func (g *genericScheduler) selectNodesForPreemption(
1008-
pluginContext *framework.PluginContext,
1008+
state *framework.CycleState,
10091009
pod *v1.Pod,
10101010
nodeNameToInfo map[string]*schedulernodeinfo.NodeInfo,
10111011
potentialNodes []*v1.Node,
@@ -1025,9 +1025,9 @@ func (g *genericScheduler) selectNodesForPreemption(
10251025
if meta != nil {
10261026
metaCopy = meta.ShallowCopy()
10271027
}
1028-
pluginContextClone := pluginContext.Clone()
1028+
stateClone := state.Clone()
10291029
pods, numPDBViolations, fits := g.selectVictimsOnNode(
1030-
pluginContextClone, pod, metaCopy, nodeNameToInfo[nodeName], fitPredicates, queue, pdbs)
1030+
stateClone, pod, metaCopy, nodeNameToInfo[nodeName], fitPredicates, queue, pdbs)
10311031
if fits {
10321032
resultLock.Lock()
10331033
victims := extenderv1.Victims{
@@ -1097,7 +1097,7 @@ func filterPodsWithPDBViolation(pods []interface{}, pdbs []*policy.PodDisruption
10971097
// due to pod affinity, node affinity, or node anti-affinity reasons. None of
10981098
// these predicates can be satisfied by removing more pods from the node.
10991099
func (g *genericScheduler) selectVictimsOnNode(
1100-
pluginContext *framework.PluginContext,
1100+
state *framework.CycleState,
11011101
pod *v1.Pod,
11021102
meta predicates.PredicateMetadata,
11031103
nodeInfo *schedulernodeinfo.NodeInfo,
@@ -1120,7 +1120,7 @@ func (g *genericScheduler) selectVictimsOnNode(
11201120
return err
11211121
}
11221122
}
1123-
status := g.framework.RunPreFilterExtensionRemovePod(pluginContext, pod, rp, nodeInfoCopy)
1123+
status := g.framework.RunPreFilterExtensionRemovePod(state, pod, rp, nodeInfoCopy)
11241124
if !status.IsSuccess() {
11251125
return status.AsError()
11261126
}
@@ -1133,7 +1133,7 @@ func (g *genericScheduler) selectVictimsOnNode(
11331133
return err
11341134
}
11351135
}
1136-
status := g.framework.RunPreFilterExtensionAddPod(pluginContext, pod, ap, nodeInfoCopy)
1136+
status := g.framework.RunPreFilterExtensionAddPod(state, pod, ap, nodeInfoCopy)
11371137
if !status.IsSuccess() {
11381138
return status.AsError()
11391139
}
@@ -1156,7 +1156,7 @@ func (g *genericScheduler) selectVictimsOnNode(
11561156
// inter-pod affinity to one or more victims, but we have decided not to
11571157
// support this case for performance reasons. Having affinity to lower
11581158
// priority pods is not a recommended configuration anyway.
1159-
if fits, _, _, err := g.podFitsOnNode(pluginContext, pod, meta, nodeInfoCopy, fitPredicates, queue, false); !fits {
1159+
if fits, _, _, err := g.podFitsOnNode(state, pod, meta, nodeInfoCopy, fitPredicates, queue, false); !fits {
11601160
if err != nil {
11611161
klog.Warningf("Encountered error while selecting victims on node %v: %v", nodeInfo.Node().Name, err)
11621162
}
@@ -1174,7 +1174,7 @@ func (g *genericScheduler) selectVictimsOnNode(
11741174
if err := addPod(p); err != nil {
11751175
return false, err
11761176
}
1177-
fits, _, _, _ := g.podFitsOnNode(pluginContext, pod, meta, nodeInfoCopy, fitPredicates, queue, false)
1177+
fits, _, _, _ := g.podFitsOnNode(state, pod, meta, nodeInfoCopy, fitPredicates, queue, false)
11781178
if !fits {
11791179
if err := removePod(p); err != nil {
11801180
return false, err

pkg/scheduler/core/generic_scheduler_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func (fp *FakeFilterPlugin) reset() {
161161

162162
// Filter is a test function that returns an error or nil, depending on the
163163
// value of "failedNodeReturnCodeMap".
164-
func (fp *FakeFilterPlugin) Filter(pc *framework.PluginContext, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *framework.Status {
164+
func (fp *FakeFilterPlugin) Filter(state *framework.CycleState, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *framework.Status {
165165
atomic.AddInt32(&fp.numFilterCalled, 1)
166166

167167
if returnCode, ok := fp.failedNodeReturnCodeMap[nodeInfo.Node().Name]; ok {
@@ -674,7 +674,7 @@ func TestGenericScheduler(t *testing.T) {
674674
false,
675675
schedulerapi.DefaultPercentageOfNodesToScore,
676676
false)
677-
result, err := scheduler.Schedule(framework.NewPluginContext(), test.pod)
677+
result, err := scheduler.Schedule(framework.NewCycleState(), test.pod)
678678
if !reflect.DeepEqual(err, test.wErr) {
679679
t.Errorf("Unexpected error: %v, expected: %v", err.Error(), test.wErr)
680680
}
@@ -1426,8 +1426,8 @@ func TestSelectNodesForPreemption(t *testing.T) {
14261426
newnode := makeNode("newnode", 1000*5, priorityutil.DefaultMemoryRequest*5)
14271427
newnode.ObjectMeta.Labels = map[string]string{"hostname": "newnode"}
14281428
nodes = append(nodes, newnode)
1429-
pluginContext := framework.NewPluginContext()
1430-
nodeToPods, err := g.selectNodesForPreemption(pluginContext, test.pod, nodeNameToInfo, nodes, test.predicates, PredicateMetadata, nil, nil)
1429+
state := framework.NewCycleState()
1430+
nodeToPods, err := g.selectNodesForPreemption(state, test.pod, nodeNameToInfo, nodes, test.predicates, PredicateMetadata, nil, nil)
14311431
if err != nil {
14321432
t.Error(err)
14331433
}
@@ -1650,8 +1650,8 @@ func TestPickOneNodeForPreemption(t *testing.T) {
16501650
nodes = append(nodes, makeNode(n, priorityutil.DefaultMilliCPURequest*5, priorityutil.DefaultMemoryRequest*5))
16511651
}
16521652
nodeNameToInfo := schedulernodeinfo.CreateNodeNameToInfoMap(test.pods, nodes)
1653-
pluginContext := framework.NewPluginContext()
1654-
candidateNodes, _ := g.selectNodesForPreemption(pluginContext, test.pod, nodeNameToInfo, nodes, test.predicates, PredicateMetadata, nil, nil)
1653+
state := framework.NewCycleState()
1654+
candidateNodes, _ := g.selectNodesForPreemption(state, test.pod, nodeNameToInfo, nodes, test.predicates, PredicateMetadata, nil, nil)
16551655
node := pickOneNodeForPreemption(candidateNodes)
16561656
found := false
16571657
for _, nodeName := range test.expected {
@@ -2135,14 +2135,14 @@ func TestPreempt(t *testing.T) {
21352135
false,
21362136
schedulerapi.DefaultPercentageOfNodesToScore,
21372137
true)
2138-
pluginContext := framework.NewPluginContext()
2138+
state := framework.NewCycleState()
21392139
scheduler.(*genericScheduler).snapshot()
21402140
// Call Preempt and check the expected results.
21412141
failedPredMap := defaultFailedPredMap
21422142
if test.failedPredMap != nil {
21432143
failedPredMap = test.failedPredMap
21442144
}
2145-
node, victims, _, err := scheduler.Preempt(pluginContext, test.pod, error(&FitError{Pod: test.pod, FailedPredicates: failedPredMap}))
2145+
node, victims, _, err := scheduler.Preempt(state, test.pod, error(&FitError{Pod: test.pod, FailedPredicates: failedPredMap}))
21462146
if err != nil {
21472147
t.Errorf("unexpected error in preemption: %v", err)
21482148
}
@@ -2172,7 +2172,7 @@ func TestPreempt(t *testing.T) {
21722172
test.pod.Status.NominatedNodeName = node.Name
21732173
}
21742174
// Call preempt again and make sure it doesn't preempt any more pods.
2175-
node, victims, _, err = scheduler.Preempt(pluginContext, test.pod, error(&FitError{Pod: test.pod, FailedPredicates: failedPredMap}))
2175+
node, victims, _, err = scheduler.Preempt(state, test.pod, error(&FitError{Pod: test.pod, FailedPredicates: failedPredMap}))
21762176
if err != nil {
21772177
t.Errorf("unexpected error in preemption: %v", err)
21782178
}

pkg/scheduler/factory/factory_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,15 +631,15 @@ func (t *TestPlugin) Name() string {
631631
return t.name
632632
}
633633

634-
func (t *TestPlugin) Score(pc *framework.PluginContext, p *v1.Pod, nodeName string) (int, *framework.Status) {
634+
func (t *TestPlugin) Score(state *framework.CycleState, p *v1.Pod, nodeName string) (int, *framework.Status) {
635635
return 1, nil
636636
}
637637

638638
func (t *TestPlugin) Extensions() framework.ScoreExtensions {
639639
return nil
640640
}
641641

642-
func (t *TestPlugin) Filter(pc *framework.PluginContext, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *framework.Status {
642+
func (t *TestPlugin) Filter(state *framework.CycleState, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *framework.Status {
643643
return nil
644644
}
645645

pkg/scheduler/framework/plugins/examples/multipoint/multipoint.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
)
2424

2525
// CommunicatingPlugin is an example of a plugin that implements two
26-
// extension points. It communicates through pluginContext with another function.
26+
// extension points. It communicates through state with another function.
2727
type CommunicatingPlugin struct{}
2828

2929
var _ = framework.ReservePlugin(CommunicatingPlugin{})
@@ -37,39 +37,39 @@ func (mc CommunicatingPlugin) Name() string {
3737
return Name
3838
}
3939

40-
type contextData struct {
40+
type stateData struct {
4141
data string
4242
}
4343

44-
func (f *contextData) Clone() framework.ContextData {
45-
copy := &contextData{
44+
func (f *stateData) Clone() framework.StateData {
45+
copy := &stateData{
4646
data: f.data,
4747
}
4848
return copy
4949
}
5050

5151
// Reserve is the functions invoked by the framework at "reserve" extension point.
52-
func (mc CommunicatingPlugin) Reserve(pc *framework.PluginContext, pod *v1.Pod, nodeName string) *framework.Status {
52+
func (mc CommunicatingPlugin) Reserve(state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {
5353
if pod == nil {
5454
return framework.NewStatus(framework.Error, "pod cannot be nil")
5555
}
5656
if pod.Name == "my-test-pod" {
57-
pc.Lock()
58-
pc.Write(framework.ContextKey(pod.Name), &contextData{data: "never bind"})
59-
pc.Unlock()
57+
state.Lock()
58+
state.Write(framework.StateKey(pod.Name), &stateData{data: "never bind"})
59+
state.Unlock()
6060
}
6161
return nil
6262
}
6363

6464
// PreBind is the functions invoked by the framework at "prebind" extension point.
65-
func (mc CommunicatingPlugin) PreBind(pc *framework.PluginContext, pod *v1.Pod, nodeName string) *framework.Status {
65+
func (mc CommunicatingPlugin) PreBind(state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {
6666
if pod == nil {
6767
return framework.NewStatus(framework.Error, "pod cannot be nil")
6868
}
69-
pc.RLock()
70-
defer pc.RUnlock()
71-
if v, e := pc.Read(framework.ContextKey(pod.Name)); e == nil {
72-
if value, ok := v.(*contextData); ok && value.data == "never bind" {
69+
state.RLock()
70+
defer state.RUnlock()
71+
if v, e := state.Read(framework.StateKey(pod.Name)); e == nil {
72+
if value, ok := v.(*stateData); ok && value.data == "never bind" {
7373
return framework.NewStatus(framework.Unschedulable, "pod is not permitted")
7474
}
7575
}

pkg/scheduler/framework/plugins/examples/prebind/prebind.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (sr StatelessPreBindExample) Name() string {
3939
}
4040

4141
// PreBind is the functions invoked by the framework at "prebind" extension point.
42-
func (sr StatelessPreBindExample) PreBind(pc *framework.PluginContext, pod *v1.Pod, nodeName string) *framework.Status {
42+
func (sr StatelessPreBindExample) PreBind(state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {
4343
if pod == nil {
4444
return framework.NewStatus(framework.Error, fmt.Sprintf("pod cannot be nil"))
4545
}

pkg/scheduler/framework/plugins/examples/stateful/stateful.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ func (mp *MultipointExample) Name() string {
4747
}
4848

4949
// Reserve is the functions invoked by the framework at "reserve" extension point.
50-
func (mp *MultipointExample) Reserve(pc *framework.PluginContext, pod *v1.Pod, nodeName string) *framework.Status {
50+
func (mp *MultipointExample) Reserve(state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {
5151
// Reserve is not called concurrently, and so we don't need to lock.
5252
mp.numRuns++
5353
return nil
5454
}
5555

5656
// PreBind is the functions invoked by the framework at "prebind" extension point.
57-
func (mp *MultipointExample) PreBind(pc *framework.PluginContext, pod *v1.Pod, nodeName string) *framework.Status {
57+
func (mp *MultipointExample) PreBind(state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {
5858
// PreBind could be called concurrently for different pods.
5959
mp.mu.Lock()
6060
defer mp.mu.Unlock()

pkg/scheduler/framework/plugins/noop/noop.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package noop
1818

1919
import (
20-
"k8s.io/api/core/v1"
20+
v1 "k8s.io/api/core/v1"
2121
"k8s.io/apimachinery/pkg/runtime"
2222

2323
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
@@ -41,7 +41,7 @@ func (n Filter) Name() string {
4141
}
4242

4343
// Filter invoked at the filter extension point.
44-
func (n Filter) Filter(pc *framework.PluginContext, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status {
44+
func (n Filter) Filter(state *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status {
4545
return nil
4646
}
4747

0 commit comments

Comments
 (0)