priorities

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const MaxScore int = 10
View Source
const MinScore int = 0

Variables

View Source
var (
	// Newly added predicates should be placed here
	DefaultPrioritizeFuncs = []PrioritizeFunc{

		CapacityMatch,
		CountMatch,
		NodeAntiAffinity,
	}
)

Functions

func CapacityMatch

func CapacityMatch(ctx *algorithm.SchedulingContext, pod *corev1.Pod, node *corev1.Node) (int, error)

func CountMatch

func CountMatch(ctx *algorithm.SchedulingContext, pod *corev1.Pod, node *corev1.Node) (int, error)

CountMatch picks the node whose amount of device/mount point best fulfill the amount of pvc requests

func InitHostPriorityList

func InitHostPriorityList(nodeNames []string) schedulerapi.HostPriorityList

func NodeAntiAffinity

func NodeAntiAffinity(ctx *algorithm.SchedulingContext, pod *corev1.Pod, node *corev1.Node) (int, error)

NodeAntiAffinity picks the node whose amount of device/mount point best fulfill the amount of pvc requests

Types

type Prioritize

type Prioritize struct {
	Name            string
	Ctx             *algorithm.SchedulingContext
	PrioritizeFuncs []PrioritizeFunc
}

func NewPrioritize

func NewPrioritize(ctx *algorithm.SchedulingContext) *Prioritize

func (Prioritize) Handler

type PrioritizeFunc

type PrioritizeFunc func(ctx *algorithm.SchedulingContext, pod *corev1.Pod, node *corev1.Node) (int, error)

Jump to

Keyboard shortcuts

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