mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Update e2e tests for recent changes to resource.k8s.io/v1alpha2
Signed-off-by: Kevin Klues <kklues@nvidia.com>
This commit is contained in:
parent
74d634a028
commit
6ba9b91604
@ -159,7 +159,7 @@ func (c *ExampleController) Allocate(ctx context.Context, claim *resourcev1alpha
|
||||
return c.allocate(ctx, claim, claimParameters, class, classParameters, selectedNode)
|
||||
}
|
||||
|
||||
// allocate simply copies parameters as JSON map into ResourceHandle.
|
||||
// allocate simply copies parameters as JSON map into a ResourceHandle.
|
||||
func (c *ExampleController) allocate(ctx context.Context, claim *resourcev1alpha2.ResourceClaim, claimParameters interface{}, class *resourcev1alpha2.ResourceClass, classParameters interface{}, selectedNode string) (result *resourcev1alpha2.AllocationResult, err error) {
|
||||
logger := klog.LoggerWithValues(klog.LoggerWithName(klog.FromContext(ctx), "Allocate"), "claim", klog.KObj(claim), "uid", claim.UID)
|
||||
defer func() {
|
||||
@ -223,7 +223,12 @@ func (c *ExampleController) allocate(ctx context.Context, claim *resourcev1alpha
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("encode parameters: %w", err)
|
||||
}
|
||||
allocation.ResourceHandle = string(data)
|
||||
allocation.ResourceHandles = []resourcev1alpha2.ResourceHandle{
|
||||
{
|
||||
DriverName: c.driverName,
|
||||
Data: string(data),
|
||||
},
|
||||
}
|
||||
var nodes []string
|
||||
if node != "" {
|
||||
nodes = append(nodes, node)
|
||||
|
Loading…
Reference in New Issue
Block a user