Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SetMaxResource (0.12 sec)

  1. pkg/scheduler/framework/plugins/noderesources/fit.go

    	originalMaxResourceReq, modifiedMaxResourceReq := &framework.Resource{}, &framework.Resource{}
    	originalMaxResourceReq.SetMaxResource(resource.PodRequests(originalPod, resource.PodResourcesOptions{InPlacePodVerticalScalingEnabled: f.enableInPlacePodVerticalScaling}))
    	modifiedMaxResourceReq.SetMaxResource(resource.PodRequests(modifiedPod, resource.PodResourcesOptions{InPlacePodVerticalScalingEnabled: f.enableInPlacePodVerticalScaling}))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 20.2K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/types.go

    	if r.ScalarResources == nil {
    		r.ScalarResources = map[v1.ResourceName]int64{}
    	}
    	r.ScalarResources[name] = quantity
    }
    
    // SetMaxResource compares with ResourceList and takes max value for each Resource.
    func (r *Resource) SetMaxResource(rl v1.ResourceList) {
    	if r == nil {
    		return
    	}
    
    	for rName, rQuantity := range rl {
    		switch rName {
    		case v1.ResourceMemory:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 19:28:17 UTC 2024
    - 36.7K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/types_test.go

    			},
    		},
    	}
    
    	for i, test := range tests {
    		t.Run(fmt.Sprintf("case_%d", i), func(t *testing.T) {
    			test.resource.SetMaxResource(test.resourceList)
    			if !reflect.DeepEqual(test.expected, test.resource) {
    				t.Errorf("expected: %#v, got: %#v", test.expected, test.resource)
    			}
    		})
    	}
    }
    
    func TestNewNodeInfo(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 45.9K bytes
    - Viewed (0)
Back to top