mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
DRA: remove "sharable" from claim allocation result
Now all claims are shareable up to the limit imposed by the size of the "reserverFor" array. This is one of the agreed simplifications for 1.31.
This commit is contained in:
@@ -336,7 +336,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
}
|
||||
return handles
|
||||
}(),
|
||||
Shareable: true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -584,25 +583,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-reserved-for-not-shared": {
|
||||
wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status", "reservedFor"), "may not be reserved more than once")},
|
||||
oldClaim: func() *resource.ResourceClaim {
|
||||
claim := validAllocatedClaim.DeepCopy()
|
||||
claim.Status.Allocation.Shareable = false
|
||||
return claim
|
||||
}(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
for i := 0; i < 2; i++ {
|
||||
claim.Status.ReservedFor = append(claim.Status.ReservedFor,
|
||||
resource.ResourceClaimConsumerReference{
|
||||
Resource: "pods",
|
||||
Name: fmt.Sprintf("foo-%d", i),
|
||||
UID: types.UID(fmt.Sprintf("%d", i)),
|
||||
})
|
||||
}
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-reserved-for-no-allocation": {
|
||||
wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status", "reservedFor"), "may not be specified when `allocated` is not set")},
|
||||
oldClaim: validClaim,
|
||||
|
||||
Reference in New Issue
Block a user