Move scheduler interface to pkg/scheduler/framework

This commit is contained in:
Ali
2020-10-10 01:41:44 +11:00
parent 1dff024e64
commit 09b2e8f638
142 changed files with 1450 additions and 1362 deletions

View File

@@ -24,13 +24,13 @@ import (
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
"k8s.io/kubernetes/pkg/scheduler/framework"
pluginhelper "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper"
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
)
// NodeAffinity is a plugin that checks if a pod node selector matches the node label.
type NodeAffinity struct {
handle framework.FrameworkHandle
handle framework.Handle
}
var _ framework.FilterPlugin = &NodeAffinity{}
@@ -113,6 +113,6 @@ func (pl *NodeAffinity) ScoreExtensions() framework.ScoreExtensions {
}
// New initializes a new plugin and returns it.
func New(_ runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) {
func New(_ runtime.Object, h framework.Handle) (framework.Plugin, error) {
return &NodeAffinity{handle: h}, nil
}