Merge pull request #122317 from pacoxu/revert-122058-scheduler-first-fit
Revert "Scheduler first fit"
This commit is contained in:
		@@ -382,11 +382,6 @@ func (h *HTTPExtender) IsBinder() bool {
 | 
			
		||||
	return h.bindVerb != ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsPrioritizer returns whether this extender is configured for the Prioritize method.
 | 
			
		||||
func (h *HTTPExtender) IsPrioritizer() bool {
 | 
			
		||||
	return h.prioritizeVerb != ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Helper function to send messages to the extender
 | 
			
		||||
func (h *HTTPExtender) send(action string, args interface{}, result interface{}) error {
 | 
			
		||||
	out, err := json.Marshal(args)
 | 
			
		||||
 
 | 
			
		||||
@@ -93,7 +93,6 @@ func TestSchedulerWithExtenders(t *testing.T) {
 | 
			
		||||
			registerPlugins: []tf.RegisterPluginFunc{
 | 
			
		||||
				tf.RegisterFilterPlugin("TrueFilter", tf.NewTrueFilterPlugin),
 | 
			
		||||
				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
				tf.RegisterScorePlugin("EqualPrioritizerPlugin", tf.NewEqualPrioritizerPlugin(), 20),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
			extenders: []tf.FakeExtender{
 | 
			
		||||
@@ -246,7 +245,6 @@ func TestSchedulerWithExtenders(t *testing.T) {
 | 
			
		||||
			// because of the errors from errorPredicateExtender.
 | 
			
		||||
			registerPlugins: []tf.RegisterPluginFunc{
 | 
			
		||||
				tf.RegisterFilterPlugin("TrueFilter", tf.NewTrueFilterPlugin),
 | 
			
		||||
				tf.RegisterScorePlugin("EqualPrioritizerPlugin", tf.NewEqualPrioritizerPlugin(), 20),
 | 
			
		||||
				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
@@ -270,30 +268,6 @@ func TestSchedulerWithExtenders(t *testing.T) {
 | 
			
		||||
			},
 | 
			
		||||
			name: "test 9",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			registerPlugins: []tf.RegisterPluginFunc{
 | 
			
		||||
				tf.RegisterFilterPlugin("TrueFilter", tf.NewTrueFilterPlugin),
 | 
			
		||||
				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
			extenders: []tf.FakeExtender{
 | 
			
		||||
				{
 | 
			
		||||
					ExtenderName: "FakeExtender1",
 | 
			
		||||
					Predicates:   []tf.FitPredicate{tf.TruePredicateExtender},
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					ExtenderName: "FakeExtender2",
 | 
			
		||||
					Predicates:   []tf.FitPredicate{tf.Node1PredicateExtender},
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
			nodes: []string{"node1", "node2"},
 | 
			
		||||
			expectedResult: ScheduleResult{
 | 
			
		||||
				SuggestedHost:  "node1",
 | 
			
		||||
				EvaluatedNodes: 1,
 | 
			
		||||
				FeasibleNodes:  1,
 | 
			
		||||
			},
 | 
			
		||||
			name: "test 10",
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for _, test := range tests {
 | 
			
		||||
 
 | 
			
		||||
@@ -50,9 +50,6 @@ type Extender interface {
 | 
			
		||||
	// this pod is managed by this extender.
 | 
			
		||||
	IsInterested(pod *v1.Pod) bool
 | 
			
		||||
 | 
			
		||||
	// IsPrioritizer returns whether this extender is configured for the Prioritize method.
 | 
			
		||||
	IsPrioritizer() bool
 | 
			
		||||
 | 
			
		||||
	// ProcessPreemption returns nodes with their victim pods processed by extender based on
 | 
			
		||||
	// given:
 | 
			
		||||
	//   1. Pod to schedule
 | 
			
		||||
 
 | 
			
		||||
@@ -422,7 +422,7 @@ func (sched *Scheduler) schedulePod(ctx context.Context, fwk framework.Framework
 | 
			
		||||
		}, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	priorityList, err := sched.prioritizeNodes(ctx, fwk, state, pod, feasibleNodes)
 | 
			
		||||
	priorityList, err := prioritizeNodes(ctx, sched.Extenders, fwk, state, pod, feasibleNodes)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return result, err
 | 
			
		||||
	}
 | 
			
		||||
@@ -544,19 +544,6 @@ func (sched *Scheduler) evaluateNominatedNode(ctx context.Context, pod *v1.Pod,
 | 
			
		||||
	return feasibleNodes, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// hasScoring checks if scoring nodes is configured.
 | 
			
		||||
func (sched *Scheduler) hasScoring(fwk framework.Framework) bool {
 | 
			
		||||
	if fwk.HasScorePlugins() {
 | 
			
		||||
		return true
 | 
			
		||||
	}
 | 
			
		||||
	for _, extender := range sched.Extenders {
 | 
			
		||||
		if extender.IsPrioritizer() {
 | 
			
		||||
			return true
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// findNodesThatPassFilters finds the nodes that fit the filter plugins.
 | 
			
		||||
func (sched *Scheduler) findNodesThatPassFilters(
 | 
			
		||||
	ctx context.Context,
 | 
			
		||||
@@ -567,9 +554,6 @@ func (sched *Scheduler) findNodesThatPassFilters(
 | 
			
		||||
	nodes []*framework.NodeInfo) ([]*v1.Node, error) {
 | 
			
		||||
	numAllNodes := len(nodes)
 | 
			
		||||
	numNodesToFind := sched.numFeasibleNodesToFind(fwk.PercentageOfNodesToScore(), int32(numAllNodes))
 | 
			
		||||
	if !sched.hasScoring(fwk) {
 | 
			
		||||
		numNodesToFind = 1
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Create feasible list with enough space to avoid growing it
 | 
			
		||||
	// and allow assigning.
 | 
			
		||||
@@ -721,8 +705,9 @@ func findNodesThatPassExtenders(ctx context.Context, extenders []framework.Exten
 | 
			
		||||
// The scores from each plugin are added together to make the score for that node, then
 | 
			
		||||
// any extenders are run as well.
 | 
			
		||||
// All scores are finally combined (added) to get the total weighted scores of all nodes
 | 
			
		||||
func (sched *Scheduler) prioritizeNodes(
 | 
			
		||||
func prioritizeNodes(
 | 
			
		||||
	ctx context.Context,
 | 
			
		||||
	extenders []framework.Extender,
 | 
			
		||||
	fwk framework.Framework,
 | 
			
		||||
	state *framework.CycleState,
 | 
			
		||||
	pod *v1.Pod,
 | 
			
		||||
@@ -731,7 +716,7 @@ func (sched *Scheduler) prioritizeNodes(
 | 
			
		||||
	logger := klog.FromContext(ctx)
 | 
			
		||||
	// If no priority configs are provided, then all nodes will have a score of one.
 | 
			
		||||
	// This is required to generate the priority list in the required format
 | 
			
		||||
	if !sched.hasScoring(fwk) {
 | 
			
		||||
	if len(extenders) == 0 && !fwk.HasScorePlugins() {
 | 
			
		||||
		result := make([]framework.NodePluginScores, 0, len(nodes))
 | 
			
		||||
		for i := range nodes {
 | 
			
		||||
			result = append(result, framework.NodePluginScores{
 | 
			
		||||
@@ -764,17 +749,14 @@ func (sched *Scheduler) prioritizeNodes(
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if len(sched.Extenders) != 0 && nodes != nil {
 | 
			
		||||
	if len(extenders) != 0 && nodes != nil {
 | 
			
		||||
		// allNodeExtendersScores has all extenders scores for all nodes.
 | 
			
		||||
		// It is keyed with node name.
 | 
			
		||||
		allNodeExtendersScores := make(map[string]*framework.NodePluginScores, len(nodes))
 | 
			
		||||
		var mu sync.Mutex
 | 
			
		||||
		var wg sync.WaitGroup
 | 
			
		||||
		for i := range sched.Extenders {
 | 
			
		||||
			if !sched.Extenders[i].IsInterested(pod) {
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
			if !sched.Extenders[i].IsPrioritizer() {
 | 
			
		||||
		for i := range extenders {
 | 
			
		||||
			if !extenders[i].IsInterested(pod) {
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
			wg.Add(1)
 | 
			
		||||
@@ -784,10 +766,10 @@ func (sched *Scheduler) prioritizeNodes(
 | 
			
		||||
					metrics.Goroutines.WithLabelValues(metrics.PrioritizingExtender).Dec()
 | 
			
		||||
					wg.Done()
 | 
			
		||||
				}()
 | 
			
		||||
				prioritizedList, weight, err := sched.Extenders[extIndex].Prioritize(pod, nodes)
 | 
			
		||||
				prioritizedList, weight, err := extenders[extIndex].Prioritize(pod, nodes)
 | 
			
		||||
				if err != nil {
 | 
			
		||||
					// Prioritization errors from extender can be ignored, let k8s/other extenders determine the priorities
 | 
			
		||||
					logger.V(5).Info("Failed to run extender's priority function. No score given by this extender.", "error", err, "pod", klog.KObj(pod), "extender", sched.Extenders[extIndex].Name())
 | 
			
		||||
					logger.V(5).Info("Failed to run extender's priority function. No score given by this extender.", "error", err, "pod", klog.KObj(pod), "extender", extenders[extIndex].Name())
 | 
			
		||||
					return
 | 
			
		||||
				}
 | 
			
		||||
				mu.Lock()
 | 
			
		||||
@@ -796,7 +778,7 @@ func (sched *Scheduler) prioritizeNodes(
 | 
			
		||||
					nodename := (*prioritizedList)[i].Host
 | 
			
		||||
					score := (*prioritizedList)[i].Score
 | 
			
		||||
					if loggerVTen.Enabled() {
 | 
			
		||||
						loggerVTen.Info("Extender scored node for pod", "pod", klog.KObj(pod), "extender", sched.Extenders[extIndex].Name(), "node", nodename, "score", score)
 | 
			
		||||
						loggerVTen.Info("Extender scored node for pod", "pod", klog.KObj(pod), "extender", extenders[extIndex].Name(), "node", nodename, "score", score)
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					// MaxExtenderPriority may diverge from the max priority used in the scheduler and defined by MaxNodeScore,
 | 
			
		||||
@@ -806,11 +788,11 @@ func (sched *Scheduler) prioritizeNodes(
 | 
			
		||||
					if allNodeExtendersScores[nodename] == nil {
 | 
			
		||||
						allNodeExtendersScores[nodename] = &framework.NodePluginScores{
 | 
			
		||||
							Name:   nodename,
 | 
			
		||||
							Scores: make([]framework.PluginScore, 0, len(sched.Extenders)),
 | 
			
		||||
							Scores: make([]framework.PluginScore, 0, len(extenders)),
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					allNodeExtendersScores[nodename].Scores = append(allNodeExtendersScores[nodename].Scores, framework.PluginScore{
 | 
			
		||||
						Name:  sched.Extenders[extIndex].Name(),
 | 
			
		||||
						Name:  extenders[extIndex].Name(),
 | 
			
		||||
						Score: finalscore,
 | 
			
		||||
					})
 | 
			
		||||
					allNodeExtendersScores[nodename].TotalScore += finalscore
 | 
			
		||||
 
 | 
			
		||||
@@ -91,7 +91,6 @@ type fakeExtender struct {
 | 
			
		||||
	interestedPodName string
 | 
			
		||||
	ignorable         bool
 | 
			
		||||
	gotBind           bool
 | 
			
		||||
	isPrioritizer     bool
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (f *fakeExtender) Name() string {
 | 
			
		||||
@@ -141,10 +140,6 @@ func (f *fakeExtender) IsInterested(pod *v1.Pod) bool {
 | 
			
		||||
	return pod != nil && pod.Name == f.interestedPodName
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (f *fakeExtender) IsPrioritizer() bool {
 | 
			
		||||
	return f.isPrioritizer
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type falseMapPlugin struct{}
 | 
			
		||||
 | 
			
		||||
func newFalseMapPlugin() frameworkruntime.PluginFactory {
 | 
			
		||||
@@ -1810,7 +1805,6 @@ func TestSchedulerSchedulePod(t *testing.T) {
 | 
			
		||||
			registerPlugins: []tf.RegisterPluginFunc{
 | 
			
		||||
				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
				tf.RegisterFilterPlugin("TrueFilter", tf.NewTrueFilterPlugin),
 | 
			
		||||
				tf.RegisterScorePlugin("EqualPrioritizerPlugin", tf.NewEqualPrioritizerPlugin(), 20),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
			nodes:     []string{"node1", "node2"},
 | 
			
		||||
@@ -1928,7 +1922,6 @@ func TestSchedulerSchedulePod(t *testing.T) {
 | 
			
		||||
				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
				tf.RegisterPreFilterPlugin(volumebinding.Name, frameworkruntime.FactoryAdapter(fts, volumebinding.New)),
 | 
			
		||||
				tf.RegisterFilterPlugin("TrueFilter", tf.NewTrueFilterPlugin),
 | 
			
		||||
				tf.RegisterScorePlugin("EqualPrioritizerPlugin", tf.NewEqualPrioritizerPlugin(), 20),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
			nodes: []string{"node1", "node2"},
 | 
			
		||||
@@ -2042,7 +2035,6 @@ func TestSchedulerSchedulePod(t *testing.T) {
 | 
			
		||||
					"PreFilter",
 | 
			
		||||
					"Filter",
 | 
			
		||||
				),
 | 
			
		||||
				tf.RegisterScorePlugin("EqualPrioritizerPlugin", tf.NewEqualPrioritizerPlugin(), 20),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
			nodes: []string{"node1", "node2", "node3"},
 | 
			
		||||
@@ -2316,7 +2308,6 @@ func TestSchedulerSchedulePod(t *testing.T) {
 | 
			
		||||
						},
 | 
			
		||||
					}, nil
 | 
			
		||||
				}, "PreFilter", "Filter"),
 | 
			
		||||
				tf.RegisterScorePlugin("EqualPrioritizerPlugin", tf.NewEqualPrioritizerPlugin(), 20),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
			nodes:              []string{"node1", "node2", "node3"},
 | 
			
		||||
@@ -2339,33 +2330,6 @@ func TestSchedulerSchedulePod(t *testing.T) {
 | 
			
		||||
			pod:       st.MakePod().Name("ignore").UID("ignore").Obj(),
 | 
			
		||||
			wantNodes: sets.New("node1", "node2"),
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			name: "test without score plugin no extra nodes are evaluated",
 | 
			
		||||
			registerPlugins: []tf.RegisterPluginFunc{
 | 
			
		||||
				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
				tf.RegisterFilterPlugin("TrueFilter", tf.NewTrueFilterPlugin),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
			nodes:              []string{"node1", "node2", "node3"},
 | 
			
		||||
			pod:                st.MakePod().Name("pod1").UID("pod1").Obj(),
 | 
			
		||||
			wantNodes:          sets.New("node1", "node2", "node3"),
 | 
			
		||||
			wantEvaluatedNodes: ptr.To[int32](1),
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			name: "test no score plugin, prefilter plugin returning 2 nodes, only 1 node is evaluated",
 | 
			
		||||
			registerPlugins: []tf.RegisterPluginFunc{
 | 
			
		||||
				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
				tf.RegisterPreFilterPlugin(
 | 
			
		||||
					"FakePreFilter",
 | 
			
		||||
					tf.NewFakePreFilterPlugin("FakePreFilter", &framework.PreFilterResult{NodeNames: sets.New("node1", "node2")}, nil),
 | 
			
		||||
				),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			},
 | 
			
		||||
			nodes:              []string{"node1", "node2", "node3"},
 | 
			
		||||
			pod:                st.MakePod().Name("test-prefilter").UID("test-prefilter").Obj(),
 | 
			
		||||
			wantNodes:          sets.New("node1", "node3"),
 | 
			
		||||
			wantEvaluatedNodes: ptr.To[int32](1),
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
	for _, test := range tests {
 | 
			
		||||
		t.Run(test.name, func(t *testing.T) {
 | 
			
		||||
@@ -2739,7 +2703,7 @@ func TestZeroRequest(t *testing.T) {
 | 
			
		||||
				t.Fatalf("error filtering nodes: %+v", err)
 | 
			
		||||
			}
 | 
			
		||||
			fwk.RunPreScorePlugins(ctx, state, test.pod, test.nodes)
 | 
			
		||||
			list, err := sched.prioritizeNodes(ctx, fwk, state, test.pod, test.nodes)
 | 
			
		||||
			list, err := prioritizeNodes(ctx, nil, fwk, state, test.pod, test.nodes)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				t.Errorf("unexpected error: %v", err)
 | 
			
		||||
			}
 | 
			
		||||
@@ -3135,10 +3099,7 @@ func Test_prioritizeNodes(t *testing.T) {
 | 
			
		||||
			for ii := range test.extenders {
 | 
			
		||||
				extenders = append(extenders, &test.extenders[ii])
 | 
			
		||||
			}
 | 
			
		||||
			sched := &Scheduler{
 | 
			
		||||
				Extenders: extenders,
 | 
			
		||||
			}
 | 
			
		||||
			nodesscores, err := sched.prioritizeNodes(ctx, fwk, state, test.pod, test.nodes)
 | 
			
		||||
			nodesscores, err := prioritizeNodes(ctx, extenders, fwk, state, test.pod, test.nodes)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				t.Errorf("unexpected error: %v", err)
 | 
			
		||||
			}
 | 
			
		||||
@@ -3241,7 +3202,6 @@ func TestFairEvaluationForNodes(t *testing.T) {
 | 
			
		||||
		[]tf.RegisterPluginFunc{
 | 
			
		||||
			tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
			tf.RegisterFilterPlugin("TrueFilter", tf.NewTrueFilterPlugin),
 | 
			
		||||
			tf.RegisterScorePlugin("EqualPrioritizerPlugin", tf.NewEqualPrioritizerPlugin(), 20),
 | 
			
		||||
			tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
		},
 | 
			
		||||
		"",
 | 
			
		||||
@@ -3320,7 +3280,6 @@ func TestPreferNominatedNodeFilterCallCounts(t *testing.T) {
 | 
			
		||||
			registerPlugins := []tf.RegisterPluginFunc{
 | 
			
		||||
				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New),
 | 
			
		||||
				registerFakeFilterFunc,
 | 
			
		||||
				tf.RegisterScorePlugin("EqualPrioritizerPlugin", tf.NewEqualPrioritizerPlugin(), 20),
 | 
			
		||||
				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
 | 
			
		||||
			}
 | 
			
		||||
			fwk, err := tf.NewFramework(
 | 
			
		||||
 
 | 
			
		||||
@@ -137,30 +137,6 @@ func (pl *node2PrioritizerPlugin) ScoreExtensions() framework.ScoreExtensions {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type equalPrioritizerPlugin struct{}
 | 
			
		||||
 | 
			
		||||
// NewEqualPrioritizerPlugin returns a factory function to build equalPrioritizerPlugin.
 | 
			
		||||
func NewEqualPrioritizerPlugin() frameworkruntime.PluginFactory {
 | 
			
		||||
	return func(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error) {
 | 
			
		||||
		return &equalPrioritizerPlugin{}, nil
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Name returns the name of the plugin.
 | 
			
		||||
func (pl *equalPrioritizerPlugin) Name() string {
 | 
			
		||||
	return "EqualPrioritizerPlugin"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Score returns score 1 for each node.
 | 
			
		||||
func (pl *equalPrioritizerPlugin) Score(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string) (int64, *framework.Status) {
 | 
			
		||||
	return int64(1), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ScoreExtensions returns nil.
 | 
			
		||||
func (pl *equalPrioritizerPlugin) ScoreExtensions() framework.ScoreExtensions {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// FakeExtender is a data struct which implements the Extender interface.
 | 
			
		||||
type FakeExtender struct {
 | 
			
		||||
	// ExtenderName indicates this fake extender's name.
 | 
			
		||||
@@ -404,11 +380,6 @@ func (f *FakeExtender) IsBinder() bool {
 | 
			
		||||
	return true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsPrioritizer returns true if there are any prioritizers.
 | 
			
		||||
func (f *FakeExtender) IsPrioritizer() bool {
 | 
			
		||||
	return len(f.Prioritizers) > 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsInterested returns a bool indicating whether this extender is interested in this Pod.
 | 
			
		||||
func (f *FakeExtender) IsInterested(pod *v1.Pod) bool {
 | 
			
		||||
	return !f.UnInterested
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user