loadaware

package
v0.0.0-...-e2cac0c Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "LoadAware"
)

Variables

This section is empty.

Functions

func NewLoadAware

func NewLoadAware(laArgs runtime.Object, h handle.PodFrameworkHandle) (framework.Plugin, error)

NewLoadAware initializes a new plugin and returns it.

Types

type LoadAware

type LoadAware struct {
	// contains filtered or unexported fields
}

LoadAware is a score plugin that favors nodes with low resource realtime utilization.

func (LoadAware) Filter

func (la LoadAware) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo framework.NodeInfo) *framework.Status

func (*LoadAware) Name

func (la *LoadAware) Name() string

Name returns name of the plugin. It is used in logs, etc.

func (*LoadAware) Score

func (la *LoadAware) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)

Score invoked at the Score extension point.

func (*LoadAware) ScoreExtensions

func (la *LoadAware) ScoreExtensions() framework.ScoreExtensions

ScoreExtensions of the Score plugin.

type ResourceTypeNameToWeightMap

type ResourceTypeNameToWeightMap map[podutil.PodResourceType]resourceToWeightMap

ResourceTypeNameToWeightMap contains resource name, resource type and weight.

func GenerateResourceTypeNameToWeightMap

func GenerateResourceTypeNameToWeightMap(resources []config.ResourceSpec) ResourceTypeNameToWeightMap

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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