Merge pull request #50757 from NickrenREN/local-storage-limitrange
Automatic merge from submit-queue Add local ephemeral storage support in LimitRange **Special notes for your reviewer**: For a single local ephemeral storage resource xref #43607 **Release note**: ```release-note Add local ephemeral storage support to LimitRange ``` /assign @jingxu97 cc @ddysher
This commit is contained in:
@@ -3554,6 +3554,10 @@ func validateLimitRangeTypeName(value string, fldPath *field.Path) field.ErrorLi
|
||||
// Validate limit range resource name
|
||||
// limit types (other than Pod/Container) could contain storage not just cpu or memory
|
||||
func validateLimitRangeResourceName(limitType api.LimitType, value string, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
if value == string(api.ResourceEphemeralStorage) && !utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) {
|
||||
return append(allErrs, field.Forbidden(fldPath, "ResourceEphemeralStorage field disabled by feature-gate for Resource LimitRange"))
|
||||
}
|
||||
switch limitType {
|
||||
case api.LimitTypePod, api.LimitTypeContainer:
|
||||
return validateContainerResourceName(value, fldPath)
|
||||
|
Reference in New Issue
Block a user