Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isHit (0.08 sec)

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

    	return framework.QueueSkip, nil
    }
    
    // isFit checks if the pod fits the node. If the node is nil, it returns false.
    // It constructs a fake NodeInfo object for the node and checks if the pod fits the node.
    func isFit(pod *v1.Pod, node *v1.Node) bool {
    	if node == nil {
    		return false
    	}
    	nodeInfo := framework.NewNodeInfo()
    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/plugins/noderesources/fit_test.go

    			node:     st.MakeNode().Capacity(map[v1.ResourceName]string{v1.ResourceCPU: "2"}).Obj(),
    			expected: true,
    		},
    	}
    
    	for name, tc := range testCases {
    		t.Run(name, func(t *testing.T) {
    			if got := isFit(tc.pod, tc.node); got != tc.expected {
    				t.Errorf("expected: %v, got: %v", tc.expected, got)
    			}
    		})
    	}
    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