Modify the return type of RunFilterPlugins to *Status

Before, the return type of RunFilterPlugins is a Map, but considering we'll return immediately
once we met unsuccessful status, this is not necessary.

Signed-off-by: Kante Yin <kerthcet@gmail.com>
This commit is contained in:
Kante Yin
2023-01-03 14:33:58 +08:00
parent 7eb9a75bf9
commit 49e7e80999
4 changed files with 46 additions and 55 deletions

View File

@@ -757,7 +757,7 @@ type PluginsRunner interface {
// preemption, we may pass a copy of the original nodeInfo object that has some pods
// removed from it to evaluate the possibility of preempting them to
// schedule the target pod.
RunFilterPlugins(context.Context, *CycleState, *v1.Pod, *NodeInfo) PluginToStatus
RunFilterPlugins(context.Context, *CycleState, *v1.Pod, *NodeInfo) *Status
// RunPreFilterExtensionAddPod calls the AddPod interface for the set of configured
// PreFilter plugins. It returns directly if any of the plugins return any
// status other than Success.