mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
move nodeinfo/snapshot.go into its own package
This commit is contained in:
@@ -33,6 +33,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/scheduler/apis/config"
|
||||
"k8s.io/kubernetes/pkg/scheduler/metrics"
|
||||
schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo"
|
||||
nodeinfosnapshot "k8s.io/kubernetes/pkg/scheduler/nodeinfo/snapshot"
|
||||
schedutil "k8s.io/kubernetes/pkg/scheduler/util"
|
||||
)
|
||||
|
||||
@@ -57,7 +58,7 @@ const (
|
||||
// plugins.
|
||||
type framework struct {
|
||||
registry Registry
|
||||
nodeInfoSnapshot *schedulernodeinfo.Snapshot
|
||||
nodeInfoSnapshot *nodeinfosnapshot.Snapshot
|
||||
waitingPods *waitingPodsMap
|
||||
pluginNameToWeightMap map[string]int
|
||||
queueSortPlugins []QueueSortPlugin
|
||||
@@ -138,7 +139,7 @@ func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfi
|
||||
|
||||
f := &framework{
|
||||
registry: r,
|
||||
nodeInfoSnapshot: schedulernodeinfo.NewSnapshot(),
|
||||
nodeInfoSnapshot: nodeinfosnapshot.NewSnapshot(),
|
||||
pluginNameToWeightMap: make(map[string]int),
|
||||
waitingPods: newWaitingPodsMap(),
|
||||
clientSet: options.clientSet,
|
||||
@@ -594,7 +595,7 @@ func (f *framework) RunPermitPlugins(
|
||||
// is taken at the beginning of a scheduling cycle and remains unchanged until a
|
||||
// pod finishes "Reserve". There is no guarantee that the information remains
|
||||
// unchanged after "Reserve".
|
||||
func (f *framework) NodeInfoSnapshot() *schedulernodeinfo.Snapshot {
|
||||
func (f *framework) NodeInfoSnapshot() *nodeinfosnapshot.Snapshot {
|
||||
return f.nodeInfoSnapshot
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user