state

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterSnapshot

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

func NewClusterSnapshot

func NewClusterSnapshot(nodes map[string]framework.NodeInfo) ClusterSnapshot

func (*ClusterSnapshot) AddPod

func (c *ClusterSnapshot) AddPod(nodeName string, pod v1.Pod) error

func (*ClusterSnapshot) Commit

func (c *ClusterSnapshot) Commit()

func (*ClusterSnapshot) Fork

func (c *ClusterSnapshot) Fork() error

func (*ClusterSnapshot) GetLackingResources

func (c *ClusterSnapshot) GetLackingResources(pod v1.Pod) framework.Resource

func (*ClusterSnapshot) GetNode

func (c *ClusterSnapshot) GetNode(name string) (framework.NodeInfo, bool)

func (*ClusterSnapshot) GetNodes

func (c *ClusterSnapshot) GetNodes() map[string]framework.NodeInfo

func (*ClusterSnapshot) Revert

func (c *ClusterSnapshot) Revert()

func (*ClusterSnapshot) SetNode

func (c *ClusterSnapshot) SetNode(nodeInfo framework.NodeInfo)

type ClusterState

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

func NewClusterState

func NewClusterState() ClusterState

func (*ClusterState) GetNode

func (c *ClusterState) GetNode(nodeName string) (framework.NodeInfo, bool)

func (*ClusterState) GetNodes

func (c *ClusterState) GetNodes() []framework.NodeInfo

func (*ClusterState) GetSnapshot

func (c *ClusterState) GetSnapshot() ClusterSnapshot

type GPUPartitioning

type GPUPartitioning struct {
	GPUIndex  int
	Resources map[v1.ResourceName]int
}

type NodeController

type NodeController struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

func NewNodeController

func NewNodeController(client client.Client, scheme *runtime.Scheme, state *ClusterState) NodeController

func (*NodeController) Reconcile

func (c *NodeController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*NodeController) SetupWithManager

func (c *NodeController) SetupWithManager(mgr ctrl.Manager, name string) error

type NodePartitioning

type NodePartitioning struct {
	GPUs []GPUPartitioning
}

func (NodePartitioning) Equal

func (n NodePartitioning) Equal(other NodePartitioning) bool

type PartitioningState

type PartitioningState map[string]NodePartitioning

func (PartitioningState) Equal

func (p PartitioningState) Equal(other PartitioningState) bool

func (PartitioningState) IsEmpty

func (p PartitioningState) IsEmpty() bool

type PodController

type PodController struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

func NewPodController

func NewPodController(client client.Client, scheme *runtime.Scheme, state *ClusterState) PodController

func (*PodController) Reconcile

func (c *PodController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PodController) SetupWithManager

func (c *PodController) SetupWithManager(mgr ctrl.Manager, name string) error

Jump to

Keyboard shortcuts

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