Documentation ¶
Index ¶
- type Manager
- type MoiraiManager
- func (m *MoiraiManager) AnnotatePod(ctx context.Context, pod *corev1.Pod)
- func (m *MoiraiManager) CheckResources(nodeList []*framework.NodeInfo, resource corev1.ResourceList)
- func (m *MoiraiManager) GetAvailableNodeResources(nodeInfo *framework.NodeInfo, queueBindingName string)
- func (m *MoiraiManager) GetNodeAvailableResource() *framework.Resource
- func (m *MoiraiManager) GetQueueBinding(ctx context.Context, pod *corev1.Pod) (*moirai.QueueBinding, error)
- func (m *MoiraiManager) GetQueueBindingByName(ctx context.Context, namespace string, name string) (*moirai.QueueBinding, error)
- func (m *MoiraiManager) GetQueueBindingListFromQueue(ctx context.Context, queue string) (*moirai.QueueBindingList, error)
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