sloconfig

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: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	En = "en"
)

Variables

View Source
var (
	// ConfigNameSpace is the namespace of the slo-controller configmap.
	ConfigNameSpace = "koordinator-system"
	// SLOCtrlConfigMap is the name of the slo-controller configmap.
	SLOCtrlConfigMap = "slo-controller-config"
	// NodeStrategyNameNeedCheck true:enable to check name required and not conflict, false: not check
	NodeStrategyNameNeedCheck = "false"
)

Functions

func ClearDefaultColocationExtension

func ClearDefaultColocationExtension()

solving internal ut conflicts

func DefaultCPUBurstConfig

func DefaultCPUBurstConfig() slov1alpha1.CPUBurstConfig

func DefaultCPUBurstStrategy

func DefaultCPUBurstStrategy() *slov1alpha1.CPUBurstStrategy

func DefaultCPUQOS

func DefaultCPUQOS(qos apiext.QoSClass) *slov1alpha1.CPUQOS

func DefaultColocationCfg

func DefaultColocationCfg() configuration.ColocationCfg

func DefaultColocationStrategy

func DefaultColocationStrategy() configuration.ColocationStrategy

func DefaultExtensions

func DefaultExtensions() *slov1alpha1.ExtensionsMap

func DefaultMemoryQOS

func DefaultMemoryQOS(qos apiext.QoSClass) *slov1alpha1.MemoryQOS

DefaultMemoryQOS returns the recommended configuration for memory qos strategy. Please refer to `apis/slo/v1alpha1` for the definition of each field. In the recommended configuration, all abilities of memcg qos are disable, including `MinLimitPercent`, `LowLimitPercent`, `ThrottlingPercent` since they are not fully beneficial to all scenarios. Whereas, they are still useful when the use case is determined. e.g. lock some memory to improve file read performance. Asynchronous memory reclaim is enabled by default to alleviate the direct reclaim pressure, including `WmarkRatio` and `WmarkScalePermill`. The watermark of async reclaim is not recommended to set too low, since lower the watermark the more excess reclamations. Memory min watermark grading corresponding to `WmarkMinAdj` is enabled. It benefits high-priority pods by postponing global reclaim when machine's free memory is below than `/proc/sys/vm/min_free_kbytes`.

func DefaultNodeSLOSpecConfig

func DefaultNodeSLOSpecConfig() slov1alpha1.NodeSLOSpec

DefaultNodeSLOSpecConfig defines the default config of the nodeSLOSpec, which would be used by the resmgr

func DefaultResourceQOSPolicies added in v1.4.0

func DefaultResourceQOSPolicies() *slov1alpha1.ResourceQOSPolicies

func DefaultResourceQOSStrategy

func DefaultResourceQOSStrategy() *slov1alpha1.ResourceQOSStrategy

func DefaultResourceThresholdStrategy

func DefaultResourceThresholdStrategy() *slov1alpha1.ResourceThresholdStrategy

func DefaultSystemStrategy

func DefaultSystemStrategy() *slov1alpha1.SystemStrategy

func GetColocationStrategyOnNode added in v1.4.0

func GetColocationStrategyOnNode(node *corev1.Node) (*configuration.ColocationStrategy, error)

GetColocationStrategyOnNode gets the colocation strategy in the node annotations.

func InitFlags

func InitFlags(fs *flag.FlagSet)

func IsColocationStrategyValid

func IsColocationStrategyValid(strategy *configuration.ColocationStrategy) bool

func IsNodeColocationCfgValid

func IsNodeColocationCfgValid(nodeCfg *configuration.NodeColocationCfg) bool

func IsNodeStrategyNameNeedCheck

func IsNodeStrategyNameNeedCheck() bool

func NewDefaultColocationCfg

func NewDefaultColocationCfg() *configuration.ColocationCfg

func NoneCPUQOS

func NoneCPUQOS() *slov1alpha1.CPUQOS

func NoneMemoryQOS

func NoneMemoryQOS() *slov1alpha1.MemoryQOS

NoneMemoryQOS returns the all-disabled configuration for memory qos strategy.

func NoneResctrlQOS

func NoneResctrlQOS() *slov1alpha1.ResctrlQOS

func NoneResourceQOS

func NoneResourceQOS(qos apiext.QoSClass) *slov1alpha1.ResourceQOS

func NoneResourceQOSPolicies added in v1.4.0

func NoneResourceQOSPolicies() *slov1alpha1.ResourceQOSPolicies

func NoneResourceQOSStrategy

func NoneResourceQOSStrategy() *slov1alpha1.ResourceQOSStrategy

NoneResourceQOSStrategy indicates the qos strategy with all qos

func RegisterDefaultColocationExtension

func RegisterDefaultColocationExtension(key string, extension interface{}) error

func RegisterDefaultExtensionsMap

func RegisterDefaultExtensionsMap(extKey string, extCfg interface{})

func UnregisterDefaultColocationExtension

func UnregisterDefaultColocationExtension(key string)

func UpdateColocationStrategyForNode added in v1.4.0

func UpdateColocationStrategyForNode(strategy *configuration.ColocationStrategy, node *corev1.Node)

Types

type DefaultValidator

type DefaultValidator struct {
	// contains filtered or unexported fields
}

func GetValidatorInstance

func GetValidatorInstance() *DefaultValidator

func (*DefaultValidator) StructWithTrans

func (v *DefaultValidator) StructWithTrans(config interface{}) (validator.ValidationErrorsTranslations, error)

Jump to

Keyboard shortcuts

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