Skip to content

Commit

Permalink
Merge pull request #75 from WangZzzhe/dev/overcommit-bindcpu
Browse files Browse the repository at this point in the history
add realtime overcommit constants
  • Loading branch information
waynepeking348 authored Apr 23, 2024
2 parents 9edab1e + 75c5856 commit 1a0977f
Showing 1 changed file with 26 additions and 2 deletions.
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"
)

0 comments on commit 1a0977f

Please sign in to comment.