Skip to content

Commit

Permalink
add overcommit consts related with topology manager
Browse files Browse the repository at this point in the history
  • Loading branch information
WangZzzhe committed Mar 15, 2024
1 parent 45cdd48 commit d46cfbc
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions pkg/consts/overcommit.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ 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"
)

// const variables for matching up with node labels about overcommit
Expand All @@ -34,3 +39,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"
)

0 comments on commit d46cfbc

Please sign in to comment.