node_shuffler

package
v0.0.0-...-dcfb068 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNodeQueue

func NewNodeQueue() *nodeQueue

NewNodeQueue creates a new nodeQueue struct object

Types

type EnqueueReason

type EnqueueReason string
const (
	// no scheduler name in node annotations
	NoSchedulerName EnqueueReason = "NoSchedulerName"
	// node in inactive scheduler's partition
	InactiveScheduler EnqueueReason = "InactiveScheduler"
	// too many nodes in this scheduler's partition
	TooManyNodesInThisPartition EnqueueReason = "TooManyNodesInThisPartition"
)

type NodeShuffler

type NodeShuffler struct {
	// contains filtered or unexported fields
}

NodeShuffler stores all the necessary info to shuffle nodes TODO: support different policies later

func NewNodeShuffler

func NewNodeShuffler(k8sClient kubernetes.Interface, crdClient crdclient.Interface,
	nodeLister corelister.NodeLister, nmNodeLister nodelister.NMNodeLister, schedulerLister schedulerlister.SchedulerLister,
	maintainer *schemaintainer.SchedulerMaintainer,
) *NodeShuffler

NewNodeShuffler creates a new NodeShuffler struct

func (*NodeShuffler) AddNMNode

func (ns *NodeShuffler) AddNMNode(nmNode *nodev1alpha1.NMNode) error

func (*NodeShuffler) AddNode

func (ns *NodeShuffler) AddNode(node *v1.Node) error

func (*NodeShuffler) ReBalanceSchedulerNodes

func (ns *NodeShuffler) ReBalanceSchedulerNodes()

ReBalanceSchedulerNodes re-balances the number of nodes among all active schedulers if necessary

func (*NodeShuffler) Run

func (ns *NodeShuffler) Run(stopCh <-chan struct{})

Run runs different tasks of node shuffler

func (*NodeShuffler) SyncUpNodeAndCNR

func (ns *NodeShuffler) SyncUpNodeAndCNR()

SyncUpNodeAndCNR makes sure that node and cnr with same name share the same scheduler name annotation TODO: sync up scheduler name in node and cnr

func (*NodeShuffler) UpdateNMNode

func (ns *NodeShuffler) UpdateNMNode(oldNMNode *nodev1alpha1.NMNode, newNMNode *nodev1alpha1.NMNode) error

func (*NodeShuffler) UpdateNode

func (ns *NodeShuffler) UpdateNode(oldNode *v1.Node, newNode *v1.Node) error

type NodeToBeProcessed

type NodeToBeProcessed struct {
	// contains filtered or unexported fields
}

NodeToBeProcessed stores the node info which may need to be reassigned to another scheduler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL