Documentation ¶
Index ¶
- Constants
- type CPUBurstCfg
- type CPUNormalizationCfg
- type CPUNormalizationStrategy
- type CalculatePolicy
- type ColocationCfg
- type ColocationStrategy
- type ColocationStrategyExtender
- type ExtensionCfg
- type ExtensionCfgMap
- type ExtraFields
- type HostApplicationCfg
- type ModelRatioCfg
- type NodeCPUBurstCfg
- type NodeCPUNormalizationCfg
- type NodeCfgProfile
- type NodeColocationCfg
- type NodeExtensionStrategy
- type NodeHostApplicationCfg
- type NodeResourceQOSStrategy
- type NodeResourceThresholdStrategy
- type NodeSystemStrategy
- type ResourceQOSCfg
- type ResourceThresholdCfg
- type SystemCfg
Constants ¶
const ( // keys in the configmap ColocationConfigKey = "colocation-config" ResourceThresholdConfigKey = "resource-threshold-config" ResourceQOSConfigKey = "resource-qos-config" CPUBurstConfigKey = "cpu-burst-config" SystemConfigKey = "system-config" HostApplicationConfigKey = "host-application-config" CPUNormalizationConfigKey = "cpu-normalization-config" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUBurstCfg ¶
type CPUBurstCfg struct { ClusterStrategy *slov1alpha1.CPUBurstStrategy `json:"clusterStrategy,omitempty"` NodeStrategies []NodeCPUBurstCfg `json:"nodeStrategies,omitempty" validate:"dive"` }
+k8s:deepcopy-gen=true
func (*CPUBurstCfg) DeepCopy ¶
func (in *CPUBurstCfg) DeepCopy() *CPUBurstCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUBurstCfg.
func (*CPUBurstCfg) DeepCopyInto ¶
func (in *CPUBurstCfg) DeepCopyInto(out *CPUBurstCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CPUNormalizationCfg ¶ added in v1.4.0
type CPUNormalizationCfg struct { CPUNormalizationStrategy `json:",inline"` NodeConfigs []NodeCPUNormalizationCfg `json:"nodeConfigs,omitempty" validate:"dive"` }
CPUNormalizationCfg is the cluster-level configuration of the CPU normalization strategy. +k8s:deepcopy-gen=true
func (*CPUNormalizationCfg) DeepCopy ¶ added in v1.4.0
func (in *CPUNormalizationCfg) DeepCopy() *CPUNormalizationCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUNormalizationCfg.
func (*CPUNormalizationCfg) DeepCopyInto ¶ added in v1.4.0
func (in *CPUNormalizationCfg) DeepCopyInto(out *CPUNormalizationCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CPUNormalizationStrategy ¶ added in v1.4.0
type CPUNormalizationStrategy struct { // Enable defines whether the cpu normalization is enabled. // If set to false, the node cpu normalization ratio will be removed. Enable *bool `json:"enable,omitempty"` // RatioModel defines the cpu normalization ratio of each CPU model. // It maps the CPUModel of BasicInfo into the ratios. RatioModel map[string]ModelRatioCfg `json:"ratioModel,omitempty"` }
CPUNormalizationStrategy is the CPU normalization strategy. +k8s:deepcopy-gen=true
func (*CPUNormalizationStrategy) DeepCopy ¶ added in v1.4.0
func (in *CPUNormalizationStrategy) DeepCopy() *CPUNormalizationStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUNormalizationStrategy.
func (*CPUNormalizationStrategy) DeepCopyInto ¶ added in v1.4.0
func (in *CPUNormalizationStrategy) DeepCopyInto(out *CPUNormalizationStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CalculatePolicy ¶
type CalculatePolicy string
CalculatePolicy defines the calculate policy for resource overcommitment. Default is "usage".
const ( // CalculateByPodUsage is the calculate policy according to the pod resource usage. // When the policy="usage", the low-priority (LP) resources are calculated according to the high-priority (HP) pods' // usages, so LP pod can reclaim the requested but unused resources of the HP pods. // It is the default policy where the resources are over-committed between priority bands. CalculateByPodUsage CalculatePolicy = "usage" // CalculateByPodRequest is the calculate policy according to the pod resource request. // When the policy="request", the low-priority (LP) resources are calculated according to the high-priority (HP) // pods' requests, so LP pod can allocate the unallocated resources of the HP pods but can NOT reclaim the // requested but unused resources of the HP pods. // It is the policy where the resources are NOT over-committed between priority bands. CalculateByPodRequest CalculatePolicy = "request" // CalculateByPodMaxUsageRequest is the calculate policy according to the maximum of the pod usage and request. // When the policy="maxUsageRequest", the low-priority (LP) resources are calculated according to the sum of the // high-priority (HP) pods' maximum of its usage and its request, so LP pod can allocate the resources both // unallocated and unused by the HP pods. // It is the conservative policy where the resources are NOT over-committed between priority bands while HP's usage // is also protected from the overcommitment. CalculateByPodMaxUsageRequest CalculatePolicy = "maxUsageRequest" )
type ColocationCfg ¶
type ColocationCfg struct { ColocationStrategy `json:",inline"` NodeConfigs []NodeColocationCfg `json:"nodeConfigs,omitempty" validate:"dive"` }
+k8s:deepcopy-gen=true
func (*ColocationCfg) DeepCopy ¶
func (in *ColocationCfg) DeepCopy() *ColocationCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ColocationCfg.
func (*ColocationCfg) DeepCopyInto ¶
func (in *ColocationCfg) DeepCopyInto(out *ColocationCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ColocationStrategy ¶
type ColocationStrategy struct { Enable *bool `json:"enable,omitempty"` MetricAggregateDurationSeconds *int64 `json:"metricAggregateDurationSeconds,omitempty" validate:"omitempty,min=1"` MetricReportIntervalSeconds *int64 `json:"metricReportIntervalSeconds,omitempty" validate:"omitempty,min=1"` MetricAggregatePolicy *slov1alpha1.AggregatePolicy `json:"metricAggregatePolicy,omitempty"` MetricMemoryCollectPolicy *slov1alpha1.NodeMemoryCollectPolicy `json:"metricMemoryCollectPolicy,omitempty"` CPUReclaimThresholdPercent *int64 `json:"cpuReclaimThresholdPercent,omitempty" validate:"omitempty,min=0,max=100"` // CPUCalculatePolicy determines the calculation policy of the CPU resources for the Batch pods. // Supported: "usage" (default), "maxUsageRequest". CPUCalculatePolicy *CalculatePolicy `json:"cpuCalculatePolicy,omitempty"` MemoryReclaimThresholdPercent *int64 `json:"memoryReclaimThresholdPercent,omitempty" validate:"omitempty,min=0,max=100"` // MemoryCalculatePolicy determines the calculation policy of the memory resources for the Batch pods. // Supported: "usage" (default), "request", "maxUsageRequest". MemoryCalculatePolicy *CalculatePolicy `json:"memoryCalculatePolicy,omitempty"` DegradeTimeMinutes *int64 `json:"degradeTimeMinutes,omitempty" validate:"omitempty,min=1"` UpdateTimeThresholdSeconds *int64 `json:"updateTimeThresholdSeconds,omitempty" validate:"omitempty,min=1"` ResourceDiffThreshold *float64 `json:"resourceDiffThreshold,omitempty" validate:"omitempty,gt=0,max=1"` // MidCPUThresholdPercent defines the maximum percentage of the Mid-tier cpu resource dividing the node allocatable. // MidCPUAllocatable <= NodeCPUAllocatable * MidCPUThresholdPercent / 100. MidCPUThresholdPercent *int64 `json:"midCPUThresholdPercent,omitempty" validate:"omitempty,min=0,max=100"` // MidMemoryThresholdPercent defines the maximum percentage of the Mid-tier memory resource dividing the node allocatable. // MidMemoryAllocatable <= NodeMemoryAllocatable * MidMemoryThresholdPercent / 100. MidMemoryThresholdPercent *int64 `json:"midMemoryThresholdPercent,omitempty" validate:"omitempty,min=0,max=100"` ColocationStrategyExtender `json:",inline"` // for third-party extension }
ColocationStrategy defines the strategy for node colocation. +k8s:deepcopy-gen=true
func (*ColocationStrategy) DeepCopy ¶
func (in *ColocationStrategy) DeepCopy() *ColocationStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ColocationStrategy.
func (*ColocationStrategy) DeepCopyInto ¶
func (in *ColocationStrategy) DeepCopyInto(out *ColocationStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ColocationStrategyExtender ¶
type ColocationStrategyExtender struct {
Extensions ExtraFields `json:"extensions,omitempty"`
}
+k8s:deepcopy-gen=true
func (*ColocationStrategyExtender) DeepCopy ¶
func (in *ColocationStrategyExtender) DeepCopy() *ColocationStrategyExtender
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ColocationStrategyExtender.
func (*ColocationStrategyExtender) DeepCopyInto ¶
func (in *ColocationStrategyExtender) DeepCopyInto(out *ColocationStrategyExtender)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExtensionCfg ¶
type ExtensionCfg struct { ClusterStrategy interface{} `json:"clusterStrategy,omitempty"` NodeStrategies []NodeExtensionStrategy `json:"nodeStrategies,omitempty"` }
+k8s:deepcopy-gen=false
func (*ExtensionCfg) DeepCopy ¶
func (in *ExtensionCfg) DeepCopy() *ExtensionCfg
func (*ExtensionCfg) DeepCopyInto ¶
func (in *ExtensionCfg) DeepCopyInto(out *ExtensionCfg)
type ExtensionCfgMap ¶
type ExtensionCfgMap struct {
Object map[string]ExtensionCfg `json:",inline"`
}
+k8s:deepcopy-gen=true
func (*ExtensionCfgMap) DeepCopy ¶
func (in *ExtensionCfgMap) DeepCopy() *ExtensionCfgMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionCfgMap.
func (*ExtensionCfgMap) DeepCopyInto ¶
func (in *ExtensionCfgMap) DeepCopyInto(out *ExtensionCfgMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExtraFields ¶
type ExtraFields map[string]interface{}
+k8s:deepcopy-gen=false
func (*ExtraFields) DeepCopy ¶
func (in *ExtraFields) DeepCopy() *ExtraFields
func (*ExtraFields) DeepCopyInto ¶
func (in *ExtraFields) DeepCopyInto(out *ExtraFields)
type HostApplicationCfg ¶ added in v1.4.0
type HostApplicationCfg struct { Applications []slov1alpha1.HostApplicationSpec `json:"applications,omitempty"` NodeConfigs []NodeHostApplicationCfg `json:"nodeConfigs,omitempty"` }
+k8s:deepcopy-gen=true
func (*HostApplicationCfg) DeepCopy ¶ added in v1.4.0
func (in *HostApplicationCfg) DeepCopy() *HostApplicationCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostApplicationCfg.
func (*HostApplicationCfg) DeepCopyInto ¶ added in v1.4.0
func (in *HostApplicationCfg) DeepCopyInto(out *HostApplicationCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelRatioCfg ¶ added in v1.4.0
type ModelRatioCfg struct { // BaseRatio defines the ratio of which the CPU neither enables Hyper Thread, nor the Turbo. BaseRatio *float64 `json:"baseRatio,omitempty"` // HyperThreadEnabledRatio defines the ratio of which the CPU enables the Hyper Thread. HyperThreadEnabledRatio *float64 `json:"hyperThreadEnabledRatio,omitempty"` // TurboEnabledRatio defines the ratio of which the CPU enables the Turbo. TurboEnabledRatio *float64 `json:"turboEnabledRatio,omitempty"` // HyperThreadTurboEnabledRatio defines the ratio of which the CPU enables the Hyper Thread and Turbo. HyperThreadTurboEnabledRatio *float64 `json:"hyperThreadTurboEnabledRatio,omitempty"` }
ModelRatioCfg defines the cpu normalization ratio of a CPU model. +k8s:deepcopy-gen=true
func (*ModelRatioCfg) DeepCopy ¶ added in v1.4.0
func (in *ModelRatioCfg) DeepCopy() *ModelRatioCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelRatioCfg.
func (*ModelRatioCfg) DeepCopyInto ¶ added in v1.4.0
func (in *ModelRatioCfg) DeepCopyInto(out *ModelRatioCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeCPUBurstCfg ¶
type NodeCPUBurstCfg struct { NodeCfgProfile `json:",inline"` *slov1alpha1.CPUBurstStrategy }
+k8s:deepcopy-gen=true
func (*NodeCPUBurstCfg) DeepCopy ¶
func (in *NodeCPUBurstCfg) DeepCopy() *NodeCPUBurstCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCPUBurstCfg.
func (*NodeCPUBurstCfg) DeepCopyInto ¶
func (in *NodeCPUBurstCfg) DeepCopyInto(out *NodeCPUBurstCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeCPUNormalizationCfg ¶ added in v1.4.0
type NodeCPUNormalizationCfg struct { NodeCfgProfile `json:",inline"` CPUNormalizationStrategy }
NodeCPUNormalizationCfg is the node-level configuration of the CPU normalization strategy. +k8s:deepcopy-gen=true
func (*NodeCPUNormalizationCfg) DeepCopy ¶ added in v1.4.0
func (in *NodeCPUNormalizationCfg) DeepCopy() *NodeCPUNormalizationCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCPUNormalizationCfg.
func (*NodeCPUNormalizationCfg) DeepCopyInto ¶ added in v1.4.0
func (in *NodeCPUNormalizationCfg) DeepCopyInto(out *NodeCPUNormalizationCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeCfgProfile ¶
type NodeCfgProfile struct { // like ID for different nodeSelector; it's useful for console so that we can modify nodeCfg or nodeSelector by name Name string `json:"name,omitempty"` // an empty label selector matches all objects while a nil label selector matches no objects NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"` }
+k8s:deepcopy-gen=true
func (*NodeCfgProfile) DeepCopy ¶
func (in *NodeCfgProfile) DeepCopy() *NodeCfgProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCfgProfile.
func (*NodeCfgProfile) DeepCopyInto ¶
func (in *NodeCfgProfile) DeepCopyInto(out *NodeCfgProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeColocationCfg ¶
type NodeColocationCfg struct { NodeCfgProfile `json:",inline"` ColocationStrategy }
+k8s:deepcopy-gen=true
func (*NodeColocationCfg) DeepCopy ¶
func (in *NodeColocationCfg) DeepCopy() *NodeColocationCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeColocationCfg.
func (*NodeColocationCfg) DeepCopyInto ¶
func (in *NodeColocationCfg) DeepCopyInto(out *NodeColocationCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeExtensionStrategy ¶
type NodeExtensionStrategy struct { NodeCfgProfile `json:",inline"` NodeStrategy interface{} `json:",inline"` // for third-party extension }
+k8s:deepcopy-gen=false
func (*NodeExtensionStrategy) DeepCopy ¶
func (in *NodeExtensionStrategy) DeepCopy() *NodeExtensionStrategy
func (*NodeExtensionStrategy) DeepCopyInto ¶
func (in *NodeExtensionStrategy) DeepCopyInto(out *NodeExtensionStrategy)
type NodeHostApplicationCfg ¶ added in v1.4.0
type NodeHostApplicationCfg struct { NodeCfgProfile `json:",inline"` Applications []slov1alpha1.HostApplicationSpec `json:"applications,omitempty"` }
+k8s:deepcopy-gen=true
func (*NodeHostApplicationCfg) DeepCopy ¶ added in v1.4.0
func (in *NodeHostApplicationCfg) DeepCopy() *NodeHostApplicationCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeHostApplicationCfg.
func (*NodeHostApplicationCfg) DeepCopyInto ¶ added in v1.4.0
func (in *NodeHostApplicationCfg) DeepCopyInto(out *NodeHostApplicationCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeResourceQOSStrategy ¶
type NodeResourceQOSStrategy struct { NodeCfgProfile `json:",inline"` *slov1alpha1.ResourceQOSStrategy }
+k8s:deepcopy-gen=true
func (*NodeResourceQOSStrategy) DeepCopy ¶
func (in *NodeResourceQOSStrategy) DeepCopy() *NodeResourceQOSStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceQOSStrategy.
func (*NodeResourceQOSStrategy) DeepCopyInto ¶
func (in *NodeResourceQOSStrategy) DeepCopyInto(out *NodeResourceQOSStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeResourceThresholdStrategy ¶
type NodeResourceThresholdStrategy struct { NodeCfgProfile `json:",inline"` *slov1alpha1.ResourceThresholdStrategy }
+k8s:deepcopy-gen=true
func (*NodeResourceThresholdStrategy) DeepCopy ¶
func (in *NodeResourceThresholdStrategy) DeepCopy() *NodeResourceThresholdStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceThresholdStrategy.
func (*NodeResourceThresholdStrategy) DeepCopyInto ¶
func (in *NodeResourceThresholdStrategy) DeepCopyInto(out *NodeResourceThresholdStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeSystemStrategy ¶
type NodeSystemStrategy struct { NodeCfgProfile `json:",inline"` *slov1alpha1.SystemStrategy }
+k8s:deepcopy-gen=true
func (*NodeSystemStrategy) DeepCopy ¶
func (in *NodeSystemStrategy) DeepCopy() *NodeSystemStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSystemStrategy.
func (*NodeSystemStrategy) DeepCopyInto ¶
func (in *NodeSystemStrategy) DeepCopyInto(out *NodeSystemStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceQOSCfg ¶
type ResourceQOSCfg struct { ClusterStrategy *slov1alpha1.ResourceQOSStrategy `json:"clusterStrategy,omitempty"` NodeStrategies []NodeResourceQOSStrategy `json:"nodeStrategies,omitempty" validate:"dive"` }
+k8s:deepcopy-gen=true
func (*ResourceQOSCfg) DeepCopy ¶
func (in *ResourceQOSCfg) DeepCopy() *ResourceQOSCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQOSCfg.
func (*ResourceQOSCfg) DeepCopyInto ¶
func (in *ResourceQOSCfg) DeepCopyInto(out *ResourceQOSCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceThresholdCfg ¶
type ResourceThresholdCfg struct { ClusterStrategy *slov1alpha1.ResourceThresholdStrategy `json:"clusterStrategy,omitempty"` NodeStrategies []NodeResourceThresholdStrategy `json:"nodeStrategies,omitempty" validate:"dive"` }
+k8s:deepcopy-gen=true
func (*ResourceThresholdCfg) DeepCopy ¶
func (in *ResourceThresholdCfg) DeepCopy() *ResourceThresholdCfg
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceThresholdCfg.
func (*ResourceThresholdCfg) DeepCopyInto ¶
func (in *ResourceThresholdCfg) DeepCopyInto(out *ResourceThresholdCfg)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemCfg ¶
type SystemCfg struct { ClusterStrategy *slov1alpha1.SystemStrategy `json:"clusterStrategy,omitempty"` NodeStrategies []NodeSystemStrategy `json:"nodeStrategies,omitempty" validate:"dive"` }
+k8s:deepcopy-gen=true
func (*SystemCfg) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemCfg.
func (*SystemCfg) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.