Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for nodeScoreList (0.39 sec)

  1. pkg/scheduler/testing/framework/fake_extender.go

    	return &framework.NodeScoreList{}, fmt.Errorf("some error")
    }
    
    // Node1PrioritizerExtender implements PriorityFunc function to give score 10
    // if the given node's name is "node1"; otherwise score 1.
    func Node1PrioritizerExtender(pod *v1.Pod, nodes []*framework.NodeInfo) (*framework.NodeScoreList, error) {
    	result := framework.NodeScoreList{}
    	for _, node := range nodes {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 19:07:19 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/imagelocality/image_locality_test.go

    			},
    		},
    	}
    
    	nodeWithNoImages := v1.NodeStatus{}
    
    	tests := []struct {
    		pod          *v1.Pod
    		pods         []*v1.Pod
    		nodes        []*v1.Node
    		expectedList framework.NodeScoreList
    		name         string
    	}{
    		{
    			// Pod: gcr.io/40 gcr.io/250
    
    			// Node1
    			// Image: gcr.io/40:latest 40MB
    			// Score: 0 (40M/2 < 23M, min-threshold)
    
    			// Node2
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 19 06:17:57 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/runtime/framework.go

    	if !state.ShouldRecordPluginMetrics() {
    		return pl.ScoreExtensions().NormalizeScore(ctx, state, pod, nodeScoreList)
    	}
    	startTime := time.Now()
    	status := pl.ScoreExtensions().NormalizeScore(ctx, state, pod, nodeScoreList)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 60.9K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    			Tolerations: tolerations,
    		},
    	}
    }
    
    func TestTaintTolerationScore(t *testing.T) {
    	tests := []struct {
    		name         string
    		pod          *v1.Pod
    		nodes        []*v1.Node
    		expectedList framework.NodeScoreList
    	}{
    		// basic test case
    		{
    			name: "node with taints tolerated by the pod, gets a higher score than those node with intolerable taints",
    			pod: podWithTolerations("pod1", []v1.Toleration{{
    				Key:      "foo",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. pkg/scheduler/framework/runtime/framework_test.go

    }
    
    func (pl *TestScoreWithNormalizePlugin) Name() string {
    	return pl.name
    }
    
    func (pl *TestScoreWithNormalizePlugin) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	return injectNormalizeRes(pl.inj, scores)
    }
    
    func (pl *TestScoreWithNormalizePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 103K bytes
    - Viewed (0)
  10. pkg/scheduler/schedule_one_test.go

    func (pl *reverseNumericMapPlugin) ScoreExtensions() framework.ScoreExtensions {
    	return pl
    }
    
    func (pl *reverseNumericMapPlugin) NormalizeScore(_ context.Context, _ *framework.CycleState, _ *v1.Pod, nodeScores framework.NodeScoreList) *framework.Status {
    	var maxScore float64
    	minScore := math.MaxFloat64
    
    	for _, hostPriority := range nodeScores {
    		maxScore = math.Max(maxScore, float64(hostPriority.Score))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
Back to top