Update comments for the resource weight of RequestedToCapacityRatio plugin

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen 2021-03-10 16:57:48 +08:00
parent 956de2644f
commit 4c5c349165
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ type RequestedToCapacityRatioArgs struct {
Shape []UtilizationShapePoint Shape []UtilizationShapePoint
// Resources to be considered when scoring. // Resources to be considered when scoring.
// The default resource set includes "cpu" and "memory" with an equal weight. // The default resource set includes "cpu" and "memory" with an equal weight.
// Allowed weights go from 1 to 100. // Weights should be larger than 0.
Resources []ResourceSpec Resources []ResourceSpec
} }

View File

@ -240,7 +240,7 @@ func validateFunctionShape(shape []config.UtilizationShapePoint, path *field.Pat
return allErrs return allErrs
} }
// TODO potentially replace with validateResources // weight of resource is allowed to exceed 100, this is only applicable to `RequestedToCapacityRatio` plugin for backwards compatibility reason.
func validateResourcesNoMax(resources []config.ResourceSpec, p *field.Path) field.ErrorList { func validateResourcesNoMax(resources []config.ResourceSpec, p *field.Path) field.ErrorList {
var allErrs field.ErrorList var allErrs field.ErrorList
for i, r := range resources { for i, r := range resources {