Consolidate extended resources and hugepages in Scheduler.

This commit is contained in:
Avesh Agarwal
2017-09-15 10:33:41 -04:00
parent 3e8a8286d8
commit ae05a6da34
6 changed files with 81 additions and 116 deletions

View File

@@ -265,6 +265,11 @@ func IsIntegerResourceName(str string) bool {
return integerResources.Has(str) || IsExtendedResourceName(api.ResourceName(str))
}
// Extended and HugePages resources
func IsScalarResourceName(name api.ResourceName) bool {
return IsExtendedResourceName(name) || IsHugePageResourceName(name)
}
// this function aims to check if the service's ClusterIP is set or not
// the objective is not to perform validation here
func IsServiceIPSet(service *api.Service) bool {