manager

package
v0.0.0-...-d68d91a Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Pod
	AnnotatePod(ctx context.Context, pod *corev1.Pod)
	// QueueBinding
	GetQueueBinding(pod *corev1.Pod) (*moirai.QueueBinding, error)
	GetQueueBindingListFromQueue(ctx context.Context, queue string) (*moirai.QueueBindingList, error)
}

Manager is an interface for managing scheduler plugin.

type MoiraiManager

type MoiraiManager struct {
	KubeClient  kubernetes.Interface
	MoiraiCache cache.Cache
}

MoiraiManager is a concrete implementation of Manager interface for Moirai.

func NewMoiraiManager

func NewMoiraiManager(client kubernetes.Interface, moiraiCache cache.Cache) *MoiraiManager

NewMoiraiManager returns a new MoiraiManager.

func (*MoiraiManager) AnnotatePod

func (m *MoiraiManager) AnnotatePod(ctx context.Context, pod *corev1.Pod)

AnnotatePod sets the annotation to the specified pod

func (*MoiraiManager) CheckResources

func (m *MoiraiManager) CheckResources(nodeList []*framework.NodeInfo, resource corev1.ResourceList)

CheckResources checks the resource of the node

func (*MoiraiManager) GetAvailableNodeResources

func (m *MoiraiManager) GetAvailableNodeResources(nodeInfo *framework.NodeInfo, queueBindingName string)

GetAvailableNodeResources returns the available resources of the node

func (*MoiraiManager) GetNodeAvailableResource

func (m *MoiraiManager) GetNodeAvailableResource() *framework.Resource

GetNodeAvailableResource returns the available resource of the node

func (*MoiraiManager) GetQueueBinding

func (m *MoiraiManager) GetQueueBinding(ctx context.Context, pod *corev1.Pod) (*moirai.QueueBinding, error)

GetQueueBinding returns the queue binding of the specified pod

func (*MoiraiManager) GetQueueBindingByName

func (m *MoiraiManager) GetQueueBindingByName(ctx context.Context, namespace string, name string) (*moirai.QueueBinding, error)

GetQueueBindingByName returns the queue binding of the specified name

func (*MoiraiManager) GetQueueBindingListFromQueue

func (m *MoiraiManager) GetQueueBindingListFromQueue(ctx context.Context, queue string) (*moirai.QueueBindingList, error)

GetQueueBindingListFromQueue returns the list of queue bindings of the specified queue

Jump to

Keyboard shortcuts

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