scheduling

package
v0.0.0-...-262f7ed Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of the plugin used in Registry and configurations.
	Name       = "Scheduling"
	IpsWeight  = 1
	EnisWeigth = 1
)

Variables

This section is empty.

Functions

func New

New initializes a new plugin and returns it.

Types

type Args

type Args struct {
	allocator.OpenStackConf
	MaxInstanceIps  int
	MaxInstanceEnis int
}

Args defines the scheduling parameters for Scheduling plugin.

type Data

type Data struct {
	NodeIntsValue int
	NodeIpsValue  int
}

func (*Data) Clone

func (s *Data) Clone() framework.StateData

type Scheduling

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

Scheduling is a plugin that implements the mechanism of gang scheduling.

func (*Scheduling) CollectNodeIntsAndIps

func (cs *Scheduling) CollectNodeIntsAndIps(node *v1.Node, state *framework.CycleState) *framework.Status

func (*Scheduling) Filter

func (cs *Scheduling) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *framework.Status

func (*Scheduling) Less

func (cs *Scheduling) Less(podInfo1, podInfo2 *framework.PodInfo) bool

Less is used to sort pods in the scheduling queue. 1. Compare the priorities of Pods. 2. Compare the initialization timestamps of PodGroups/Pods. 3. Compare the keys of NameSpace/Pods, i.e., if two pods are tied at priority and creation time, the one without namespace will go ahead of the one with namespace.

func (*Scheduling) Name

func (cs *Scheduling) Name() string

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

func (*Scheduling) NormalizeScore

func (cs *Scheduling) NormalizeScore(ctx context.Context, state *framework.CycleState, p *v1.Pod, scores framework.NodeScoreList) *framework.Status

func (*Scheduling) ParallelCollection

func (cs *Scheduling) ParallelCollection(ctx context.Context, workers int, state *framework.CycleState, nodes []*v1.Node) *framework.Status

func (*Scheduling) PreScore

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

func (*Scheduling) Score

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

func (*Scheduling) ScoreExtensions

func (cs *Scheduling) ScoreExtensions() framework.ScoreExtensions

Jump to

Keyboard shortcuts

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