mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Fix validation return value
This commit is contained in:
		@@ -207,6 +207,8 @@ var standardResources = sets.NewString(
 | 
			
		||||
	string(api.ResourcePersistentVolumeClaims),
 | 
			
		||||
	string(api.ResourceStorage),
 | 
			
		||||
	string(api.ResourceRequestsStorage),
 | 
			
		||||
	string(api.ResourceServicesNodePorts),
 | 
			
		||||
	string(api.ResourceServicesLoadBalancers),
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// IsStandardResourceName returns true if the resource is known to the system
 | 
			
		||||
 
 | 
			
		||||
@@ -3409,7 +3409,7 @@ func validateResourceName(value string, fldPath *field.Path) field.ErrorList {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return field.ErrorList{}
 | 
			
		||||
	return allErrs
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Validate container resource name
 | 
			
		||||
@@ -3422,7 +3422,7 @@ func validateContainerResourceName(value string, fldPath *field.Path) field.Erro
 | 
			
		||||
			return append(allErrs, field.Invalid(fldPath, value, "must be a standard resource for containers"))
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return field.ErrorList{}
 | 
			
		||||
	return allErrs
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Validate resource names that can go in a resource quota
 | 
			
		||||
@@ -3434,7 +3434,7 @@ func ValidateResourceQuotaResourceName(value string, fldPath *field.Path) field.
 | 
			
		||||
			return append(allErrs, field.Invalid(fldPath, value, isInvalidQuotaResource))
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return field.ErrorList{}
 | 
			
		||||
	return allErrs
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Validate limit range types
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user