nodenumber

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "NodeNumber"

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

Variables

This section is empty.

Functions

func New

New initializes a new plugin and returns it.

Types

type NodeNumber

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

NodeNumber is a plugin that favors nodes that has the same number suffix as number suffix of pod name. And it will delay the binding of pod by {node suffix number} seconds. For example: When schedule a pod named Pod1, a Node named Node9 gets a higher score than a node named Node1. And if it is decided that Pod1 will go to Node9, this plugin delay the binding by 9 seconds.

IMPORTANT NOTE: this plugin only handle single digit numbers only.

func (*NodeNumber) EventsToRegister

func (pl *NodeNumber) EventsToRegister() []framework.ClusterEvent

func (*NodeNumber) Name

func (pl *NodeNumber) Name() string

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

func (*NodeNumber) Permit

func (pl *NodeNumber) Permit(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (*framework.Status, time.Duration)

func (*NodeNumber) PreScore

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

func (*NodeNumber) Score

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

Score invoked at the score extension point.

func (*NodeNumber) ScoreExtensions

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