Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for nodeScoreList (0.41 sec)

  1. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go

    	return score, nil
    }
    
    // NormalizeScore invoked after scoring all nodes.
    func (pl *TaintToleration) NormalizeScore(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	return helper.DefaultNormalizeScore(framework.MaxNodeScore, true, scores)
    }
    
    // ScoreExtensions of the Score plugin.
    func (pl *TaintToleration) ScoreExtensions() framework.ScoreExtensions {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/interpodaffinity/scoring.go

    	return score, nil
    }
    
    // NormalizeScore normalizes the score for each filteredNode.
    func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	s, err := getPreScoreState(cycleState)
    	if err != nil {
    		return framework.AsStatus(err)
    	}
    	if len(s.topologyScore) == 0 {
    		return nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/interface.go

    	"k8s.io/client-go/tools/events"
    	"k8s.io/klog/v2"
    	"k8s.io/kubernetes/pkg/scheduler/apis/config"
    	"k8s.io/kubernetes/pkg/scheduler/framework/parallelize"
    )
    
    // NodeScoreList declares a list of nodes and their scores.
    type NodeScoreList []NodeScore
    
    // NodeScore is a struct with node name and score.
    type NodeScore struct {
    	Name  string
    	Score int64
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/podtopologyspread/scoring.go

    	return int64(math.Round(score)), nil
    }
    
    // NormalizeScore invoked after scoring all nodes.
    func (pl *PodTopologySpread) NormalizeScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	s, err := getPreScoreState(cycleState)
    	if err != nil {
    		return framework.AsStatus(err)
    	}
    	if s == nil {
    		return nil
    	}
    
    	// Calculate <minScore> and <maxScore>
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/noderesources/balanced_allocation_test.go

    	}
    	scalarResource := map[string]int64{
    		"nvidia.com/gpu": 8,
    	}
    
    	tests := []struct {
    		pod          *v1.Pod
    		pods         []*v1.Pod
    		nodes        []*v1.Node
    		expectedList framework.NodeScoreList
    		name         string
    		args         config.NodeResourcesBalancedAllocationArgs
    		runPreScore  bool
    	}{
    		{
    			// Node1 scores (remaining resources) on 0-MaxNodeScore scale
    			// CPU Fraction: 0 / 4000 = 0%
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  6. pkg/scheduler/schedule_one.go

    // It also returns the top {count} Nodes,
    // and the top of the list will be always the selected host.
    func selectHost(nodeScoreList []framework.NodePluginScores, count int) (string, []framework.NodePluginScores, error) {
    	if len(nodeScoreList) == 0 {
    		return "", nil, errEmptyPriorityList
    	}
    
    	var h nodeScoreHeap = nodeScoreList
    	heap.Init(&h)
    	cntOfMaxScore := 1
    	selectedIndex := 0
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 13:28:08 UTC 2024
    - 43.4K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go

    	}
    
    	return count, nil
    }
    
    // NormalizeScore invoked after scoring all nodes.
    func (pl *NodeAffinity) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	return helper.DefaultNormalizeScore(framework.MaxNodeScore, false, scores)
    }
    
    // ScoreExtensions of the Score plugin.
    func (pl *NodeAffinity) ScoreExtensions() framework.ScoreExtensions {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 12:00:10 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/nodeaffinity/node_affinity_test.go

    					},
    				},
    			},
    		},
    	}
    
    	tests := []struct {
    		name               string
    		pod                *v1.Pod
    		nodes              []*v1.Node
    		expectedList       framework.NodeScoreList
    		args               config.NodeAffinityArgs
    		runPreScore        bool
    		wantPreScoreStatus *framework.Status
    	}{
    		{
    			name: "all nodes are same priority as NodeAffinity is nil",
    			pod: &v1.Pod{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 12:00:10 UTC 2023
    - 38.7K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/podtopologyspread/scoring_test.go

    		nodes                     []*v1.Node
    		failedNodes               []*v1.Node // nodes + failedNodes = all nodes
    		objs                      []runtime.Object
    		want                      framework.NodeScoreList
    		enableNodeInclusionPolicy bool
    		enableMatchLabelKeys      bool
    	}{
    		// Explanation on the Legend:
    		// a) X/Y means there are X matching pods on node1 and Y on node2, both nodes are candidates
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 60K bytes
    - Viewed (0)
  10. pkg/scheduler/framework/plugins/noderesources/fit_test.go

    func TestFitScore(t *testing.T) {
    	tests := []struct {
    		name                 string
    		requestedPod         *v1.Pod
    		nodes                []*v1.Node
    		existingPods         []*v1.Pod
    		expectedPriorities   framework.NodeScoreList
    		nodeResourcesFitArgs config.NodeResourcesFitArgs
    		runPreScore          bool
    	}{
    		{
    			name: "test case for ScoringStrategy RequestedToCapacityRatio case1",
    			requestedPod: st.MakePod().
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 57.4K bytes
    - Viewed (0)
Back to top