move nodeinfo type to framework pkg
This commit is contained in:
@@ -32,7 +32,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/kubernetes/pkg/scheduler/apis/config"
|
||||
"k8s.io/kubernetes/pkg/scheduler/metrics"
|
||||
schedulertypes "k8s.io/kubernetes/pkg/scheduler/types"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -138,10 +137,10 @@ type TestPluginPreFilterExtension struct {
|
||||
inj injectedResult
|
||||
}
|
||||
|
||||
func (e *TestPluginPreFilterExtension) AddPod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *schedulertypes.NodeInfo) *Status {
|
||||
func (e *TestPluginPreFilterExtension) AddPod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *NodeInfo) *Status {
|
||||
return NewStatus(Code(e.inj.PreFilterAddPodStatus), "injected status")
|
||||
}
|
||||
func (e *TestPluginPreFilterExtension) RemovePod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *schedulertypes.NodeInfo) *Status {
|
||||
func (e *TestPluginPreFilterExtension) RemovePod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *NodeInfo) *Status {
|
||||
return NewStatus(Code(e.inj.PreFilterRemovePodStatus), "injected status")
|
||||
}
|
||||
|
||||
@@ -165,7 +164,7 @@ func (pl *TestPlugin) PreFilterExtensions() PreFilterExtensions {
|
||||
return &TestPluginPreFilterExtension{inj: pl.inj}
|
||||
}
|
||||
|
||||
func (pl *TestPlugin) Filter(ctx context.Context, state *CycleState, pod *v1.Pod, nodeInfo *schedulertypes.NodeInfo) *Status {
|
||||
func (pl *TestPlugin) Filter(ctx context.Context, state *CycleState, pod *v1.Pod, nodeInfo *NodeInfo) *Status {
|
||||
return NewStatus(Code(pl.inj.FilterStatus), "injected filter status")
|
||||
}
|
||||
|
||||
@@ -228,13 +227,13 @@ func (pl *TestPreFilterWithExtensionsPlugin) PreFilter(ctx context.Context, stat
|
||||
}
|
||||
|
||||
func (pl *TestPreFilterWithExtensionsPlugin) AddPod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod,
|
||||
podToAdd *v1.Pod, nodeInfo *schedulertypes.NodeInfo) *Status {
|
||||
podToAdd *v1.Pod, nodeInfo *NodeInfo) *Status {
|
||||
pl.AddCalled++
|
||||
return nil
|
||||
}
|
||||
|
||||
func (pl *TestPreFilterWithExtensionsPlugin) RemovePod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod,
|
||||
podToRemove *v1.Pod, nodeInfo *schedulertypes.NodeInfo) *Status {
|
||||
podToRemove *v1.Pod, nodeInfo *NodeInfo) *Status {
|
||||
pl.RemoveCalled++
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user