advisor

package
v0.5.40 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PowerAwareAdvisor

type PowerAwareAdvisor interface {
	// Run depicts the whole process taking in power related inputs, generating action plans, and delegating the executions
	Run(ctx context.Context)
	// Init initializes components
	Init() error
}

PowerAwareAdvisor is the interface that runs the whole power advisory process

func NewAdvisor

func NewAdvisor(dryRun bool,
	annotationKeyPrefix string,
	podEvictor evictor.PodEvictor,
	emitter metrics.MetricEmitter,
	nodeFetcher node.NodeFetcher,
	reader reader.PowerReader,
	capper capper.PowerCapper,
	reconciler PowerReconciler,
) PowerAwareAdvisor

type PowerReconciler

type PowerReconciler interface {
	// Reconcile returns true if CPU frequency capping is involved
	// this return is important as the cpu freq capping should be released when the alert is gone
	Reconcile(ctx context.Context, desired *spec.PowerSpec, actual int) (bool, error)
	OnDVFSReset()
}

func NewReconciler added in v0.5.29

func NewReconciler(dryRun bool, emitter metrics.MetricEmitter,
	evictor evictor.PercentageEvictor, capper capper.PowerCapper, strategy strategy.PowerActionStrategy,
) PowerReconciler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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