Move pkg/apis/core/v1.IsScalarResourceName under pkg/scheduler/util

IsScalarResourceName is imported only inside pkg/scheduler packages.
This commit is contained in:
Jan Chaloupka
2020-10-27 13:40:30 +01:00
parent b4258ec138
commit 6822a0ec20
5 changed files with 16 additions and 16 deletions

View File

@@ -136,12 +136,6 @@ func IsAttachableVolumeResourceName(name v1.ResourceName) bool {
return strings.HasPrefix(string(name), v1.ResourceAttachableVolumesPrefix)
}
// IsScalarResourceName validates the resource for Extended, Hugepages, Native and AttachableVolume resources
func IsScalarResourceName(name v1.ResourceName) bool {
return IsExtendedResourceName(name) || IsHugePageResourceName(name) ||
IsPrefixedNativeResource(name) || IsAttachableVolumeResourceName(name)
}
// IsServiceIPSet aims to check if the service's ClusterIP is set or not
// the objective is not to perform validation here
func IsServiceIPSet(service *v1.Service) bool {