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

feat(overcommit): add predict overcommit ratio key consts #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
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
Loading