Documentation ¶
Index ¶
- Constants
- func DefaultCPUNormalizationCfg() *configuration.CPUNormalizationCfg
- type Plugin
- func (p *Plugin) Calculate(_ *configuration.ColocationStrategy, node *corev1.Node, _ *corev1.PodList, ...) ([]framework.ResourceItem, error)
- func (p *Plugin) Name() string
- func (p *Plugin) NeedSyncMeta(_ *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)
- func (p *Plugin) Prepare(_ *configuration.ColocationStrategy, node *corev1.Node, ...) error
- func (p *Plugin) Reset(node *corev1.Node, message string) []framework.ResourceItem
- func (p *Plugin) Setup(opt *framework.Option) error
Constants ¶
View Source
const PluginName = "CPUNormalization"
View Source
const (
ReasonCPUNormalizationConfigUnmarshalFailed = "CPUNormalizationCfgUnmarshalFailed"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultCPUNormalizationCfg ¶
func DefaultCPUNormalizationCfg() *configuration.CPUNormalizationCfg
Types ¶
type Plugin ¶
type Plugin struct{}
func (*Plugin) Calculate ¶
func (p *Plugin) Calculate(_ *configuration.ColocationStrategy, node *corev1.Node, _ *corev1.PodList, _ *framework.ResourceMetrics) ([]framework.ResourceItem, error)
Calculate retrieves the CPUNormalizationStrategy from ConfigMap and the CPUBasicInfo from the NRT, get the cpu normalization ratio annotation
func (*Plugin) NeedSyncMeta ¶
func (p *Plugin) NeedSyncMeta(_ *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)
NeedSyncMeta checks if the node annotation of cpu normalization ratio to update is different from the current
func (*Plugin) Prepare ¶
func (p *Plugin) Prepare(_ *configuration.ColocationStrategy, node *corev1.Node, nr *framework.NodeResource) error
Click to show internal directories.
Click to hide internal directories.