From 4c5c34916530b635b6e0123f167e1ff48f0677f4 Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Wed, 10 Mar 2021 16:57:48 +0800 Subject: [PATCH] Update comments for the resource weight of `RequestedToCapacityRatio` plugin Signed-off-by: Dave Chen --- pkg/scheduler/apis/config/types_pluginargs.go | 2 +- pkg/scheduler/apis/config/validation/validation_pluginargs.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/scheduler/apis/config/types_pluginargs.go b/pkg/scheduler/apis/config/types_pluginargs.go index 4759d8fedee..30e9542edd9 100644 --- a/pkg/scheduler/apis/config/types_pluginargs.go +++ b/pkg/scheduler/apis/config/types_pluginargs.go @@ -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 } diff --git a/pkg/scheduler/apis/config/validation/validation_pluginargs.go b/pkg/scheduler/apis/config/validation/validation_pluginargs.go index 182f616bf10..41804fe9793 100644 --- a/pkg/scheduler/apis/config/validation/validation_pluginargs.go +++ b/pkg/scheduler/apis/config/validation/validation_pluginargs.go @@ -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 {