Skip to content
Merged
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 @@ -110,6 +110,15 @@ spec:
description: Interval is the minimum duration the objectives
got memory reclaimed by TMO
type: string
maxReclaimSize:
anyOf:
- type: integer
- type: string
description: MaxReclaimSize is a Kubernetes resource
quantity that limits the size that can be reclaimed
in one TMO cycle. Zero means unlimited.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
policyName:
description: PolicyName is used to specify the policy
for calculating memory offloading size
Expand Down Expand Up @@ -248,6 +257,15 @@ spec:
description: Interval is the minimum duration the objectives
got memory reclaimed by TMO
type: string
maxReclaimSize:
anyOf:
- type: integer
- type: string
description: MaxReclaimSize is a Kubernetes resource
quantity that limits the size that can be reclaimed
in one TMO cycle. Zero means unlimited.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
policyName:
description: PolicyName is used to specify the policy
for calculating memory offloading size
Expand Down Expand Up @@ -323,6 +341,15 @@ spec:
description: Interval is the minimum duration the objectives
got memory reclaimed by TMO
type: string
maxReclaimSize:
anyOf:
- type: integer
- type: string
description: MaxReclaimSize is a Kubernetes resource
quantity that limits the size that can be reclaimed
in one TMO cycle. Zero means unlimited.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
policyName:
description: PolicyName is used to specify the policy
for calculating memory offloading size
Expand Down
8 changes: 7 additions & 1 deletion pkg/apis/config/v1alpha1/tmo.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ limitations under the License.
package v1alpha1

import (
"github.com/kubewharf/katalyst-api/pkg/consts"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/kubewharf/katalyst-api/pkg/consts"
)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down Expand Up @@ -135,6 +137,10 @@ type TMOConfigDetail struct {
// +optional
PolicyName *TMOPolicyName `json:"policyName,omitempty"`

// MaxReclaimSize is a Kubernetes resource quantity that limits the size that can be reclaimed in one TMO cycle. Zero means unlimited.
// +optional
MaxReclaimSize *resource.Quantity `json:"maxReclaimSize,omitempty"`

Comment thread
liunxaa marked this conversation as resolved.
// PSIPolicyConf is configurations of a TMO policy which reclaim memory by PSI
// +optional
PSIPolicyConf *PSIPolicyConf `json:"psiPolicy,omitempty"`
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.