api

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CpuResource    = "CPU"
	GpuResource    = "GPU"
	MemoryResource = "Memory"
)
View Source
const (
	NodePodNumberExceeded = "node(s) pod number exceeded"
)

Variables

This section is empty.

Functions

func GetBuildOverCapacityMessageForQueue

func GetBuildOverCapacityMessageForQueue(queueName string, resourceName string, deserved, used float64,
	requiredResources *podgroup_info.JobRequirement) string

func GetConsolidateMessage

func GetConsolidateMessage(preempteeTask *pod_info.PodInfo) string

func GetGangEvictionMessage

func GetGangEvictionMessage(taskNamespace, taskName string, minimum int32) string

func GetJobOverMaxAllowedMessageForQueue

func GetJobOverMaxAllowedMessageForQueue(
	queueName string, resourceName string, maxAllowed, used, requested float64,
) string

func GetPreemptMessage

func GetPreemptMessage(preemptorJob *podgroup_info.PodGroupInfo, preempteeTask *pod_info.PodInfo) string

func GetReclaimMessage

func GetReclaimMessage(reclaimeeTask *pod_info.PodInfo, reclaimerJob *podgroup_info.PodGroupInfo) string

func GetReclaimQueueDetailsMessage

func GetReclaimQueueDetailsMessage(queueName string, queueAllocated *resource_info.ResourceRequirements,
	queueQuota *resource_info.ResourceRequirements, queueFairShare *resource_info.ResourceRequirements, queuePriority int) string

Types

type CanReclaimResourcesFn

type CanReclaimResourcesFn func(*reclaimer_info.ReclaimerInfo) bool

CanReclaimResourcesFn is a function that determines if a reclaimer can get more resources

type ClusterInfo

ClusterInfo is a snapshot of cluster by cache.

func NewClusterInfo

func NewClusterInfo() *ClusterInfo

func (ClusterInfo) String

func (ci ClusterInfo) String() string

type EvictableFn

EvictableFn is a function which determines if a reclaimer can reclaim a victim.

type GpuOrderFn

type GpuOrderFn func(*pod_info.PodInfo, *node_info.NodeInfo, string) (float64, error)

GpuOrderFn is used to get priority score for a gpu for a particular task.

type IsJobOverCapacityFn

type IsJobOverCapacityFn func(job *podgroup_info.PodGroupInfo, tasksToAllocate []*pod_info.PodInfo) *SchedulableResult

IsJobOverCapacityFn is a function which determines if a job is over queue capacity.

type IsTaskAllocationOverCapacityFn

type IsTaskAllocationOverCapacityFn func(task *pod_info.PodInfo, job *podgroup_info.PodGroupInfo, node *node_info.NodeInfo) *SchedulableResult

IsTaskAllocationOverCapacityFn is a function which determines if a task is over capacity.

type NodeOrderFn

type NodeOrderFn func(*pod_info.PodInfo, *node_info.NodeInfo) (float64, error)

NodeOrderFn is used to get priority score for a node for a particular task.

type NodePreOrderFn

type NodePreOrderFn func(*pod_info.PodInfo, []*node_info.NodeInfo) error

NodePreOrderFn is used for pre-calculations on the feasible nodes for pods. Outputs of these calculations will be used in the NodeOrderFn

type OnJobSolutionStartFn

type OnJobSolutionStartFn func()

OnJobSolutionStartFn is used for notifying on job solution (and scenario simulations) start

type PrePredicateFn

type PrePredicateFn func(*pod_info.PodInfo, *podgroup_info.PodGroupInfo) error

PrePredicateFn is used to prepare for predicate on pod.

type PredicateFn

PredicateFn is used to predicate node for task.

type QueueResource

QueueResource is a function which returns the resource of a queue.

type SchedulableResult

type SchedulableResult struct {
	IsSchedulable bool
	Reason        v2alpha2.UnschedulableReason
	Message       string
	Details       *v2alpha2.UnschedulableExplanationDetails
}

Directories

Path Synopsis
Package pod_affinity is a generated GoMock package.
Package pod_affinity is a generated GoMock package.

Jump to

Keyboard shortcuts

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