store

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPodInfo

func NewPodInfo(pod *v1.Pod, scheduler string) *podInfo

Types

type DispatchInfo

type DispatchInfo interface {
	AddPod(pod *v1.Pod)
	RemovePod(pod *v1.Pod)
	RemovePodByKey(key string)
	AddPodInAdvance(pod *v1.Pod, scheduler string)
	UpdatePodInAdvance(pod *v1.Pod, scheduler string)
	GetMostIdleSchedulerAndAddPodInAdvance(pod *v1.Pod) string
	AddScheduler(schedulerName string)
	DeleteScheduler(schedulerName string)
	GetPodsOfOneScheduler(schedulerName string) []string
}

TODO: i don't think we should do expiration operations(remove pod directly) in dispatcher we should react based on pod events and scheduler liveness changes TODO: figure out what we can do if schedulers dies

func NewDispatchInfo

func NewDispatchInfo() DispatchInfo

type Schedulable

type Schedulable interface {
	// GetDemand returns the maximum number of resources required by this
	// schedulable. This is defined as number of currently utilized resources +
	// number of not launched resources (that are either not yet launched or need
	// to be speculated).
	GetDemand(resourceType podutil.PodResourceType) util.DRFResource
	// GetResourceUsage returns the aggregate amount of resources consumed by
	// the schedulable.
	GetResourceUsage(resourceType podutil.PodResourceType) util.DRFResource
	// GetMinShare returns the minimum resource share assigned to the schedulable.
	GetMinShare(resourceType podutil.PodResourceType) util.DRFResource
	// GetMaxShare returns the maximum resource share assigned to the schedulable.
	GetMaxShare(resourceType podutil.PodResourceType) util.DRFResource
	// GetFairShare returns the fair share assigned to this schedulable.
	GetFairShare(resourceType podutil.PodResourceType) util.DRFResource
	// SetFairShare assigns a fair share to this schedulable.
	SetFairShare(rName v1.ResourceName, value int64, resourceType podutil.PodResourceType)
}

Schedulable represents an entity that can be scheduled such as an application or a queue. It provides a common interface so that algorithms such as fair sharing can be applied both within a queue and across queues.

Jump to

Keyboard shortcuts

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