DRA: remove immediate allocation
As agreed in https://github.com/kubernetes/enhancements/pull/4709, immediate allocation is one of those features which can be removed because it makes no sense for structured parameters and the justification for classic DRA is weak.
This commit is contained in:
@@ -46,14 +46,9 @@ func validateResourceClaimSpec(spec *resource.ResourceClaimSpec, fldPath *field.
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceClassName"), spec.ResourceClassName, msg))
|
||||
}
|
||||
allErrs = append(allErrs, validateResourceClaimParametersRef(spec.ParametersRef, fldPath.Child("parametersRef"))...)
|
||||
if !supportedAllocationModes.Has(string(spec.AllocationMode)) {
|
||||
allErrs = append(allErrs, field.NotSupported(fldPath.Child("allocationMode"), spec.AllocationMode, supportedAllocationModes.List()))
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
var supportedAllocationModes = sets.NewString(string(resource.AllocationModeImmediate), string(resource.AllocationModeWaitForFirstConsumer))
|
||||
|
||||
// It would have been nice to use Go generics to reuse the same validation
|
||||
// function for Kind and Name in both types, but generics cannot be used to
|
||||
// access common fields in structs.
|
||||
|
||||
Reference in New Issue
Block a user