resourcepriority

package
v0.0.0-...-d4c82a0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The maximum priority value that the plugin returns
	MaxPriority = 100

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

Variables

This section is empty.

Functions

func New

New initializes a new plugin and returns it.

Types

type ResourcePriority

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

ResourcePriority is a score plugin that favors nodes that have the most available resources.

func (*ResourcePriority) Name

func (pl *ResourcePriority) Name() string

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

func (*ResourcePriority) Score

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

Score invoked at the score extension point.

func (*ResourcePriority) ScoreExtensions

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

ScoreExtensions of the Score plugin.

Jump to

Keyboard shortcuts

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