Documentation ¶
Index ¶
- Constants
- Variables
- func GetPodCPUBurstConfig(pod *corev1.Pod) (*slov1aplhpa1.CPUBurstConfig, error)
- func GetPodMemoryQoSConfig(pod *corev1.Pod) (*slov1aplhpa1.PodMemoryQoSConfig, error)
- func TranslateResourceNameByPriorityClass(priorityClass PriorityClass, defaultResourceName corev1.ResourceName) corev1.ResourceName
- type CustomUsageThresholds
- type PriorityClass
- type QoSClass
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 ¶
View Source
var ( ResourceNameMap = map[PriorityClass]map[corev1.ResourceName]corev1.ResourceName{ PriorityBatch: { corev1.ResourceCPU: BatchCPU, corev1.ResourceMemory: BatchMemory, }, } )
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
func GetPodQoSClass ¶
func GetQoSClassByLabels ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.