mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
DRA: remove "classic DRA"
This removes the DRAControlPlaneController feature gate, the fields controlled by it (claim.spec.controller, claim.status.deallocationRequested, claim.status.allocation.controller, class.spec.suitableNodes), the PodSchedulingContext type, and all code related to the feature. The feature gets removed because there is no path towards beta and GA and DRA with "structured parameters" should be able to replace it.
This commit is contained in:
@@ -569,55 +569,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-reserved-deallocation-requested": {
|
||||
wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status", "reservedFor"), "new entries may not be added while `deallocationRequested` or `deletionTimestamp` are set")},
|
||||
oldClaim: func() *resource.ResourceClaim {
|
||||
claim := validAllocatedClaim.DeepCopy()
|
||||
claim.Status.DeallocationRequested = true
|
||||
return claim
|
||||
}(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim.Status.ReservedFor = []resource.ResourceClaimConsumerReference{
|
||||
{
|
||||
Resource: "pods",
|
||||
Name: "foo",
|
||||
UID: "1",
|
||||
},
|
||||
}
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"add-deallocation-requested": {
|
||||
oldClaim: validAllocatedClaim,
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim.Status.DeallocationRequested = true
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"remove-allocation": {
|
||||
oldClaim: func() *resource.ResourceClaim {
|
||||
claim := validAllocatedClaim.DeepCopy()
|
||||
claim.Status.DeallocationRequested = true
|
||||
return claim
|
||||
}(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim.Status.DeallocationRequested = false
|
||||
claim.Status.Allocation = nil
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-deallocation-requested-removal": {
|
||||
wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status", "deallocationRequested"), "may not be cleared when `allocation` is set")},
|
||||
oldClaim: func() *resource.ResourceClaim {
|
||||
claim := validAllocatedClaim.DeepCopy()
|
||||
claim.Status.DeallocationRequested = true
|
||||
return claim
|
||||
}(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim.Status.DeallocationRequested = false
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-allocation-modification": {
|
||||
wantFailures: field.ErrorList{field.Invalid(field.NewPath("status.allocation"), func() *resource.AllocationResult {
|
||||
claim := validAllocatedClaim.DeepCopy()
|
||||
@@ -630,44 +581,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-deallocation-requested-in-use": {
|
||||
wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status", "deallocationRequested"), "deallocation cannot be requested while `reservedFor` is set")},
|
||||
oldClaim: func() *resource.ResourceClaim {
|
||||
claim := validAllocatedClaim.DeepCopy()
|
||||
claim.Status.ReservedFor = []resource.ResourceClaimConsumerReference{
|
||||
{
|
||||
Resource: "pods",
|
||||
Name: "foo",
|
||||
UID: "1",
|
||||
},
|
||||
}
|
||||
return claim
|
||||
}(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim.Status.DeallocationRequested = true
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-deallocation-not-allocated": {
|
||||
wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status"), "`allocation` must be set when `deallocationRequested` is set")},
|
||||
oldClaim: validClaim,
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim.Status.DeallocationRequested = true
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-allocation-removal-not-reset": {
|
||||
wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status"), "`allocation` must be set when `deallocationRequested` is set")},
|
||||
oldClaim: func() *resource.ResourceClaim {
|
||||
claim := validAllocatedClaim.DeepCopy()
|
||||
claim.Status.DeallocationRequested = true
|
||||
return claim
|
||||
}(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim.Status.Allocation = nil
|
||||
return claim
|
||||
},
|
||||
},
|
||||
"invalid-request-name": {
|
||||
wantFailures: field.ErrorList{
|
||||
field.Invalid(field.NewPath("status", "allocation", "devices", "config").Index(0).Child("requests").Index(1), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')"),
|
||||
|
||||
Reference in New Issue
Block a user