Define in-tree scheduler plugin names in separate pkg to break a cyclic depednecy when moving plugin defaulting to CC

This commit is contained in:
Abdullah Gharaibeh
2021-06-09 15:31:56 -04:00
parent d5685397e1
commit 46f3e4dfdd
26 changed files with 107 additions and 35 deletions

View File

@@ -29,6 +29,7 @@ import (
"k8s.io/kubernetes/pkg/scheduler/apis/config/validation"
"k8s.io/kubernetes/pkg/scheduler/framework"
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature"
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/names"
)
var _ framework.PreFilterPlugin = &Fit{}
@@ -37,7 +38,7 @@ var _ framework.EnqueueExtensions = &Fit{}
const (
// FitName is the name of the plugin used in the plugin registry and configurations.
FitName = "NodeResourcesFit"
FitName = names.NodeResourcesFit
// preFilterStateKey is the key in CycleState to NodeResourcesFit pre-computed data.
// Using the name of the plugin will likely help us avoid collisions with other plugins.