extension

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DomainPrefix = "koordinator.sh/"

	LabelPodQoS      = DomainPrefix + "qosClass"
	LabelPodPriority = DomainPrefix + "priority"
)
View Source
const (
	AnnotationPodCPUBurst = DomainPrefix + "cpuBurst"

	AnnotationPodMemoryQoS = DomainPrefix + "memoryQoS"
)
View Source
const (
	PriorityProd  PriorityClass = "koord-prod"
	PriorityMid   PriorityClass = "koord-mid"
	PriorityBatch PriorityClass = "koord-batch"
	PriorityFree  PriorityClass = "koord-free"
	PriorityNone  PriorityClass = ""

	PriorityProdValueMax int32 = 9999
	PriorityProdValueMin int32 = 9000

	PriorityMidValueMax int32 = 7099
	PriorityMidValueMin int32 = 7000

	PriorityBatchValueMax int32 = 5999
	PriorityBatchValueMin int32 = 5000

	PriorityFreeValueMax int32 = 3999
	PriorityFreeValueMin int32 = 3000
)
View Source
const (
	BatchCPU    corev1.ResourceName = DomainPrefix + "batch-cpu"
	BatchMemory corev1.ResourceName = DomainPrefix + "batch-memory"
)
View Source
const (
	// AnnotationCustomUsageThresholds represents the user-defined resource utilization threshold.
	// For specific value definitions, see CustomUsageThresholds
	AnnotationCustomUsageThresholds = "scheduling.koordinator.sh/usage-thresholds"
)

Variables

Functions

func GetPodCPUBurstConfig added in v0.3.0

func GetPodCPUBurstConfig(pod *corev1.Pod) (*slov1aplhpa1.CPUBurstConfig, error)

func GetPodMemoryQoSConfig added in v0.3.0

func GetPodMemoryQoSConfig(pod *corev1.Pod) (*slov1aplhpa1.PodMemoryQoSConfig, error)

func TranslateResourceNameByPriorityClass added in v0.4.0

func TranslateResourceNameByPriorityClass(priorityClass PriorityClass, defaultResourceName corev1.ResourceName) corev1.ResourceName

TranslateResourceNameByPriorityClass translates defaultResourceName to extend resourceName by PriorityClass

Types

type CustomUsageThresholds added in v0.4.0

type CustomUsageThresholds struct {
	UsageThresholds map[corev1.ResourceName]int64 `json:"usageThresholds,omitempty"`
}

CustomUsageThresholds supports user-defined node resource utilization thresholds.

func GetCustomUsageThresholds added in v0.4.0

func GetCustomUsageThresholds(node *corev1.Node) (*CustomUsageThresholds, error)

type PriorityClass

type PriorityClass string

func GetPriorityClass

func GetPriorityClass(pod *corev1.Pod) PriorityClass

type QoSClass

type QoSClass string
const (
	QoSLSE    QoSClass = "LSE"
	QoSLSR    QoSClass = "LSR"
	QoSLS     QoSClass = "LS"
	QoSBE     QoSClass = "BE"
	QoSSystem QoSClass = "SYSTEM"
	QoSNone   QoSClass = ""
)

func GetPodQoSClass

func GetPodQoSClass(pod *corev1.Pod) QoSClass

func GetQoSClassByLabels added in v0.4.0

func GetQoSClassByLabels(labels map[string]string) QoSClass

Jump to

Keyboard shortcuts

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