evenpodspread

package
v0.40.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name                   = state.EvenPodSpread
	ErrReasonInvalidArg    = "invalid arguments"
	ErrReasonUnschedulable = "pod will cause an uneven spread"
)

Name of the plugin

Variables

This section is empty.

Functions

This section is empty.

Types

type EvenPodSpread

type EvenPodSpread struct {
}

EvenPodSpread is a filter or score plugin that picks/favors pods that create an equal spread of resources across pods

func (*EvenPodSpread) Filter

func (pl *EvenPodSpread) Filter(ctx context.Context, args interface{}, states *state.State, key types.NamespacedName, podID int32) *state.Status

Filter invoked at the filter extension point.

func (*EvenPodSpread) Name

func (pl *EvenPodSpread) Name() string

Name returns name of the plugin

func (*EvenPodSpread) NormalizeScore

func (pl *EvenPodSpread) NormalizeScore(ctx context.Context, states *state.State, scores state.PodScoreList) *state.Status

NormalizeScore invoked after scoring all pods.

func (*EvenPodSpread) Score

func (pl *EvenPodSpread) Score(ctx context.Context, args interface{}, states *state.State, feasiblePods []int32, key types.NamespacedName, podID int32) (uint64, *state.Status)

Score invoked at the score extension point. The "score" returned in this function is higher for pods that create an even spread across pods.

func (*EvenPodSpread) ScoreExtensions

func (pl *EvenPodSpread) ScoreExtensions() state.ScoreExtensions

ScoreExtensions of the Score plugin.

Jump to

Keyboard shortcuts

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