v1alpha1

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 12 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

View Source
const (
	// batch resource can be shared with other allocators such as Hadoop YARN
	// record origin batch allocatable on node for calculating the batch allocatable of K8s and YARN, e.g.
	// k8s_batch_allocatable = origin_batch_allocatable - yarn_batch_requested
	// yarn_allocatable = origin_batch_allocatable - k8s_batch_requested
	NodeOriginExtendedAllocatableAnnotationKey = "node.koordinator.sh/originExtendedAllocatable"

	// record (batch) allocations of other schedulers such as YARN, which should be excluded before updating node extended resource
	NodeThirdPartyAllocationsAnnotationKey = "node.koordinator.sh/thirdPartyAllocations"
)
View Source
const (
	AnnotationPodCPUBurst = apiext.DomainPrefix + "cpuBurst"

	AnnotationPodMemoryQoS = apiext.DomainPrefix + "memoryQOS"

	AnnotationPodBlkioQoS = apiext.DomainPrefix + "blkioQOS"
)
View Source
const (
	// LabelCoreSchedGroupID is the label key of the group ID of the Linux Core Scheduling.
	// Value can be a valid UUID or empty. If it is empty, the pod is considered to belong to a core sched group "".
	// Otherwise, the pod is set its core sched group ID according to the value.
	//
	// Core Sched: https://docs.kernel.org/admin-guide/hw-vuln/core-scheduling.html
	// When the Core Sched is enabled, pods with the different core sched group IDs will not be running at the same SMT
	// core at the same time, which means they will take different core sched cookies. If a pod sets the core sched
	// disabled, it will take the default core sched cookie (0) and will also be force-idled to run on the same SMT core
	// concurrently with the core-sched-enabled pods. In addition, the CoreExpelled configured in ResourceQOS also
	// enables the individual cookie from pods of other QoS classes via adding a suffix for the group ID. So the pods
	// of different QoS will take different cookies when their CoreExpelled status are diverse even if their group ID
	// are the same.
	LabelCoreSchedGroupID = apiext.DomainPrefix + "core-sched-group-id"

	// LabelCoreSchedPolicy is the label key that indicates the particular policy of the core scheduling.
	// It is optional and the policy is considered as the default when the label is not set.
	// It supports the following policies:
	// - "" or not set (default): If the core sched is enabled for the node, the pod is set the group ID according to
	//   the value of the LabelCoreSchedGroupID.
	// - "none": The core sched is explicitly disabled for the pod even if the node-level strategy is enabled.
	// - "exclusive": If the core sched is enabled for the node, the pod is set the group ID according to the pod UID,
	//   so that the pod is exclusive to any other pods.
	LabelCoreSchedPolicy = apiext.DomainPrefix + "core-sched-policy"
)

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 GetCoreSchedGroupID added in v1.4.0

func GetCoreSchedGroupID(labels map[string]string) string

GetCoreSchedGroupID gets the core sched group ID for the pod according to the labels.

func GetThirdPartyAllocatedResByPriority added in v1.4.0

func GetThirdPartyAllocatedResByPriority(annotations map[string]string, priority apiext.PriorityClass) (corev1.ResourceList, error)

func Resource

func Resource(resource string) schema.GroupResource

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

func SetOriginExtendedAllocatableRes added in v1.4.0

func SetOriginExtendedAllocatableRes(annotations map[string]string, extendedAllocatable corev1.ResourceList) error

func SetThirdPartyAllocation added in v1.4.0

func SetThirdPartyAllocation(annotations map[string]string, name string, priority apiext.PriorityClass,
	resource corev1.ResourceList) error

Types

type AggregatePolicy added in v1.1.0

type AggregatePolicy struct {
	Durations []metav1.Duration `json:"durations,omitempty"`
}

func (*AggregatePolicy) DeepCopy added in v1.1.0

func (in *AggregatePolicy) DeepCopy() *AggregatePolicy

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

func (*AggregatePolicy) DeepCopyInto added in v1.1.0

func (in *AggregatePolicy) DeepCopyInto(out *AggregatePolicy)

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

type AggregatedUsage added in v1.1.0

type AggregatedUsage struct {
	Usage    map[apiext.AggregationType]ResourceMap `json:"usage,omitempty"`
	Duration metav1.Duration                        `json:"duration,omitempty"`
}

func (*AggregatedUsage) DeepCopy added in v1.1.0

func (in *AggregatedUsage) DeepCopy() *AggregatedUsage

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

func (*AggregatedUsage) DeepCopyInto added in v1.1.0

func (in *AggregatedUsage) DeepCopyInto(out *AggregatedUsage)

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

type BlkIOQOS added in v1.3.0

type BlkIOQOS struct {
	Blocks []*BlockCfg `json:"blocks,omitempty"`
}

func (*BlkIOQOS) DeepCopy added in v1.3.0

func (in *BlkIOQOS) DeepCopy() *BlkIOQOS

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

func (*BlkIOQOS) DeepCopyInto added in v1.3.0

func (in *BlkIOQOS) DeepCopyInto(out *BlkIOQOS)

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

type BlkIOQOSCfg added in v1.3.0

type BlkIOQOSCfg struct {
	Enable   *bool `json:"enable,omitempty"`
	BlkIOQOS `json:",inline"`
}

func (*BlkIOQOSCfg) DeepCopy added in v1.3.0

func (in *BlkIOQOSCfg) DeepCopy() *BlkIOQOSCfg

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

func (*BlkIOQOSCfg) DeepCopyInto added in v1.3.0

func (in *BlkIOQOSCfg) DeepCopyInto(out *BlkIOQOSCfg)

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

type BlockCfg added in v1.3.0

type BlockCfg struct {
	Name      string    `json:"name,omitempty"`
	BlockType BlockType `json:"type,omitempty"`
	IOCfg     IOCfg     `json:"ioCfg,omitempty"`
}

func (*BlockCfg) DeepCopy added in v1.3.0

func (in *BlockCfg) DeepCopy() *BlockCfg

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

func (*BlockCfg) DeepCopyInto added in v1.3.0

func (in *BlockCfg) DeepCopyInto(out *BlockCfg)

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

type BlockType added in v1.3.0

type BlockType string
const (
	// Device, such as /dev/sdb
	// Only used for RootClass blk-iocost configuration
	BlockTypeDevice BlockType = "device"
	// LVM volume group
	BlockTypeVolumeGroup BlockType = "volumegroup"
	// Pod volume
	BlockTypePodVolume BlockType = "podvolume"
)

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
	CPUBurstPercent *int64 `json:"cpuBurstPercent,omitempty" validate:"omitempty,min=1,max=10000"`
	// pod cfs quota scale up ceil percentage, default = 300 (300%)
	CFSQuotaBurstPercent *int64 `json:"cfsQuotaBurstPercent,omitempty" validate:"omitempty,min=100"`
	// specifies a period of time for pod can use at burst, default = -1 (unlimited)
	CFSQuotaBurstPeriodSeconds *int64 `json:"cfsQuotaBurstPeriodSeconds,omitempty" validate:"omitempty,min=-1"`
}

func GetPodCPUBurstConfig added in v1.3.0

func GetPodCPUBurstConfig(pod *corev1.Pod) (*CPUBurstConfig, error)

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
	SharePoolThresholdPercent *int64 `json:"sharePoolThresholdPercent,omitempty" validate:"omitempty,min=0,max=100"`
}

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 CPUEvictPolicy added in v1.4.0

type CPUEvictPolicy string
const (
	EvictByRealLimitPolicy   CPUEvictPolicy = "evictByRealLimit"
	EvictByAllocatablePolicy CPUEvictPolicy = "evictByAllocatable"
)

type CPUQOS added in v0.6.0

type CPUQOS struct {
	// group identity value for pods, default = 0
	// NOTE: It takes effect if cpuPolicy = "groupIdentity".
	GroupIdentity *int64 `json:"groupIdentity,omitempty" validate:"omitempty,min=-1,max=2"`
	// cpu.idle value for pods, default = 0.
	// `1` means using SCHED_IDLE.
	// CGroup Idle (introduced since mainline Linux 5.15): https://lore.kernel.org/lkml/162971078674.25758.15464079371945307825.tip-bot2@tip-bot2/#r
	// NOTE: It takes effect if cpuPolicy = "coreSched".
	SchedIdle *int64 `json:"schedIdle,omitempty" validate:"omitempty,min=0,max=1"`
	// whether pods of the QoS class can expel the cgroup idle pods at the SMT-level. default = false
	// If set to true, pods of this QoS will use a dedicated core sched group for noise clean with the SchedIdle pods.
	// NOTE: It takes effect if cpuPolicy = "coreSched".
	CoreExpeller *bool `json:"coreExpeller,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 CPUQOSPolicy added in v1.4.0

type CPUQOSPolicy string
const (
	// CPUQOSPolicyGroupIdentity indicates the Group Identity is applied to ensure the CPU QoS.
	CPUQOSPolicyGroupIdentity CPUQOSPolicy = "groupIdentity"
	// CPUQOSPolicyCoreSched indicates the Linux Core Scheduling and CGroup Idle is applied to ensure the CPU QoS.
	CPUQOSPolicyCoreSched CPUQOSPolicy = "coreSched"
)

type CPUSuppressPolicy

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

type CgroupBaseType added in v1.4.0

type CgroupBaseType string

CgroupBaseType defines the cgroup base dir for HostCgroup

const (
	// CgroupBaseTypeRoot is the root dir of cgroup fs on node, e.g. /sys/fs/cgroup/cpu/
	CgroupBaseTypeRoot CgroupBaseType = "CgroupRoot"
	// CgroupBaseTypeRoot is the cgroup dir for k8s pods, e.g. /sys/fs/cgroup/cpu/kubepods/
	CgroupBaseTypeKubepods CgroupBaseType = "Kubepods"
	// CgroupBaseTypeRoot is the cgroup dir for k8s burstable pods, e.g. /sys/fs/cgroup/cpu/kubepods/burstable/
	CgroupBaseTypeKubeBurstable CgroupBaseType = "KubepodsBurstable"
	// CgroupBaseTypeRoot is the cgroup dir for k8s besteffort pods, e.g. /sys/fs/cgroup/cpu/kubepods/besteffort/
	CgroupBaseTypeKubeBesteffort CgroupBaseType = "KubepodsBesteffort"
)

type CgroupPath added in v1.4.0

type CgroupPath struct {
	// cgroup base dir, the format is various across cgroup drivers
	Base CgroupBaseType `json:"base,omitempty"`
	// cgroup parent path under base dir
	ParentDir string `json:"parentDir,omitempty"`
	// cgroup relative path under parent dir
	RelativePath string `json:"relativePath,omitempty"`
}

CgroupPath decribes the cgroup path for out-of-band applications

func (*CgroupPath) DeepCopy added in v1.4.0

func (in *CgroupPath) DeepCopy() *CgroupPath

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

func (*CgroupPath) DeepCopyInto added in v1.4.0

func (in *CgroupPath) DeepCopyInto(out *CgroupPath)

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

type CoreSchedPolicy added in v1.4.1

type CoreSchedPolicy string
const (
	// CoreSchedPolicyDefault is the default policy of the core scheduling which indicates the core sched group ID
	// is set according to the value of the LabelCoreSchedGroupID.
	CoreSchedPolicyDefault CoreSchedPolicy = ""
	// CoreSchedPolicyNone is the none policy of the core scheduling which indicates the core sched is disabled for
	// the pod. The pod will be reset to the system-default cookie `0`.
	CoreSchedPolicyNone CoreSchedPolicy = "none"
	// CoreSchedPolicyExclusive is the exclusive policy of the core scheduling which indicates the core sched group ID
	// is set the same as the pod's UID
	CoreSchedPolicyExclusive CoreSchedPolicy = "exclusive"
)

func GetCoreSchedPolicy added in v1.4.1

func GetCoreSchedPolicy(labels map[string]string) CoreSchedPolicy

GetCoreSchedPolicy gets the core sched policy for the pod according to the labels.

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 HostApplicationMetricInfo added in v1.4.0

type HostApplicationMetricInfo struct {
	// Name of the host application
	Name string `json:"name,omitempty"`
	// Resource usage of the host application
	Usage ResourceMap `json:"usage,omitempty"`
	// Priority class of the application
	Priority apiext.PriorityClass `json:"priority,omitempty"`
	// QoS class of the application
	QoS apiext.QoSClass `json:"qos,omitempty"`
}

func (*HostApplicationMetricInfo) DeepCopy added in v1.4.0

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

func (*HostApplicationMetricInfo) DeepCopyInto added in v1.4.0

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

type HostApplicationSpec added in v1.4.0

type HostApplicationSpec struct {
	Name string `json:"name,omitempty"`
	// Priority class of the application
	Priority extension.PriorityClass `json:"priority,omitempty"`
	// QoS class of the application
	QoS extension.QoSClass `json:"qos,omitempty"`
	// Optional, defines the host cgroup configuration, use default if not specified according to priority and qos
	CgroupPath *CgroupPath `json:"cgroupPath,omitempty"`
	// QoS Strategy of host application
	Strategy *HostApplicationStrategy `json:"strategy,omitempty"`
}

HostApplicationSpec describes the QoS management for out-out-band applications on node

func (*HostApplicationSpec) DeepCopy added in v1.4.0

func (in *HostApplicationSpec) DeepCopy() *HostApplicationSpec

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

func (*HostApplicationSpec) DeepCopyInto added in v1.4.0

func (in *HostApplicationSpec) DeepCopyInto(out *HostApplicationSpec)

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

type HostApplicationStrategy added in v1.4.0

type HostApplicationStrategy struct {
}

func (*HostApplicationStrategy) DeepCopy added in v1.4.0

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

func (*HostApplicationStrategy) DeepCopyInto added in v1.4.0

func (in *HostApplicationStrategy) DeepCopyInto(out *HostApplicationStrategy)

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

type IOCfg added in v1.3.0

type IOCfg struct {
	// Throttling of IOPS
	// The value is set to 0, which indicates that the feature is disabled.
	// +kubebuilder:validation:Minimum=0
	ReadIOPS *int64 `json:"readIOPS,omitempty"`
	// +kubebuilder:validation:Minimum=0
	WriteIOPS *int64 `json:"writeIOPS,omitempty"`
	// Throttling of throughput
	// The value is set to 0, which indicates that the feature is disabled.
	// +kubebuilder:validation:Minimum=0
	ReadBPS *int64 `json:"readBPS,omitempty"`
	// +kubebuilder:validation:Minimum=0
	WriteBPS *int64 `json:"writeBPS,omitempty"`
	// This field is used to set the weight of a sub-group. Default value: 100. Valid values: 1 to 100.
	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=1
	IOWeightPercent *int64 `json:"ioWeightPercent,omitempty"`
	// Configure the weight-based throttling feature of blk-iocost
	// Only used for RootClass
	// After blk-iocost is enabled, the kernel calculates the proportion of requests that exceed the read or write latency threshold out of all requests. When the proportion is greater than the read or write latency percentile (95%), the kernel considers the disk to be saturated and reduces the rate at which requests are sent to the disk.
	// the read latency threshold. Unit: microseconds.
	ReadLatency *int64 `json:"readLatency,omitempty"`
	// the write latency threshold. Unit: microseconds.
	WriteLatency *int64 `json:"writeLatency,omitempty"`
}

func (*IOCfg) DeepCopy added in v1.3.0

func (in *IOCfg) DeepCopy() *IOCfg

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

func (*IOCfg) DeepCopyInto added in v1.3.0

func (in *IOCfg) DeepCopyInto(out *IOCfg)

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

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` := floor[(spec.requests.memory + throttlingFactor / 100 * (memory.limit_in_bytes or node allocatable memory - spec.requests.memory))/pageSize] * pageSize
	// 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" validate:"omitempty,min=0,max=100"`
	// 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" validate:"omitempty,min=0,max=100"`
	// 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" validate:"omitempty,min=0,max=100"`

	// 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" validate:"omitempty,min=0,max=100"`
	// 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" validate:"omitempty,min=1,max=1000"`

	// 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" validate:"omitempty,min=-25,max=50"`

	// TODO: enhance the usages of oom priority and oom kill group
	PriorityEnable *int64 `json:"priorityEnable,omitempty" validate:"omitempty,min=0,max=1"`
	Priority       *int64 `json:"priority,omitempty" validate:"omitempty,min=0,max=12"`
	OomKillGroup   *int64 `json:"oomKillGroup,omitempty" validate:"omitempty,min=0,max=1"`
}

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 NetworkQOS added in v1.4.1

type NetworkQOS struct {
	// IngressRequest describes the minimum network bandwidth guaranteed in the ingress direction.
	// unit: bps(bytes per second), two expressions are supported,int and string,
	// int: percentage based on total bandwidth,valid in 0-100
	// string: a specific network bandwidth value, eg: 50M.
	// +kubebuilder:default=0
	IngressRequest *intstr.IntOrString `json:"ingressRequest,omitempty"`
	// IngressLimit describes the maximum network bandwidth can be used in the ingress direction,
	// unit: bps(bytes per second), two expressions are supported,int and string,
	// int: percentage based on total bandwidth,valid in 0-100
	// string: a specific network bandwidth value, eg: 50M.
	// +kubebuilder:default=100
	IngressLimit *intstr.IntOrString `json:"ingressLimit,omitempty"`

	// EgressRequest describes the minimum network bandwidth guaranteed in the egress direction.
	// unit: bps(bytes per second), two expressions are supported,int and string,
	// int: percentage based on total bandwidth,valid in 0-100
	// string: a specific network bandwidth value, eg: 50M.
	// +kubebuilder:default=0
	EgressRequest *intstr.IntOrString `json:"egressRequest,omitempty"`
	// EgressLimit describes the maximum network bandwidth can be used in the egress direction,
	// unit: bps(bytes per second), two expressions are supported,int and string,
	// int: percentage based on total bandwidth,valid in 0-100
	// string: a specific network bandwidth value, eg: 50M.
	// +kubebuilder:default=100
	EgressLimit *intstr.IntOrString `json:"egressLimit,omitempty"`
}

func (*NetworkQOS) DeepCopy added in v1.4.1

func (in *NetworkQOS) DeepCopy() *NetworkQOS

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

func (*NetworkQOS) DeepCopyInto added in v1.4.1

func (in *NetworkQOS) DeepCopyInto(out *NetworkQOS)

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

type NetworkQOSCfg added in v1.4.1

type NetworkQOSCfg struct {
	Enable     *bool `json:"enable,omitempty"`
	NetworkQOS `json:",inline"`
}

func (*NetworkQOSCfg) DeepCopy added in v1.4.1

func (in *NetworkQOSCfg) DeepCopy() *NetworkQOSCfg

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

func (*NetworkQOSCfg) DeepCopyInto added in v1.4.1

func (in *NetworkQOSCfg) DeepCopyInto(out *NetworkQOSCfg)

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

type NodeMemoryCollectPolicy added in v1.4.0

type NodeMemoryCollectPolicy string

default NodeMemoryCollectPolicy is usageWithoutPageCache +kubebuilder:validation:Enum=usageWithHotPageCache;usageWithoutPageCache;usageWithPageCache

const (
	UsageWithoutPageCache NodeMemoryCollectPolicy = "usageWithoutPageCache"
	UsageWithHotPageCache NodeMemoryCollectPolicy = "usageWithHotPageCache"
	// TODO(BUPT-wxq): implement the UsageWithPageCache policy
	UsageWithPageCache NodeMemoryCollectPolicy = "usageWithPageCache"
)

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"`
	// NodeAggregatePolicy represents the target grain of node aggregated usage
	NodeAggregatePolicy *AggregatePolicy `json:"nodeAggregatePolicy,omitempty"`
	// NodeMemoryPolicy represents apply which method collect memory info
	NodeMemoryCollectPolicy *NodeMemoryCollectPolicy `json:"nodeMemoryCollectPolicy,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 is the total resource usage of node
	NodeUsage ResourceMap `json:"nodeUsage,omitempty"`
	// AggregatedNodeUsages will report only if there are enough samples
	AggregatedNodeUsages []AggregatedUsage `json:"aggregatedNodeUsages,omitempty"`
	// SystemUsage is the resource usage of daemon processes and OS kernel, calculated by `NodeUsage - sum(podUsage)`
	SystemUsage ResourceMap `json:"systemUsage,omitempty"`
	// AggregatedSystemUsages will report only if there are enough samples
	// Deleted pods will be excluded during aggregation
	AggregatedSystemUsages []AggregatedUsage `json:"aggregatedSystemUsages,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"`

	// HostApplicationMetric contains the metrics of out-out-band applications on node.
	HostApplicationMetric []*HostApplicationMetricInfo `json:"hostApplicationMetric,omitempty"`

	// ProdReclaimableMetric is the indicator statistics of Prod type resources reclaimable
	ProdReclaimableMetric *ReclaimableMetric `json:"prodReclaimableMetric,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"`
	//node global system config
	SystemStrategy *SystemStrategy `json:"systemStrategy,omitempty"`
	// Third party extensions for NodeSLO
	Extensions *ExtensionsMap `json:"extensions,omitempty"`
	// QoS management for out-of-band applications
	HostApplications []HostApplicationSpec `json:"hostApplications,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 OriginAllocatable added in v1.4.0

type OriginAllocatable struct {
	Resources corev1.ResourceList `json:"resources,omitempty"`
}

func GetOriginExtendedAllocatable added in v1.4.0

func GetOriginExtendedAllocatable(annotations map[string]string) (*OriginAllocatable, error)

func (*OriginAllocatable) DeepCopy added in v1.4.0

func (in *OriginAllocatable) DeepCopy() *OriginAllocatable

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

func (*OriginAllocatable) DeepCopyInto added in v1.4.0

func (in *OriginAllocatable) DeepCopyInto(out *OriginAllocatable)

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 GetPodMemoryQoSConfig added in v1.3.0

func GetPodMemoryQoSConfig(pod *corev1.Pod) (*PodMemoryQOSConfig, error)

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"`
	// Priority class of the application
	Priority apiext.PriorityClass `json:"priority,omitempty"`
	// QoS class of the application
	QoS apiext.QoSClass `json:"qos,omitempty"`
	// Third party extensions for PodMetric
	Extensions *ExtensionsMap `json:"extensions,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 ReclaimableMetric added in v1.3.0

type ReclaimableMetric struct {
	// Resource is the resource usage of the prediction
	Resource ResourceMap `json:"resource,omitempty"`
}

ReclaimableMetric defines the reclaimable metric of resource priority

func (*ReclaimableMetric) DeepCopy added in v1.3.0

func (in *ReclaimableMetric) DeepCopy() *ReclaimableMetric

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

func (*ReclaimableMetric) DeepCopyInto added in v1.3.0

func (in *ReclaimableMetric) DeepCopyInto(out *ReclaimableMetric)

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:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	CATRangeStartPercent *int64 `json:"catRangeStartPercent,omitempty" validate:"omitempty,min=0,max=100,ltfield=CATRangeEndPercent"`
	// LLC available range end for pods by percentage
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	CATRangeEndPercent *int64 `json:"catRangeEndPercent,omitempty" validate:"omitempty,min=0,max=100,gtfield=CATRangeStartPercent"`
	// MBA percent
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	MBAPercent *int64 `json:"mbaPercent,omitempty" validate:"omitempty,min=0,max=100"`
}

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"`
	BlkIOQOS   *BlkIOQOSCfg   `json:"blkioQOS,omitempty"`
	ResctrlQOS *ResctrlQOSCfg `json:"resctrlQOS,omitempty"`
	NetworkQOS *NetworkQOSCfg `json:"networkQOS,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 ResourceQOSPolicies added in v1.4.0

type ResourceQOSPolicies struct {
	// applied policy for the CPU QoS, default = "groupIdentity"
	CPUPolicy *CPUQOSPolicy `json:"cpuPolicy,omitempty"`
}

func (*ResourceQOSPolicies) DeepCopy added in v1.4.0

func (in *ResourceQOSPolicies) DeepCopy() *ResourceQOSPolicies

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

func (*ResourceQOSPolicies) DeepCopyInto added in v1.4.0

func (in *ResourceQOSPolicies) DeepCopyInto(out *ResourceQOSPolicies)

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 {
	// Policies of pod QoS.
	Policies *ResourceQOSPolicies `json:"policies,omitempty"`

	// 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 = false
	Enable *bool `json:"enable,omitempty"`

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

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

	// be.satisfactionRate = be.CPURealLimit/be.CPURequest
	// if be.satisfactionRate > CPUEvictBESatisfactionUpperPercent/100, then stop to evict.
	CPUEvictBESatisfactionUpperPercent *int64 `` /* 129-byte string literal not displayed */
	// be.satisfactionRate = be.CPURealLimit/be.CPURequest; be.cpuUsage = be.CPUUsed/be.CPURealLimit
	// if be.satisfactionRate < CPUEvictBESatisfactionLowerPercent/100 && be.usage >= CPUEvictBEUsageThresholdPercent/100,
	// then start to evict pod, and will evict to ${CPUEvictBESatisfactionUpperPercent}
	CPUEvictBESatisfactionLowerPercent *int64 `` /* 129-byte string literal not displayed */
	// if be.cpuUsage >= CPUEvictBEUsageThresholdPercent/100, then start to calculate the resources need to be released.
	CPUEvictBEUsageThresholdPercent *int64 `json:"cpuEvictBEUsageThresholdPercent,omitempty" validate:"omitempty,min=0,max=100"`
	// when avg(cpuusage) > CPUEvictThresholdPercent, will start to evict pod by cpu,
	// and avg(cpuusage) is calculated based on the most recent CPUEvictTimeWindowSeconds data
	CPUEvictTimeWindowSeconds *int64 `json:"cpuEvictTimeWindowSeconds,omitempty" validate:"omitempty,gt=0"`
	// CPUEvictPolicy defines the policy for the BECPUEvict feature.
	// Default: `evictByRealLimit`.
	CPUEvictPolicy CPUEvictPolicy `json:"cpuEvictPolicy,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.

type SystemStrategy added in v1.2.0

type SystemStrategy struct {
	// for /proc/sys/vm/min_free_kbytes, min_free_kbytes = minFreeKbytesFactor * nodeTotalMemory /10000
	MinFreeKbytesFactor *int64 `json:"minFreeKbytesFactor,omitempty" validate:"omitempty,gt=0"`
	// /proc/sys/vm/watermark_scale_factor
	WatermarkScaleFactor *int64 `json:"watermarkScaleFactor,omitempty" validate:"omitempty,gt=0,max=400"`
	// /sys/kernel/mm/memcg_reaper/reap_background
	MemcgReapBackGround *int64 `json:"memcgReapBackGround,omitempty" validate:"omitempty,min=0,max=1"`

	// TotalNetworkBandwidth indicates the overall network bandwidth, cluster manager can set this field, and default value taken from /sys/class/net/${NIC_NAME}/speed, unit: Mbps
	TotalNetworkBandwidth resource.Quantity `json:"totalNetworkBandwidth,omitempty"`
}

func (*SystemStrategy) DeepCopy added in v1.2.0

func (in *SystemStrategy) DeepCopy() *SystemStrategy

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

func (*SystemStrategy) DeepCopyInto added in v1.2.0

func (in *SystemStrategy) DeepCopyInto(out *SystemStrategy)

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

type ThirdPartyAllocation added in v1.4.0

type ThirdPartyAllocation struct {
	Name      string               `json:"name"`
	Priority  apiext.PriorityClass `json:"priority"`
	Resources corev1.ResourceList  `json:"resources,omitempty"`
}

func (*ThirdPartyAllocation) DeepCopy added in v1.4.0

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

func (*ThirdPartyAllocation) DeepCopyInto added in v1.4.0

func (in *ThirdPartyAllocation) DeepCopyInto(out *ThirdPartyAllocation)

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

type ThirdPartyAllocations added in v1.4.0

type ThirdPartyAllocations struct {
	Allocations []ThirdPartyAllocation `json:"allocations,omitempty"`
}

func GetThirdPartyAllocations added in v1.4.0

func GetThirdPartyAllocations(annotations map[string]string) (*ThirdPartyAllocations, error)

func (*ThirdPartyAllocations) DeepCopy added in v1.4.0

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

func (*ThirdPartyAllocations) DeepCopyInto added in v1.4.0

func (in *ThirdPartyAllocations) DeepCopyInto(out *ThirdPartyAllocations)

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