Merge pull request #100068 from chendave/validation

Update comments for the resource weight of `RequestedToCapacityRatio` plugin
This commit is contained in:
Kubernetes Prow Robot 2021-04-08 17:11:31 -07:00 committed by GitHub
commit 39fb6282be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ type RequestedToCapacityRatioArgs struct {
Shape []UtilizationShapePoint
// Resources to be considered when scoring.
// 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
}

View File

@ -240,7 +240,7 @@ func validateFunctionShape(shape []config.UtilizationShapePoint, path *field.Pat
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 {
var allErrs field.ErrorList
for i, r := range resources {