priorities

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

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