cpu

package
v0.5.50 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EvictionPluginNameSystemCPUPressure = "system-cpu-pressure-eviction-plugin"
	EvictionConditionSystemCPU          = "SystemCPU"
	FakeLabelMetricPrefix               = "label"
	FakeLabelMetricSeparator            = "."

	MetricNameSystemLoadUnderPressure  = "system_load_under_pressure"
	MetricNameSystemUsageUnderPressure = "system_usage_under_pressure"
	FetchMetricFailed                  = "fetch_metric_error"
)

Variables

This section is empty.

Functions

func NewCPUSystemPressureEvictionPlugin

func NewCPUSystemPressureEvictionPlugin(
	_ *client.GenericClientSet,
	_ events.EventRecorder,
	metaServer *metaserver.MetaServer,
	emitter metrics.MetricEmitter,
	conf *config.Configuration,
) plugin.EvictionPlugin

NewCPUSystemPressureEvictionPlugin returns a new SystemPressureEvictionPlugin

Types

type SystemPressureEvictionPlugin

type SystemPressureEvictionPlugin struct {
	sync.Mutex
	*process.StopControl
	// contains filtered or unexported fields
}

SystemPressureEvictionPlugin is the implementation of EvictionPlugin for system cpu pressure

func (*SystemPressureEvictionPlugin) GetEvictPods

func (*SystemPressureEvictionPlugin) GetTopEvictionPods

func (*SystemPressureEvictionPlugin) Name

Name returns the name of the plugin

func (*SystemPressureEvictionPlugin) Start

func (s *SystemPressureEvictionPlugin) Start()

func (*SystemPressureEvictionPlugin) ThresholdMet

type ThresholdBound

type ThresholdBound struct {
	UpperBoundRatio float64
	LowerBoundRatio float64
	NodeMetricName  string
	PodMetricName   string
}

ThresholdBound is used to bind node and pod metrics with the upper and lower bounds for eviction

Jump to

Keyboard shortcuts

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