kubernetes: k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread Index | Files

package selectorspread

import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread"

Index

Package Files

selector_spread.go

Constants

const (
    // Name is the name of the plugin used in the plugin registry and configurations.
    Name = "SelectorSpread"
)

func New Uses

func New(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error)

New initializes a new plugin and returns it.

type SelectorSpread Uses

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

SelectorSpread is a plugin that calculates selector spread priority.

func (*SelectorSpread) Name Uses

func (pl *SelectorSpread) Name() string

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

func (*SelectorSpread) NormalizeScore Uses

func (pl *SelectorSpread) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status

NormalizeScore invoked after scoring all nodes. For this plugin, it calculates the score of each node based on the number of existing matching pods on the node where zone information is included on the nodes, it favors nodes in zones with fewer existing matching pods.

func (*SelectorSpread) PreScore Uses

func (pl *SelectorSpread) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) *framework.Status

PreScore builds and writes cycle state used by Score and NormalizeScore.

func (*SelectorSpread) Score Uses

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

Score invoked at the Score extension point. The "score" returned in this function is the matching number of pods on the `nodeName`, it is normalized later.

func (*SelectorSpread) ScoreExtensions Uses

func (pl *SelectorSpread) ScoreExtensions() framework.ScoreExtensions

ScoreExtensions of the Score plugin.

Package selectorspread imports 10 packages (graph) and is imported by 12 packages. Updated 2020-07-21. Refresh now. Tools for package owners.