framework

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterPlugin

type FilterPlugin interface {
	Plugin
	// Filter is called by the scheduling framework.
	Filter(ctx context.Context, pod *corev1.Pod, node string) *Status
}

FilterPlugin is an interface for Filter plugins. These plugins are called at the filter extension point for filtering out hosts that cannot run a pod.

type Framework

type Framework interface {
	PluginsRunner
}

type Plugin

type Plugin interface {
	Name() string
}

Plugin is the parent type for all the scheduling framework plugins.

type PluginToHostPriorityList

type PluginToHostPriorityList map[string]extenderv1.HostPriorityList

PluginToHostPriorityList declares a map from plugin name to its extenderv1.HostPriorityList.

type PluginsRunner

type PluginsRunner interface {
	RunFilterPlugins(ctx context.Context, pod *corev1.Pod, node string) *Status

	RunScorePlugins(ctx context.Context, pod *corev1.Pod, nodes []string, parallelism int) extenderv1.HostPriorityList
}

type ScorePlugin

type ScorePlugin interface {
	Plugin
	// Score is called on each filtered node. It must return success and an integer
	// indicating the rank of the node.
	Score(ctx context.Context, pod *corev1.Pod, node string) (int64, *Status)
}

ScorePlugin is an interface that must be implemented by "Score" plugins to rank nodes that passed the filtering phase.

type Status

type Status struct {
	Accepted bool
	Err      error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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