plugins

package
v1.17.4-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: Apache-2.0 Imports: 27 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Jump to

Keyboard shortcuts

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