Documentation ¶
Index ¶
- Constants
- func CreateCheckersAll(oldConfig *corev1.ConfigMap, config *corev1.ConfigMap, needUnmarshal bool) checkers
- func CreateCheckersChanged(oldConfig *corev1.ConfigMap, config *corev1.ConfigMap) checkers
- type CPUBurstChecker
- type ColocationConfigChecker
- type CommonChecker
- type ConfigChecker
- type ExsitNodeConflictMessage
- type NodeConfigProfileChecker
- type ResourceQOSChecker
- type ResourceThresholdChecker
- type SLOControllerPlugin
- type SystemConfigChecker
Constants ¶
View Source
const ( ReasonOverlap = err.Reason("NodeStrategiesOverlap") ReasonExistNodeConfict = err.Reason("ExistNodeConfict") ReasonParseFail = err.Reason("ParseConfigFail") ReasonParamInvalid = err.Reason("ConfigParamInvalid") )
View Source
const InitSuccess = "Success"
View Source
const NotInit = "NotInit"
View Source
const (
PluginName = "SLOConfig"
)
Variables ¶
This section is empty.
Functions ¶
func CreateCheckersAll ¶
Types ¶
type CPUBurstChecker ¶
type CPUBurstChecker struct { CommonChecker // contains filtered or unexported fields }
func NewCPUBurstChecker ¶
func NewCPUBurstChecker(oldConfig, newConfig *corev1.ConfigMap, needUnmarshal bool) *CPUBurstChecker
func (*CPUBurstChecker) ConfigParamValid ¶
func (c *CPUBurstChecker) ConfigParamValid() error
type ColocationConfigChecker ¶
type ColocationConfigChecker struct { CommonChecker // contains filtered or unexported fields }
func NewColocationConfigChecker ¶
func NewColocationConfigChecker(oldConfig, newConfig *corev1.ConfigMap, needUnmarshal bool) *ColocationConfigChecker
func (*ColocationConfigChecker) ConfigParamValid ¶
func (c *ColocationConfigChecker) ConfigParamValid() error
type CommonChecker ¶
type CommonChecker struct { OldConfigMap *corev1.ConfigMap NewConfigMap *corev1.ConfigMap NodeConfigProfileChecker // contains filtered or unexported fields }
func (*CommonChecker) CheckByValidator ¶
func (c *CommonChecker) CheckByValidator(config interface{}) error
func (*CommonChecker) InitStatus ¶
func (c *CommonChecker) InitStatus() string
func (*CommonChecker) IsCfgNotEmptyAndChanged ¶
func (c *CommonChecker) IsCfgNotEmptyAndChanged() bool
type ConfigChecker ¶
type ConfigChecker interface { IsCfgNotEmptyAndChanged() bool InitStatus() string ConfigParamValid() error NodeConfigProfileChecker }
type NodeConfigProfileChecker ¶
type NodeConfigProfileChecker interface { HasMultiNodeConfigs() bool //nodeConfigs nums > 1 ProfileParamValid() error //name must not conflict NodeSelectorOverlap() error //check nodeselector if overlap ExistNodeConflict(node *corev1.Node) error //check a node if exist conflict }
func CreateNodeConfigProfileChecker ¶
func CreateNodeConfigProfileChecker(configName string, profiles func() []configuration.NodeCfgProfile) (NodeConfigProfileChecker, error)
type ResourceQOSChecker ¶
type ResourceQOSChecker struct { CommonChecker // contains filtered or unexported fields }
func NewResourceQOSChecker ¶
func NewResourceQOSChecker(oldConfig, newConfig *corev1.ConfigMap, needUnmarshal bool) *ResourceQOSChecker
func (*ResourceQOSChecker) ConfigParamValid ¶
func (c *ResourceQOSChecker) ConfigParamValid() error
type ResourceThresholdChecker ¶
type ResourceThresholdChecker struct { CommonChecker // contains filtered or unexported fields }
func NewResourceThresholdChecker ¶
func NewResourceThresholdChecker(oldConfig, newConfig *corev1.ConfigMap, needUnmarshal bool) *ResourceThresholdChecker
func (*ResourceThresholdChecker) ConfigParamValid ¶
func (c *ResourceThresholdChecker) ConfigParamValid() error
type SLOControllerPlugin ¶
type SLOControllerPlugin struct {
// contains filtered or unexported fields
}
func NewPlugin ¶
func NewPlugin(decoder *ctrladmission.Decoder, client ctrlclient.Client) *SLOControllerPlugin
func (*SLOControllerPlugin) Admit ¶
func (cl *SLOControllerPlugin) Admit(ctx context.Context, req ctrladmission.Request, config, oldConfig *corev1.ConfigMap) error
func (*SLOControllerPlugin) Name ¶
func (cl *SLOControllerPlugin) Name() string
func (*SLOControllerPlugin) Validate ¶
func (cl *SLOControllerPlugin) Validate(ctx context.Context, req ctrladmission.Request, config, oldConfig *corev1.ConfigMap) error
type SystemConfigChecker ¶
type SystemConfigChecker struct { CommonChecker // contains filtered or unexported fields }
func NewSystemConfigChecker ¶
func NewSystemConfigChecker(oldConfig, newConfig *corev1.ConfigMap, needUnmarshal bool) *SystemConfigChecker
func (*SystemConfigChecker) ConfigParamValid ¶
func (c *SystemConfigChecker) ConfigParamValid() error
Click to show internal directories.
Click to hide internal directories.