mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #100068 from chendave/validation
Update comments for the resource weight of `RequestedToCapacityRatio` plugin
This commit is contained in:
commit
39fb6282be
@ -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
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user