v1alpha1

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the slo v1alpha1 API group +kubebuilder:object:generate=true +groupName=slo.koordinator.sh

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "slo.koordinator.sh", Version: "v1alpha1"}

	SchemeGroupVersion = GroupVersion

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type CPUBurstConfig added in v0.3.0

type CPUBurstConfig struct {
	Policy CPUBurstPolicy `json:"policy,omitempty"`
	// cpu burst percentage for setting cpu.cfs_burst_us, legal range: [0, 10000], default as 1000 (1000%)
	// +kubebuilder:validation:Maximum=10000
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:default=1000
	CPUBurstPercent *int64 `json:"cpuBurstPercent,omitempty"`
	// pod cfs quota scale up ceil percentage, default = 300 (300%)
	// +kubebuilder:default=300
	CFSQuotaBurstPercent *int64 `json:"cfsQuotaBurstPercent,omitempty"`
	// specifies a period of time for pod can use at burst, default = -1 (unlimited)
	// +kubebuilder:default=-1
	CFSQuotaBurstPeriodSeconds *int64 `json:"cfsQuotaBurstPeriodSeconds,omitempty"`
}

func (*CPUBurstConfig) DeepCopy added in v0.3.0

func (in *CPUBurstConfig) DeepCopy() *CPUBurstConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUBurstConfig.

func (*CPUBurstConfig) DeepCopyInto added in v0.3.0

func (in *CPUBurstConfig) DeepCopyInto(out *CPUBurstConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CPUBurstPolicy added in v0.3.0

type CPUBurstPolicy string
const (
	// CPUBurstNone disables cpu burst policy
	CPUBurstNone CPUBurstPolicy = "none"
	// CPUBurstOnly enables cpu burst policy by setting cpu.cfs_burst_us
	CPUBurstOnly CPUBurstPolicy = "cpuBurstOnly"
	// CFSQuotaBurstOnly enables cfs quota burst policy by scale up cpu.cfs_quota_us if pod throttled
	CFSQuotaBurstOnly CPUBurstPolicy = "cfsQuotaBurstOnly"
	// CPUBurstAuto enables both
	CPUBurstAuto CPUBurstPolicy = "auto"
)

type CPUBurstStrategy added in v0.3.0

type CPUBurstStrategy struct {
	CPUBurstConfig `json:",inline"`
	// scale down cfs quota if node cpu overload, default = 50
	// +kubebuilder:default=50
	SharePoolThresholdPercent *int64 `json:"sharePoolThresholdPercent,omitempty"`
}

func (*CPUBurstStrategy) DeepCopy added in v0.3.0

func (in *CPUBurstStrategy) DeepCopy() *CPUBurstStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUBurstStrategy.

func (*CPUBurstStrategy) DeepCopyInto added in v0.3.0

func (in *CPUBurstStrategy) DeepCopyInto(out *CPUBurstStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CPUQOS added in v0.6.0

type CPUQOS struct {
	// group identity value for pods, default = 0
	GroupIdentity *int64 `json:"groupIdentity,omitempty"`
}

CPUQOS enables cpu qos features.

func (*CPUQOS) DeepCopy added in v0.6.0

func (in *CPUQOS) DeepCopy() *CPUQOS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUQOS.

func (*CPUQOS) DeepCopyInto added in v0.6.0

func (in *CPUQOS) DeepCopyInto(out *CPUQOS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CPUQOSCfg added in v0.6.0

type CPUQOSCfg struct {
	// Enable indicates whether the cpu qos is enabled.
	Enable *bool `json:"enable,omitempty"`
	CPUQOS `json:",inline"`
}

CPUQOSCfg stores node-level config of cpu qos

func (*CPUQOSCfg) DeepCopy added in v0.6.0

func (in *CPUQOSCfg) DeepCopy() *CPUQOSCfg

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUQOSCfg.

func (*CPUQOSCfg) DeepCopyInto added in v0.6.0

func (in *CPUQOSCfg) DeepCopyInto(out *CPUQOSCfg)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CPUSuppressPolicy

type CPUSuppressPolicy string
const (
	CPUSetPolicy      CPUSuppressPolicy = "cpuset"
	CPUCfsQuotaPolicy CPUSuppressPolicy = "cfsQuota"
)

type ExtensionsMap added in v0.7.0

type ExtensionsMap struct {
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Object map[string]interface{} `json:",inline"`
}

ExtensionsMap if used for third-party plugins +k8s:deepcopy-gen=false

func (*ExtensionsMap) DeepCopy added in v0.7.0

func (in *ExtensionsMap) DeepCopy() *ExtensionsMap

func (*ExtensionsMap) DeepCopyInto added in v0.7.0

func (in *ExtensionsMap) DeepCopyInto(out *ExtensionsMap)

type MemoryQOS added in v0.6.0

type MemoryQOS struct {
	// memcg qos
	// If enabled, memcg qos will be set by the agent, where some fields are implicitly calculated from pod spec.
	// 1. `memory.min` := spec.requests.memory * minLimitFactor / 100 (use 0 if requests.memory is not set)
	// 2. `memory.low` := spec.requests.memory * lowLimitFactor / 100 (use 0 if requests.memory is not set)
	// 3. `memory.limit_in_bytes` := spec.limits.memory (set $node.allocatable.memory if limits.memory is not set)
	// 4. `memory.high` := memory.limit_in_bytes * throttlingFactor / 100 (use "max" if memory.high <= memory.min)
	// MinLimitPercent specifies the minLimitFactor percentage to calculate `memory.min`, which protects memory
	// from global reclamation when memory usage does not exceed the min limit.
	// Close: 0.
	// +kubebuilder:validation:Minimum=0
	MinLimitPercent *int64 `json:"minLimitPercent,omitempty"`
	// LowLimitPercent specifies the lowLimitFactor percentage to calculate `memory.low`, which TRIES BEST
	// protecting memory from global reclamation when memory usage does not exceed the low limit unless no unprotected
	// memcg can be reclaimed.
	// NOTE: `memory.low` should be larger than `memory.min`. If spec.requests.memory == spec.limits.memory,
	// pod `memory.low` and `memory.high` become invalid, while `memory.wmark_ratio` is still in effect.
	// Close: 0.
	// +kubebuilder:validation:Minimum=0
	LowLimitPercent *int64 `json:"lowLimitPercent,omitempty"`
	// ThrottlingPercent specifies the throttlingFactor percentage to calculate `memory.high` with pod
	// memory.limits or node allocatable memory, which triggers memcg direct reclamation when memory usage exceeds.
	// Lower the factor brings more heavier reclaim pressure.
	// Close: 0.
	// +kubebuilder:validation:Minimum=0
	ThrottlingPercent *int64 `json:"throttlingPercent,omitempty"`

	// wmark_ratio (Anolis OS required)
	// Async memory reclamation is triggered when cgroup memory usage exceeds `memory.wmark_high` and the reclamation
	// stops when usage is below `memory.wmark_low`. Basically,
	// `memory.wmark_high` := min(memory.high, memory.limit_in_bytes) * memory.memory.wmark_ratio
	// `memory.wmark_low` := min(memory.high, memory.limit_in_bytes) * (memory.wmark_ratio - memory.wmark_scale_factor)
	// WmarkRatio specifies `memory.wmark_ratio` that help calculate `memory.wmark_high`, which triggers async
	// memory reclamation when memory usage exceeds.
	// Close: 0. Recommended: 95.
	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=0
	WmarkRatio *int64 `json:"wmarkRatio,omitempty"`
	// WmarkScalePermill specifies `memory.wmark_scale_factor` that helps calculate `memory.wmark_low`, which
	// stops async memory reclamation when memory usage belows.
	// Close: 50. Recommended: 20.
	// +kubebuilder:validation:Maximum=1000
	// +kubebuilder:validation:Minimum=1
	WmarkScalePermill *int64 `json:"wmarkScalePermill,omitempty"`

	// wmark_min_adj (Anolis OS required)
	// WmarkMinAdj specifies `memory.wmark_min_adj` which adjusts per-memcg threshold for global memory
	// reclamation. Lower the factor brings later reclamation.
	// The adjustment uses different formula for different value range.
	// [-25, 0):global_wmark_min' = global_wmark_min + (global_wmark_min - 0) * wmarkMinAdj
	// (0, 50]:global_wmark_min' = global_wmark_min + (global_wmark_low - global_wmark_min) * wmarkMinAdj
	// Close: [LSR:0, LS:0, BE:0]. Recommended: [LSR:-25, LS:-25, BE:50].
	// +kubebuilder:validation:Maximum=50
	// +kubebuilder:validation:Minimum=-25
	WmarkMinAdj *int64 `json:"wmarkMinAdj,omitempty"`

	// TODO: enhance the usages of oom priority and oom kill group
	PriorityEnable *int64 `json:"priorityEnable,omitempty"`
	Priority       *int64 `json:"priority,omitempty"`
	OomKillGroup   *int64 `json:"oomKillGroup,omitempty"`
}

MemoryQOS enables memory qos features.

func (*MemoryQOS) DeepCopy added in v0.6.0

func (in *MemoryQOS) DeepCopy() *MemoryQOS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryQOS.

func (*MemoryQOS) DeepCopyInto added in v0.6.0

func (in *MemoryQOS) DeepCopyInto(out *MemoryQOS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MemoryQOSCfg added in v0.6.0

type MemoryQOSCfg struct {
	// Enable indicates whether the memory qos is enabled (default: false).
	// This field is used for node-level control, while pod-level configuration is done with MemoryQOS and `Policy`
	// instead of an `Enable` option. Please view the differences between MemoryQOSCfg and PodMemoryQOSConfig structs.
	Enable    *bool `json:"enable,omitempty"`
	MemoryQOS `json:",inline"`
}

MemoryQOSCfg stores node-level config of memory qos

func (*MemoryQOSCfg) DeepCopy added in v0.6.0

func (in *MemoryQOSCfg) DeepCopy() *MemoryQOSCfg

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryQOSCfg.

func (*MemoryQOSCfg) DeepCopyInto added in v0.6.0

func (in *MemoryQOSCfg) DeepCopyInto(out *MemoryQOSCfg)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMetric

type NodeMetric struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NodeMetricSpec   `json:"spec,omitempty"`
	Status NodeMetricStatus `json:"status,omitempty"`
}

NodeMetric is the Schema for the nodemetrics API

func (*NodeMetric) DeepCopy

func (in *NodeMetric) DeepCopy() *NodeMetric

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetric.

func (*NodeMetric) DeepCopyInto

func (in *NodeMetric) DeepCopyInto(out *NodeMetric)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeMetric) DeepCopyObject

func (in *NodeMetric) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeMetricCollectPolicy added in v0.4.0

type NodeMetricCollectPolicy struct {
	// AggregateDurationSeconds represents the aggregation period in seconds
	AggregateDurationSeconds *int64 `json:"aggregateDurationSeconds,omitempty"`
	// ReportIntervalSeconds represents the report period in seconds
	ReportIntervalSeconds *int64 `json:"reportIntervalSeconds,omitempty"`
}

NodeMetricCollectPolicy defines the Metric collection policy

func (*NodeMetricCollectPolicy) DeepCopy added in v0.4.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetricCollectPolicy.

func (*NodeMetricCollectPolicy) DeepCopyInto added in v0.4.0

func (in *NodeMetricCollectPolicy) DeepCopyInto(out *NodeMetricCollectPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMetricInfo

type NodeMetricInfo struct {
	NodeUsage ResourceMap `json:"nodeUsage,omitempty"`
}

func (*NodeMetricInfo) DeepCopy

func (in *NodeMetricInfo) DeepCopy() *NodeMetricInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetricInfo.

func (*NodeMetricInfo) DeepCopyInto

func (in *NodeMetricInfo) DeepCopyInto(out *NodeMetricInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMetricList

type NodeMetricList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NodeMetric `json:"items"`
}

NodeMetricList contains a list of NodeMetric

func (*NodeMetricList) DeepCopy

func (in *NodeMetricList) DeepCopy() *NodeMetricList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetricList.

func (*NodeMetricList) DeepCopyInto

func (in *NodeMetricList) DeepCopyInto(out *NodeMetricList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeMetricList) DeepCopyObject

func (in *NodeMetricList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeMetricSpec

type NodeMetricSpec struct {
	// CollectPolicy defines the Metric collection policy
	CollectPolicy *NodeMetricCollectPolicy `json:"metricCollectPolicy,omitempty"`
}

NodeMetricSpec defines the desired state of NodeMetric

func (*NodeMetricSpec) DeepCopy

func (in *NodeMetricSpec) DeepCopy() *NodeMetricSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetricSpec.

func (*NodeMetricSpec) DeepCopyInto

func (in *NodeMetricSpec) DeepCopyInto(out *NodeMetricSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMetricStatus

type NodeMetricStatus struct {
	// UpdateTime is the last time this NodeMetric was updated.
	UpdateTime *metav1.Time `json:"updateTime,omitempty"`

	// NodeMetric contains the metrics for this node.
	NodeMetric *NodeMetricInfo `json:"nodeMetric,omitempty"`

	// PodsMetric contains the metrics for pods belong to this node.
	PodsMetric []*PodMetricInfo `json:"podsMetric,omitempty"`
}

NodeMetricStatus defines the observed state of NodeMetric

func (*NodeMetricStatus) DeepCopy

func (in *NodeMetricStatus) DeepCopy() *NodeMetricStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetricStatus.

func (*NodeMetricStatus) DeepCopyInto

func (in *NodeMetricStatus) DeepCopyInto(out *NodeMetricStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeSLO

type NodeSLO struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NodeSLOSpec   `json:"spec,omitempty"`
	Status NodeSLOStatus `json:"status,omitempty"`
}

NodeSLO is the Schema for the nodeslos API

func (*NodeSLO) DeepCopy

func (in *NodeSLO) DeepCopy() *NodeSLO

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSLO.

func (*NodeSLO) DeepCopyInto

func (in *NodeSLO) DeepCopyInto(out *NodeSLO)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeSLO) DeepCopyObject

func (in *NodeSLO) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeSLOList

type NodeSLOList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NodeSLO `json:"items"`
}

NodeSLOList contains a list of NodeSLO

func (*NodeSLOList) DeepCopy

func (in *NodeSLOList) DeepCopy() *NodeSLOList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSLOList.

func (*NodeSLOList) DeepCopyInto

func (in *NodeSLOList) DeepCopyInto(out *NodeSLOList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeSLOList) DeepCopyObject

func (in *NodeSLOList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeSLOSpec

type NodeSLOSpec struct {
	// BE pods will be limited if node resource usage overload
	ResourceUsedThresholdWithBE *ResourceThresholdStrategy `json:"resourceUsedThresholdWithBE,omitempty"`
	// QoS config strategy for pods of different qos-class
	ResourceQOSStrategy *ResourceQOSStrategy `json:"resourceQOSStrategy,omitempty"`
	// CPU Burst Strategy
	CPUBurstStrategy *CPUBurstStrategy `json:"cpuBurstStrategy,omitempty"`
	// Third party extensions for NodeSLO
	Extensions *ExtensionsMap `json:"extensions,omitempty"`
}

NodeSLOSpec defines the desired state of NodeSLO

func (*NodeSLOSpec) DeepCopy

func (in *NodeSLOSpec) DeepCopy() *NodeSLOSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSLOSpec.

func (*NodeSLOSpec) DeepCopyInto

func (in *NodeSLOSpec) DeepCopyInto(out *NodeSLOSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeSLOStatus

type NodeSLOStatus struct {
}

NodeSLOStatus defines the observed state of NodeSLO

func (*NodeSLOStatus) DeepCopy

func (in *NodeSLOStatus) DeepCopy() *NodeSLOStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSLOStatus.

func (*NodeSLOStatus) DeepCopyInto

func (in *NodeSLOStatus) DeepCopyInto(out *NodeSLOStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodMemoryQOSConfig added in v0.6.0

type PodMemoryQOSConfig struct {
	// Policy indicates the qos plan; use "default" if empty
	Policy    PodMemoryQOSPolicy `json:"policy,omitempty"`
	MemoryQOS `json:",inline"`
}

func (*PodMemoryQOSConfig) DeepCopy added in v0.6.0

func (in *PodMemoryQOSConfig) DeepCopy() *PodMemoryQOSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMemoryQOSConfig.

func (*PodMemoryQOSConfig) DeepCopyInto added in v0.6.0

func (in *PodMemoryQOSConfig) DeepCopyInto(out *PodMemoryQOSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodMemoryQOSPolicy added in v0.6.0

type PodMemoryQOSPolicy string
const (
	// PodMemoryQOSPolicyDefault indicates pod inherits node-level config
	PodMemoryQOSPolicyDefault PodMemoryQOSPolicy = "default"
	// PodMemoryQOSPolicyNone indicates pod disables memory qos
	PodMemoryQOSPolicyNone PodMemoryQOSPolicy = "none"
	// PodMemoryQOSPolicyAuto indicates pod uses a recommended config
	PodMemoryQOSPolicyAuto PodMemoryQOSPolicy = "auto"
)

type PodMetricInfo

type PodMetricInfo struct {
	Name      string      `json:"name,omitempty"`
	Namespace string      `json:"namespace,omitempty"`
	PodUsage  ResourceMap `json:"podUsage,omitempty"`
}

func (*PodMetricInfo) DeepCopy

func (in *PodMetricInfo) DeepCopy() *PodMetricInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMetricInfo.

func (*PodMetricInfo) DeepCopyInto

func (in *PodMetricInfo) DeepCopyInto(out *PodMetricInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResctrlQOS added in v0.6.0

type ResctrlQOS struct {
	// LLC available range start for pods by percentage
	// +kubebuilder:default=0
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	CATRangeStartPercent *int64 `json:"catRangeStartPercent,omitempty"`
	// LLC available range end for pods by percentage
	// +kubebuilder:default=100
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	CATRangeEndPercent *int64 `json:"catRangeEndPercent,omitempty"`
	// MBA percent
	// +kubebuilder:default=100
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	MBAPercent *int64 `json:"mbaPercent,omitempty"`
}

func (*ResctrlQOS) DeepCopy added in v0.6.0

func (in *ResctrlQOS) DeepCopy() *ResctrlQOS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResctrlQOS.

func (*ResctrlQOS) DeepCopyInto added in v0.6.0

func (in *ResctrlQOS) DeepCopyInto(out *ResctrlQOS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResctrlQOSCfg added in v0.6.0

type ResctrlQOSCfg struct {
	// Enable indicates whether the resctrl qos is enabled.
	Enable     *bool `json:"enable,omitempty"`
	ResctrlQOS `json:",inline"`
}

ResctrlQOSCfg stores node-level config of resctrl qos

func (*ResctrlQOSCfg) DeepCopy added in v0.6.0

func (in *ResctrlQOSCfg) DeepCopy() *ResctrlQOSCfg

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResctrlQOSCfg.

func (*ResctrlQOSCfg) DeepCopyInto added in v0.6.0

func (in *ResctrlQOSCfg) DeepCopyInto(out *ResctrlQOSCfg)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceMap

type ResourceMap struct {
	corev1.ResourceList `json:"resources,omitempty"`
	Devices             []schedulingv1alpha1.DeviceInfo `json:"devices,omitempty"`
}

func (*ResourceMap) DeepCopy

func (in *ResourceMap) DeepCopy() *ResourceMap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMap.

func (*ResourceMap) DeepCopyInto

func (in *ResourceMap) DeepCopyInto(out *ResourceMap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceQOS added in v0.6.0

type ResourceQOS struct {
	CPUQOS     *CPUQOSCfg     `json:"cpuQOS,omitempty"`
	MemoryQOS  *MemoryQOSCfg  `json:"memoryQOS,omitempty"`
	ResctrlQOS *ResctrlQOSCfg `json:"resctrlQOS,omitempty"`
}

func (*ResourceQOS) DeepCopy added in v0.6.0

func (in *ResourceQOS) DeepCopy() *ResourceQOS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQOS.

func (*ResourceQOS) DeepCopyInto added in v0.6.0

func (in *ResourceQOS) DeepCopyInto(out *ResourceQOS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceQOSStrategy added in v0.6.0

type ResourceQOSStrategy struct {
	// ResourceQOS for LSR pods.
	LSRClass *ResourceQOS `json:"lsrClass,omitempty"`

	// ResourceQOS for LS pods.
	LSClass *ResourceQOS `json:"lsClass,omitempty"`

	// ResourceQOS for BE pods.
	BEClass *ResourceQOS `json:"beClass,omitempty"`

	// ResourceQOS for system pods
	SystemClass *ResourceQOS `json:"systemClass,omitempty"`

	// ResourceQOS for root cgroup.
	CgroupRoot *ResourceQOS `json:"cgroupRoot,omitempty"`
}

func (*ResourceQOSStrategy) DeepCopy added in v0.6.0

func (in *ResourceQOSStrategy) DeepCopy() *ResourceQOSStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQOSStrategy.

func (*ResourceQOSStrategy) DeepCopyInto added in v0.6.0

func (in *ResourceQOSStrategy) DeepCopyInto(out *ResourceQOSStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceThresholdStrategy

type ResourceThresholdStrategy struct {
	// whether the strategy is enabled, default = true
	// +kubebuilder:default=true
	Enable *bool `json:"enable,omitempty"`

	// cpu suppress threshold percentage (0,100), default = 65
	// +kubebuilder:default=65
	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=0
	CPUSuppressThresholdPercent *int64 `json:"cpuSuppressThresholdPercent,omitempty"`
	// CPUSuppressPolicy
	CPUSuppressPolicy CPUSuppressPolicy `json:"cpuSuppressPolicy,omitempty"`

	// upper: memory evict threshold percentage (0,100), default = 70
	// +kubebuilder:default=70
	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=0
	MemoryEvictThresholdPercent *int64 `json:"memoryEvictThresholdPercent,omitempty"`
	// lower: memory release util usage under MemoryEvictLowerPercent, default = MemoryEvictThresholdPercent - 2
	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=0
	MemoryEvictLowerPercent *int64 `json:"memoryEvictLowerPercent,omitempty"`

	// if be CPU RealLimit/allocatedLimit > CPUEvictBESatisfactionUpperPercent, then stop evict BE pods
	CPUEvictBESatisfactionUpperPercent *int64 `json:"cpuEvictBESatisfactionUpperPercent,omitempty"`
	// if be CPU (RealLimit/allocatedLimit < CPUEvictBESatisfactionLowerPercent and usage nearly 100%) continue CPUEvictTimeWindowSeconds,then start evict
	CPUEvictBESatisfactionLowerPercent *int64 `json:"cpuEvictBESatisfactionLowerPercent,omitempty"`
	// cpu evict start after continue avg(cpuusage) > CPUEvictThresholdPercent in seconds
	CPUEvictTimeWindowSeconds *int64 `json:"cpuEvictTimeWindowSeconds,omitempty"`
}

func (*ResourceThresholdStrategy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceThresholdStrategy.

func (*ResourceThresholdStrategy) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL