Documentation ¶
Index ¶
- Constants
- Variables
- func ClearDefaultColocationExtension()
- func DefaultCPUBurstConfig() slov1alpha1.CPUBurstConfig
- func DefaultCPUBurstStrategy() *slov1alpha1.CPUBurstStrategy
- func DefaultCPUQOS(qos apiext.QoSClass) *slov1alpha1.CPUQOS
- func DefaultColocationCfg() configuration.ColocationCfg
- func DefaultColocationStrategy() configuration.ColocationStrategy
- func DefaultExtensions() *slov1alpha1.ExtensionsMap
- func DefaultMemoryQOS(qos apiext.QoSClass) *slov1alpha1.MemoryQOS
- func DefaultNodeSLOSpecConfig() slov1alpha1.NodeSLOSpec
- func DefaultResctrlQOS(qos apiext.QoSClass) *slov1alpha1.ResctrlQOS
- func DefaultResourceQOSPolicies() *slov1alpha1.ResourceQOSPolicies
- func DefaultResourceQOSStrategy() *slov1alpha1.ResourceQOSStrategy
- func DefaultResourceThresholdStrategy() *slov1alpha1.ResourceThresholdStrategy
- func DefaultSystemStrategy() *slov1alpha1.SystemStrategy
- func GetColocationStrategyOnNode(node *corev1.Node) (*configuration.ColocationStrategy, error)
- func GetNodeColocationStrategy(cfg *configuration.ColocationCfg, node *corev1.Node) *configuration.ColocationStrategy
- func InitFlags(fs *flag.FlagSet)
- func IsColocationStrategyValid(strategy *configuration.ColocationStrategy) bool
- func IsNodeColocationCfgValid(nodeCfg *configuration.NodeColocationCfg) bool
- func IsNodeStrategyNameNeedCheck() bool
- func NewDefaultColocationCfg() *configuration.ColocationCfg
- func NoneCPUQOS() *slov1alpha1.CPUQOS
- func NoneMemoryQOS() *slov1alpha1.MemoryQOS
- func NoneNetworkQOS() *slov1alpha1.NetworkQOS
- func NoneResctrlQOS() *slov1alpha1.ResctrlQOS
- func NoneResourceQOS(qos apiext.QoSClass) *slov1alpha1.ResourceQOS
- func NoneResourceQOSPolicies() *slov1alpha1.ResourceQOSPolicies
- func NoneResourceQOSStrategy() *slov1alpha1.ResourceQOSStrategy
- func RegisterDefaultColocationExtension(key string, extension interface{}) error
- func RegisterDefaultExtensionsMap(extKey string, extCfg interface{})
- func UnregisterDefaultColocationExtension(key string)
- func UpdateColocationStrategyForNode(strategy *configuration.ColocationStrategy, node *corev1.Node)
- type DefaultValidator
Constants ¶
const (
En = "en"
)
Variables ¶
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 DefaultResctrlQOS ¶
func DefaultResctrlQOS(qos apiext.QoSClass) *slov1alpha1.ResctrlQOS
TODO https://github.com/koordinator-sh/koordinator/pull/94#discussion_r858786733
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 GetNodeColocationStrategy ¶
func GetNodeColocationStrategy(cfg *configuration.ColocationCfg, node *corev1.Node) *configuration.ColocationStrategy
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 NoneNetworkQOS ¶ added in v1.5.0
func NoneNetworkQOS() *slov1alpha1.NetworkQOS
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 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)