kubernetesk8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread Index | Files

package defaultpodtopologyspread

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

Index

Constants

const Name = "DefaultPodTopologySpread"

Name is the name of the plugin used in the plugin registry and configurations.

Functions

func New

New initializes a new plugin and returns it.

Types

type DefaultPodTopologySpread

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

DefaultPodTopologySpread is a plugin that calculates selector spread priority.

func (*DefaultPodTopologySpread) Name

func (pl *DefaultPodTopologySpread) Name() string

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

func (*DefaultPodTopologySpread) NormalizeScore

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

NormalizeScore invoked after scoring all nodes.

func (*DefaultPodTopologySpread) Score

func (pl *DefaultPodTopologySpread) 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 (*DefaultPodTopologySpread) ScoreExtensions

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

ScoreExtensions of the Score plugin.

Source Files

default_pod_topology_spread.go

Version
v1.17.9-rc.0
Published
Jun 26, 2020
Platform
js/wasm
Imports
7 packages
Last checked
4 minutes ago

Tools for package owners.