Update kubeletplugin API for DynamicResourceAllocation to v1alpha2

This PR makes the NodePrepareResources() and NodeUnprepareResource()
calls of the kubeletplugin API for DynamicResourceAllocation
symmetrical. It wasn't clear how one would use the set of CDIDevices
passed back in the NodeUnprepareResource() of the v1alpha1 API, and the
new API now passes back the full ResourceHandle that was originally
passed to the Prepare() call. Passing the ResourceHandle is strictly
more informative and a plugin could always (re)derive the set of
CDIDevice from it.

This is a breaking change, but this release is scheduled to break
multiple APIs for DynamicResourceAllocation, so it makes sense to do
this now instead of later.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
This commit is contained in:
Kevin Klues
2023-03-13 21:38:56 +00:00
parent 452f345c47
commit 579295e727
8 changed files with 106 additions and 84 deletions

View File

@@ -48,8 +48,8 @@ import (
)
const (
NodePrepareResourceMethod = "/v1alpha1.Node/NodePrepareResource"
NodeUnprepareResourceMethod = "/v1alpha1.Node/NodeUnprepareResource"
NodePrepareResourceMethod = "/v1alpha2.Node/NodePrepareResource"
NodeUnprepareResourceMethod = "/v1alpha2.Node/NodeUnprepareResource"
)
type Nodes struct {