mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Validate plugin config for KubeSchedulerConfiguration
Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
@@ -72,8 +72,7 @@ func NewFit(plArgs runtime.Object, _ framework.Handle) (framework.Plugin, error)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("want args to be of type NodeResourcesFitArgs, got %T", plArgs)
|
||||
}
|
||||
|
||||
if err := validation.ValidateNodeResourcesFitArgs(args); err != nil {
|
||||
if err := validation.ValidateNodeResourcesFitArgs(nil, args); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Fit{
|
||||
|
||||
@@ -70,8 +70,7 @@ func NewLeastAllocated(laArgs runtime.Object, h framework.Handle) (framework.Plu
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("want args to be of type NodeResourcesLeastAllocatedArgs, got %T", laArgs)
|
||||
}
|
||||
|
||||
if err := validation.ValidateNodeResourcesLeastAllocatedArgs(args); err != nil {
|
||||
if err := validation.ValidateNodeResourcesLeastAllocatedArgs(nil, args); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -68,8 +68,7 @@ func NewMostAllocated(maArgs runtime.Object, h framework.Handle) (framework.Plug
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("want args to be of type NodeResourcesMostAllocatedArgs, got %T", args)
|
||||
}
|
||||
|
||||
if err := validation.ValidateNodeResourcesMostAllocatedArgs(args); err != nil {
|
||||
if err := validation.ValidateNodeResourcesMostAllocatedArgs(nil, args); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ func NewRequestedToCapacityRatio(plArgs runtime.Object, handle framework.Handle)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := validation.ValidateRequestedToCapacityRatioArgs(args); err != nil {
|
||||
if err := validation.ValidateRequestedToCapacityRatioArgs(nil, &args); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user