Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add realtime overcommit constants #75

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions pkg/consts/overcommit.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@ package consts

// const variables for node annotations about overcommit ratio
const (
NodeAnnotationCPUOvercommitRatioKey = "katalyst.kubewharf.io/cpu_overcommit_ratio"
NodeAnnotationMemoryOvercommitRatioKey = "katalyst.kubewharf.io/memory_overcommit_ratio"
NodeAnnotationCPUOvercommitRatioKey = "katalyst.kubewharf.io/cpu_overcommit_ratio"
NodeAnnotationMemoryOvercommitRatioKey = "katalyst.kubewharf.io/memory_overcommit_ratio"
NodeAnnotationRealtimeCPUOvercommitRatioKey = "katalyst.kubewharf.io/realtime_cpu_overcommit_ratio"
NodeAnnotationRealtimeMemoryOvercommitRatioKey = "katalyst.kubewharf.io/realtime_memory_overcommit_ratio"

NodeAnnotationOriginalCapacityCPUKey = "katalyst.kubewharf.io/original_capacity_cpu"
NodeAnnotationOriginalCapacityMemoryKey = "katalyst.kubewharf.io/original_capacity_memory"
NodeAnnotationOriginalAllocatableCPUKey = "katalyst.kubewharf.io/original_allocatable_cpu"
NodeAnnotationOriginalAllocatableMemoryKey = "katalyst.kubewharf.io/original_allocatable_memory"

NodeAnnotationOvercommitCapacityCPUKey = "katalyst.kubewharf.io/overcommit_capacity_cpu"
NodeAnnotationOvercommitAllocatableCPUKey = "katalyst.kubewharf.io/overcommit_allocatable_cpu"
NodeAnnotationOvercommitCapacityMemoryKey = "katalyst.kubewharf.io/overcommit_capacity_memory"
NodeAnnotationOvercommitAllocatableMemoryKey = "katalyst.kubewharf.io/overcommit_allocatable_memory"
)

// const variables for matching up with node labels about overcommit
Expand All @@ -34,3 +41,20 @@ const (
DefaultNodeCPUOvercommitRatio = "1"
DefaultNodeMemoryOvercommitRatio = "1"
)

type KCNRAnnotationCPUManagerPolicy string
type KCNRAnnotationMemoryManagerPolicy string

const (
// KCNRAnnotationGuaranteedCPUs sum of pod guaranteed cpus in node
KCNRAnnotationGuaranteedCPUs = "katalyst.kubewharf.io/guaranteed_cpus"

KCNRAnnotationCPUManager = "katalyst.kubewharf.io/overcommit_cpu_manager"
KCNRAnnotationMemoryManager = "katalyst.kubewharf.io/overcommit_memory_manager"

CPUManagerOff KCNRAnnotationCPUManagerPolicy = "none"
CPUManagerPolicyNone KCNRAnnotationCPUManagerPolicy = "none"

MemoryManagerOff KCNRAnnotationMemoryManagerPolicy = "None"
MemoryManagerPolicyNone KCNRAnnotationMemoryManagerPolicy = "None"
)
Loading