Skip to content

Commit

Permalink
add predict overcommit ratio key consts
Browse files Browse the repository at this point in the history
  • Loading branch information
WangZzzhe committed Jul 8, 2024
1 parent be552fd commit a9666d7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ spec:
spec:
description: NodeOvercommitConfigSpec is a description of a NodeOvercommitConfig
properties:
enableDynamicOvercommit:
description: enableDynamicOvercommit determines whether to use the
dynamic overcommitment automatically calculated by Katalyst as the
overcommitment actually applied to the node.
type: boolean
nodeOvercommitSelectorVal:
description: NodeOvercommitSelectorVal is the value of node label
selector with key consts.NodeOvercommitSelectorKey, it decides whether
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/config/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/apis/overcommit/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ type NodeOvercommitConfigSpec struct {
// cpu,memory are supported.
// +optional
ResourceOvercommitRatio map[v1.ResourceName]string `json:"resourceOvercommitRatio,omitempty"`

// enableDynamicOvercommit determines whether to use the dynamic overcommitment automatically calculated by Katalyst as the overcommitment actually applied to the node.
// +optional
EnableDynamicOvercommit bool `json:"enableDynamicOvercommit"`
}

type NodeOvercommitConfigStatus struct {
Expand Down
14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/consts/overcommit.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const (
NodeAnnotationMemoryOvercommitRatioKey = "katalyst.kubewharf.io/memory_overcommit_ratio"
NodeAnnotationRealtimeCPUOvercommitRatioKey = "katalyst.kubewharf.io/realtime_cpu_overcommit_ratio"
NodeAnnotationRealtimeMemoryOvercommitRatioKey = "katalyst.kubewharf.io/realtime_memory_overcommit_ratio"
NodeAnnotationPredictCPUOvercommitRatioKey = "katalyst.kubewharf.io/predict_cpu_overcommit_ratio"
NodeAnnotationPredictMemoryOvercommitRatioKey = "katalyst.kubewharf.io/predict_memory_overcommit_ratio"

NodeAnnotationOriginalCapacityCPUKey = "katalyst.kubewharf.io/original_capacity_cpu"
NodeAnnotationOriginalCapacityMemoryKey = "katalyst.kubewharf.io/original_capacity_memory"
Expand Down

0 comments on commit a9666d7

Please sign in to comment.