Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for nodeScoreList (0.27 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/noderesources/requested_to_capacity_ratio_test.go

    		{Utilization: 100, Score: 0},
    	}
    
    	tests := []struct {
    		name           string
    		requestedPod   *v1.Pod
    		nodes          []*v1.Node
    		existingPods   []*v1.Pod
    		expectedScores framework.NodeScoreList
    		resources      []config.ResourceSpec
    		shape          []config.UtilizationShapePoint
    		wantErrs       field.ErrorList
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go

    )
    
    func TestMostAllocatedScoringStrategy(t *testing.T) {
    	tests := []struct {
    		name           string
    		requestedPod   *v1.Pod
    		nodes          []*v1.Node
    		existingPods   []*v1.Pod
    		expectedScores framework.NodeScoreList
    		resources      []config.ResourceSpec
    		wantErrs       field.ErrorList
    		wantStatusCode framework.Code
    	}{
    		{
    			// Node1 scores (used resources) on 0-MaxNodeScore scale
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 16K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go

    	}
    
    	tests := []struct {
    		pod                                *v1.Pod
    		pods                               []*v1.Pod
    		nodes                              []*v1.Node
    		expectedList                       framework.NodeScoreList
    		name                               string
    		ignorePreferredTermsOfExistingPods bool
    		wantStatus                         *framework.Status
    	}{
    		{
    			name: "all nodes are same priority as Affinity is nil",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 44.8K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/noderesources/least_allocated_test.go

    )
    
    func TestLeastAllocatedScoringStrategy(t *testing.T) {
    	tests := []struct {
    		name           string
    		requestedPod   *v1.Pod
    		nodes          []*v1.Node
    		existingPods   []*v1.Pod
    		expectedScores framework.NodeScoreList
    		resources      []config.ResourceSpec
    		wantErrs       field.ErrorList
    		wantStatusCode framework.Code
    	}{
    		{
    			// Node1 scores (remaining resources) on 0-MaxNodeScore scale
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 18.8K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top