mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-22 01:23:18 +00:00
DRA kubelet: API clarification
It's not okay to drop a claim from the response just because it encountered no error. We want to be sure that a DRA driver really looked at the claim.
This commit is contained in:
@@ -115,7 +115,8 @@ type DRAPlugin interface {
|
||||
// and serialization.
|
||||
//
|
||||
// The conventions for returning one overall error and several per-ResourceClaim
|
||||
// errors are the same as in PrepareResourceClaims.
|
||||
// errors are the same as in PrepareResourceClaims. In particular, all claims
|
||||
// must have an entry in the response, even if that entry is nil.
|
||||
UnprepareResourceClaims(ctx context.Context, claims []NamespacedObject) (result map[types.UID]error, err error)
|
||||
|
||||
// ErrorHandler gets called for each error encountered while publishing
|
||||
|
||||
@@ -326,7 +326,8 @@ func (m *NodeUnprepareResourcesRequest) GetClaims() []*Claim {
|
||||
type NodeUnprepareResourcesResponse struct {
|
||||
// The ResourceClaims for which preparation was reverted.
|
||||
// The same rules as for NodePrepareResourcesResponse.claims
|
||||
// apply.
|
||||
// apply. In particular, all claims in the request must
|
||||
// have an entry in the response, even if that entry is nil.
|
||||
Claims map[string]*NodeUnprepareResourceResponse `protobuf:"bytes,1,rep,name=claims,proto3" json:"claims,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
|
||||
@@ -95,7 +95,8 @@ message NodeUnprepareResourcesRequest {
|
||||
message NodeUnprepareResourcesResponse {
|
||||
// The ResourceClaims for which preparation was reverted.
|
||||
// The same rules as for NodePrepareResourcesResponse.claims
|
||||
// apply.
|
||||
// apply. In particular, all claims in the request must
|
||||
// have an entry in the response, even if that entry is nil.
|
||||
map<string, NodeUnprepareResourceResponse> claims = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user