Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NodeIsSuitable (0.32 sec)

  1. pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go

    	controller *namedresourcesmodel.Controller
    }
    
    func (c claimController) nodeIsSuitable(ctx context.Context, nodeName string, resources resources) (bool, error) {
    	nodeResources := resources[nodeName]
    	for driverName, perDriver := range c.namedresources {
    		okay, err := perDriver.controller.NodeIsSuitable(ctx, nodeResources[driverName].NamedResources)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 22 09:03:22 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go

    		}
    		c.requests = append(c.requests, compilation)
    	}
    	return c, nil
    }
    
    type Controller struct {
    	filter   *cel.CompilationResult
    	requests []cel.CompilationResult
    }
    
    func (c *Controller) NodeIsSuitable(ctx context.Context, model Model) (bool, error) {
    	indices, err := c.allocate(ctx, model)
    	return len(indices) == len(c.requests), err
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:26:16 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go

    					isSuitable, err := controller.nodeIsSuitable(tCtx, nodeName, tc.resources)
    					if err != nil {
    						if expect.suitableErr == "" {
    							tCtx.Fatalf("unexpected nodeIsSuitable error: %v", err)
    						}
    						require.Equal(tCtx, expect.suitableErr, err.Error())
    						return
    					}
    					if expect.suitableErr != "" {
    						tCtx.Fatalf("did not get expected nodeIsSuitable error: %v", expect.suitableErr)
    					}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 27 09:27:01 UTC 2024
    - 34.8K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go

    				expectAllocation = append(expectAllocation, &resourceapi.NamedResourcesAllocationResult{Name: name})
    			}
    			require.Equal(tCtx, expectAllocation, allocation)
    
    			isSuitable, isSuitableErr := controller.NodeIsSuitable(tCtx, tc.model)
    			assert.Equal(tCtx, len(expectAllocation) == len(tc.requests), isSuitable, "is suitable")
    			assert.Equal(tCtx, createErr, isSuitableErr)
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 27 09:27:01 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go

    				}
    			}
    			// Can the builtin controller tell us whether the node is suitable?
    			if state.informationsForClaim[index].structuredParameters {
    				suitable, err := state.informationsForClaim[index].controller.nodeIsSuitable(ctx, node.Name, state.resources)
    				if err != nil {
    					// An error indicates that something wasn't configured correctly, for example
    					// writing a CEL expression which doesn't handle a map lookup error. Normally
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 15:22:37 UTC 2024
    - 75.9K bytes
    - Viewed (0)
Back to top