package plugins

import "k8s.io/kubernetes/pkg/scheduler/framework/plugins"

Index

Functions

func NewDefaultRegistry

func NewDefaultRegistry(args *RegistryArgs) framework.Registry

NewDefaultRegistry builds the default registry with all the in-tree plugins. This is the registry that Kubernetes default scheduler uses. A scheduler that runs out of tree plugins can register additional plugins through the WithFrameworkOutOfTreeRegistry option.

Types

type ConfigProducer

type ConfigProducer func(args ConfigProducerArgs) (config.Plugins, []config.PluginConfig)

ConfigProducer produces a framework's configuration.

type ConfigProducerArgs

type ConfigProducerArgs struct {
	// Weight used for priority functions.
	Weight int32
	// NodeLabelArgs is the args for the NodeLabel plugin.
	NodeLabelArgs *nodelabel.Args
	// RequestedToCapacityRatioArgs is the args for the RequestedToCapacityRatio plugin.
	RequestedToCapacityRatioArgs *requestedtocapacityratio.Args
	// ServiceAffinityArgs is the args for the ServiceAffinity plugin.
	ServiceAffinityArgs *serviceaffinity.Args
}

ConfigProducerArgs contains arguments that are passed to the producer. As we add more predicates/priorities to framework plugins mappings, more arguments may be added here.

type ConfigProducerRegistry

type ConfigProducerRegistry struct {
	// maps that associate predicates/priorities with framework plugin configurations.
	PredicateToConfigProducer map[string]ConfigProducer
	PriorityToConfigProducer  map[string]ConfigProducer
}

ConfigProducerRegistry tracks mappings from predicates/priorities to framework config producers.

func NewDefaultConfigProducerRegistry

func NewDefaultConfigProducerRegistry() *ConfigProducerRegistry

NewDefaultConfigProducerRegistry creates a new producer registry.

func (*ConfigProducerRegistry) RegisterPredicate

func (f *ConfigProducerRegistry) RegisterPredicate(name string, producer ConfigProducer) error

RegisterPredicate registers a config producer for a predicate.

func (*ConfigProducerRegistry) RegisterPriority

func (f *ConfigProducerRegistry) RegisterPriority(name string, producer ConfigProducer) error

RegisterPriority registers a framework config producer for a priority.

type RegistryArgs

type RegistryArgs struct {
	VolumeBinder *volumebinder.VolumeBinder
}

RegistryArgs arguments needed to create default plugin factories.

Source Files

default_registry.go

Directories

PathSynopsis
pkg/scheduler/framework/plugins/defaultpodtopologyspread
pkg/scheduler/framework/plugins/examples
pkg/scheduler/framework/plugins/examples/multipoint
pkg/scheduler/framework/plugins/examples/prebind
pkg/scheduler/framework/plugins/examples/stateful
pkg/scheduler/framework/plugins/imagelocality
pkg/scheduler/framework/plugins/interpodaffinity
pkg/scheduler/framework/plugins/migration
pkg/scheduler/framework/plugins/nodeaffinity
pkg/scheduler/framework/plugins/nodelabel
pkg/scheduler/framework/plugins/nodename
pkg/scheduler/framework/plugins/nodeports
pkg/scheduler/framework/plugins/nodepreferavoidpods
pkg/scheduler/framework/plugins/noderesources
pkg/scheduler/framework/plugins/nodeunschedulable
pkg/scheduler/framework/plugins/nodevolumelimits
pkg/scheduler/framework/plugins/podtopologyspread
pkg/scheduler/framework/plugins/requestedtocapacityratio
pkg/scheduler/framework/plugins/serviceaffinity
pkg/scheduler/framework/plugins/tainttoleration
pkg/scheduler/framework/plugins/volumebinding
pkg/scheduler/framework/plugins/volumerestrictions
pkg/scheduler/framework/plugins/volumezone
Version
v1.17.14
Published
Nov 11, 2020
Platform
js/wasm
Imports
27 packages
Last checked
9 seconds ago

Tools for package owners.