midresource

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "MidResource"

Variables

ResourceNames defines the Mid-tier extended resource names to update.

Functions

This section is empty.

Types

type Plugin

type Plugin struct{}

func (*Plugin) Calculate

func (p *Plugin) Calculate(strategy *configuration.ColocationStrategy, node *corev1.Node, podList *corev1.PodList,
	metrics *framework.ResourceMetrics) ([]framework.ResourceItem, error)

Calculate calculates Mid resources using the formula below: if midReclaimMode = "static": NodeReclaimable[Mid] = NodeCapacity * staticReservedRatio else: NodeReclaimable[Mid] = min(NodeMetricReclaimable[Mid], NodeUnused) + Unallocated[Mid] * midUnallocatedRatio Allocatable[Mid] = min(NodeReclaimable[Mid], NodeAllocatable * midThresholdRatio)

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) NeedSync

func (p *Plugin) NeedSync(strategy *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)

func (*Plugin) Prepare added in v1.4.0

func (*Plugin) Reset

func (p *Plugin) Reset(node *corev1.Node, message string) []framework.ResourceItem

Jump to

Keyboard shortcuts

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