Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultRegistry ¶
func NewDefaultRegistry(args *RegistryArgs) framework.Registry
NewDefaultRegistry builds a default registry with all the default plugins. This is the registry that Kubernetes default scheduler uses. A scheduler that runs custom plugins, can pass a different Registry when initializing the scheduler.
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 }
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 { SchedulerCache internalcache.Cache ServiceLister algorithm.ServiceLister ControllerLister algorithm.ControllerLister ReplicaSetLister algorithm.ReplicaSetLister StatefulSetLister algorithm.StatefulSetLister PDBLister algorithm.PDBLister PVLister corelisters.PersistentVolumeLister PVCLister corelisters.PersistentVolumeClaimLister StorageClassLister storagelistersv1.StorageClassLister VolumeBinder *volumebinder.VolumeBinder }
RegistryArgs arguments needed to create default plugin factories.