mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
rename PluginConfigArgs to AlgorithmConfigArgs
This commit is contained in:
parent
3b440dfd55
commit
05606bb6e4
@ -40,8 +40,8 @@ import (
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// PluginFactoryArgs are passed to all plugin factory functions.
|
||||
type PluginFactoryArgs struct {
|
||||
// AlgorithmFactoryArgs are passed to all factory functions.
|
||||
type AlgorithmFactoryArgs struct {
|
||||
SharedLister schedulerlisters.SharedLister
|
||||
InformerFactory informers.SharedInformerFactory
|
||||
VolumeBinder *volumebinder.VolumeBinder
|
||||
@ -49,17 +49,17 @@ type PluginFactoryArgs struct {
|
||||
}
|
||||
|
||||
// PriorityMetadataProducerFactory produces MetadataProducer from the given args.
|
||||
type PriorityMetadataProducerFactory func(PluginFactoryArgs) priorities.MetadataProducer
|
||||
type PriorityMetadataProducerFactory func(AlgorithmFactoryArgs) priorities.MetadataProducer
|
||||
|
||||
// PredicateMetadataProducerFactory produces MetadataProducer from the given args.
|
||||
type PredicateMetadataProducerFactory func(PluginFactoryArgs) predicates.MetadataProducer
|
||||
type PredicateMetadataProducerFactory func(AlgorithmFactoryArgs) predicates.MetadataProducer
|
||||
|
||||
// FitPredicateFactory produces a FitPredicate from the given args.
|
||||
type FitPredicateFactory func(PluginFactoryArgs) predicates.FitPredicate
|
||||
type FitPredicateFactory func(AlgorithmFactoryArgs) predicates.FitPredicate
|
||||
|
||||
// PriorityFunctionFactory produces map & reduce priority functions
|
||||
// from a given args.
|
||||
type PriorityFunctionFactory func(PluginFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction)
|
||||
type PriorityFunctionFactory func(AlgorithmFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction)
|
||||
|
||||
// PriorityConfigFactory produces a PriorityConfig from the given function and weight
|
||||
type PriorityConfigFactory struct {
|
||||
@ -149,7 +149,7 @@ func ApplyPredicatesAndPriorities(s *Snapshot) {
|
||||
// RegisterFitPredicate registers a fit predicate with the algorithm
|
||||
// registry. Returns the name with which the predicate was registered.
|
||||
func RegisterFitPredicate(name string, predicate predicates.FitPredicate) string {
|
||||
return RegisterFitPredicateFactory(name, func(PluginFactoryArgs) predicates.FitPredicate { return predicate })
|
||||
return RegisterFitPredicateFactory(name, func(AlgorithmFactoryArgs) predicates.FitPredicate { return predicate })
|
||||
}
|
||||
|
||||
// RemoveFitPredicate removes a fit predicate from factory.
|
||||
@ -170,7 +170,7 @@ func RemovePredicateKeyFromAlgoProvider(providerName, key string) error {
|
||||
validateAlgorithmNameOrDie(providerName)
|
||||
provider, ok := algorithmProviderMap[providerName]
|
||||
if !ok {
|
||||
return fmt.Errorf("plugin %v has not been registered", providerName)
|
||||
return fmt.Errorf("provider %v is not registered", providerName)
|
||||
}
|
||||
provider.FitPredicateKeys.Delete(key)
|
||||
return nil
|
||||
@ -194,7 +194,7 @@ func InsertPredicateKeyToAlgoProvider(providerName, key string) error {
|
||||
validateAlgorithmNameOrDie(providerName)
|
||||
provider, ok := algorithmProviderMap[providerName]
|
||||
if !ok {
|
||||
return fmt.Errorf("plugin %v has not been registered", providerName)
|
||||
return fmt.Errorf("provider %v is not registered", providerName)
|
||||
}
|
||||
provider.FitPredicateKeys.Insert(key)
|
||||
return nil
|
||||
@ -227,7 +227,7 @@ func RegisterMandatoryFitPredicate(name string, predicate predicates.FitPredicat
|
||||
schedulerFactoryMutex.Lock()
|
||||
defer schedulerFactoryMutex.Unlock()
|
||||
validateAlgorithmNameOrDie(name)
|
||||
fitPredicateMap[name] = func(PluginFactoryArgs) predicates.FitPredicate { return predicate }
|
||||
fitPredicateMap[name] = func(AlgorithmFactoryArgs) predicates.FitPredicate { return predicate }
|
||||
mandatoryFitPredicates.Insert(name)
|
||||
return name
|
||||
}
|
||||
@ -254,7 +254,7 @@ func RegisterCustomFitPredicate(policy schedulerapi.PredicatePolicy, pluginArgs
|
||||
// generate the predicate function, if a custom type is requested
|
||||
if policy.Argument != nil {
|
||||
if policy.Argument.ServiceAffinity != nil {
|
||||
// We use the ServiceAffinity plugin name for all ServiceAffinity custom priorities.
|
||||
// We use the ServiceAffinity predicate name for all ServiceAffinity custom predicates.
|
||||
// It may get called multiple times but we essentially only register one instance of ServiceAffinity predicate.
|
||||
// This name is then used to find the registered plugin and run the plugin instead of the predicate.
|
||||
policyName = predicates.CheckServiceAffinityPred
|
||||
@ -266,7 +266,7 @@ func RegisterCustomFitPredicate(policy schedulerapi.PredicatePolicy, pluginArgs
|
||||
|
||||
pluginArgs.ServiceAffinityArgs.AffinityLabels = append(pluginArgs.ServiceAffinityArgs.AffinityLabels, policy.Argument.ServiceAffinity.Labels...)
|
||||
|
||||
predicateFactory = func(args PluginFactoryArgs) predicates.FitPredicate {
|
||||
predicateFactory = func(args AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
predicate, precomputationFunction := predicates.NewServiceAffinityPredicate(
|
||||
args.SharedLister.NodeInfos(),
|
||||
args.SharedLister.Pods(),
|
||||
@ -279,12 +279,12 @@ func RegisterCustomFitPredicate(policy schedulerapi.PredicatePolicy, pluginArgs
|
||||
return predicate
|
||||
}
|
||||
} else if policy.Argument.LabelsPresence != nil {
|
||||
// We use the NodeLabel plugin name for all NodeLabel custom priorities.
|
||||
// We use the CheckNodeLabelPresencePred predicate name for all kNodeLabel custom predicates.
|
||||
// It may get called multiple times but we essentially only register one instance of NodeLabel predicate.
|
||||
// This name is then used to find the registered plugin and run the plugin instead of the predicate.
|
||||
policyName = predicates.CheckNodeLabelPresencePred
|
||||
|
||||
// map LabelPresence policy to ConfigProducerArgs that's used to configure the NodeLabel plugin.
|
||||
// Map LabelPresence policy to ConfigProducerArgs that's used to configure the NodeLabel plugin.
|
||||
if pluginArgs.NodeLabelArgs == nil {
|
||||
pluginArgs.NodeLabelArgs = &nodelabel.Args{}
|
||||
}
|
||||
@ -293,7 +293,7 @@ func RegisterCustomFitPredicate(policy schedulerapi.PredicatePolicy, pluginArgs
|
||||
} else {
|
||||
pluginArgs.NodeLabelArgs.AbsentLabels = append(pluginArgs.NodeLabelArgs.AbsentLabels, policy.Argument.LabelsPresence.Labels...)
|
||||
}
|
||||
predicateFactory = func(_ PluginFactoryArgs) predicates.FitPredicate {
|
||||
predicateFactory = func(_ AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
return predicates.NewNodeLabelPredicate(
|
||||
pluginArgs.NodeLabelArgs.PresentLabels,
|
||||
pluginArgs.NodeLabelArgs.AbsentLabels,
|
||||
@ -343,7 +343,7 @@ func RegisterPriorityMapReduceFunction(
|
||||
reduceFunction priorities.PriorityReduceFunction,
|
||||
weight int) string {
|
||||
return RegisterPriorityConfigFactory(name, PriorityConfigFactory{
|
||||
MapReduceFunction: func(PluginFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
MapReduceFunction: func(AlgorithmFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
return mapFunction, reduceFunction
|
||||
},
|
||||
Weight: int64(weight),
|
||||
@ -390,7 +390,7 @@ func RegisterCustomPriorityFunction(policy schedulerapi.PriorityPolicy, configPr
|
||||
}
|
||||
schedulerFactoryMutex.RUnlock()
|
||||
pcf = &PriorityConfigFactory{
|
||||
MapReduceFunction: func(args PluginFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
MapReduceFunction: func(args AlgorithmFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
return priorities.NewServiceAntiAffinityPriority(
|
||||
args.SharedLister.Pods(),
|
||||
args.InformerFactory.Core().V1().Services().Lister(),
|
||||
@ -421,7 +421,7 @@ func RegisterCustomPriorityFunction(policy schedulerapi.PriorityPolicy, configPr
|
||||
}
|
||||
schedulerFactoryMutex.RUnlock()
|
||||
pcf = &PriorityConfigFactory{
|
||||
MapReduceFunction: func(_ PluginFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
MapReduceFunction: func(_ AlgorithmFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
return priorities.NewNodeLabelPriority(
|
||||
configProducerArgs.NodeLabelArgs.PresentLabelsPreference,
|
||||
configProducerArgs.NodeLabelArgs.AbsentLabelsPreference,
|
||||
@ -436,7 +436,7 @@ func RegisterCustomPriorityFunction(policy schedulerapi.PriorityPolicy, configPr
|
||||
ResourceToWeightMap: resources,
|
||||
}
|
||||
pcf = &PriorityConfigFactory{
|
||||
MapReduceFunction: func(args PluginFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
MapReduceFunction: func(args AlgorithmFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
p := priorities.RequestedToCapacityRatioResourceAllocationPriority(scoringFunctionShape, resources)
|
||||
return p.PriorityMap, nil
|
||||
},
|
||||
@ -499,8 +499,7 @@ func IsPriorityFunctionRegistered(name string) bool {
|
||||
return ok
|
||||
}
|
||||
|
||||
// RegisterAlgorithmProvider registers a new algorithm provider with the algorithm registry. This should
|
||||
// be called from the init function in a provider plugin.
|
||||
// RegisterAlgorithmProvider registers a new algorithm provider with the algorithm registry.
|
||||
func RegisterAlgorithmProvider(name string, predicateKeys, priorityKeys sets.String) string {
|
||||
schedulerFactoryMutex.Lock()
|
||||
defer schedulerFactoryMutex.Unlock()
|
||||
@ -519,13 +518,13 @@ func GetAlgorithmProvider(name string) (*AlgorithmProviderConfig, error) {
|
||||
|
||||
provider, ok := algorithmProviderMap[name]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("plugin %q has not been registered", name)
|
||||
return nil, fmt.Errorf("provider %q is not registered", name)
|
||||
}
|
||||
|
||||
return &provider, nil
|
||||
}
|
||||
|
||||
func getFitPredicateFunctions(names sets.String, args PluginFactoryArgs) (map[string]predicates.FitPredicate, error) {
|
||||
func getFitPredicateFunctions(names sets.String, args AlgorithmFactoryArgs) (map[string]predicates.FitPredicate, error) {
|
||||
schedulerFactoryMutex.RLock()
|
||||
defer schedulerFactoryMutex.RUnlock()
|
||||
|
||||
@ -548,7 +547,7 @@ func getFitPredicateFunctions(names sets.String, args PluginFactoryArgs) (map[st
|
||||
return fitPredicates, nil
|
||||
}
|
||||
|
||||
func getPriorityMetadataProducer(args PluginFactoryArgs) (priorities.MetadataProducer, error) {
|
||||
func getPriorityMetadataProducer(args AlgorithmFactoryArgs) (priorities.MetadataProducer, error) {
|
||||
schedulerFactoryMutex.Lock()
|
||||
defer schedulerFactoryMutex.Unlock()
|
||||
|
||||
@ -558,7 +557,7 @@ func getPriorityMetadataProducer(args PluginFactoryArgs) (priorities.MetadataPro
|
||||
return priorityMetadataProducerFactory(args), nil
|
||||
}
|
||||
|
||||
func getPredicateMetadataProducer(args PluginFactoryArgs) (predicates.MetadataProducer, error) {
|
||||
func getPredicateMetadataProducer(args AlgorithmFactoryArgs) (predicates.MetadataProducer, error) {
|
||||
schedulerFactoryMutex.Lock()
|
||||
defer schedulerFactoryMutex.Unlock()
|
||||
|
||||
@ -568,7 +567,7 @@ func getPredicateMetadataProducer(args PluginFactoryArgs) (predicates.MetadataPr
|
||||
return predicateMetadataProducerFactory(args), nil
|
||||
}
|
||||
|
||||
func getPriorityFunctionConfigs(names sets.String, args PluginFactoryArgs) ([]priorities.PriorityConfig, error) {
|
||||
func getPriorityFunctionConfigs(names sets.String, args AlgorithmFactoryArgs) ([]priorities.PriorityConfig, error) {
|
||||
schedulerFactoryMutex.RLock()
|
||||
defer schedulerFactoryMutex.RUnlock()
|
||||
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
func init() {
|
||||
// Register functions that extract metadata used by predicates computations.
|
||||
scheduler.RegisterPredicateMetadataProducerFactory(
|
||||
func(args scheduler.PluginFactoryArgs) predicates.MetadataProducer {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.MetadataProducer {
|
||||
f := &predicates.MetadataProducerFactory{}
|
||||
return f.GetPredicateMetadata
|
||||
})
|
||||
@ -54,7 +54,7 @@ func init() {
|
||||
// Fit is determined by volume zone requirements.
|
||||
scheduler.RegisterFitPredicateFactory(
|
||||
predicates.NoVolumeZoneConflictPred,
|
||||
func(args scheduler.PluginFactoryArgs) predicates.FitPredicate {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
pvLister := args.InformerFactory.Core().V1().PersistentVolumes().Lister()
|
||||
pvcLister := args.InformerFactory.Core().V1().PersistentVolumeClaims().Lister()
|
||||
storageClassLister := args.InformerFactory.Storage().V1().StorageClasses().Lister()
|
||||
@ -64,7 +64,7 @@ func init() {
|
||||
// Fit is determined by whether or not there would be too many AWS EBS volumes attached to the node
|
||||
scheduler.RegisterFitPredicateFactory(
|
||||
predicates.MaxEBSVolumeCountPred,
|
||||
func(args scheduler.PluginFactoryArgs) predicates.FitPredicate {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
csiNodeLister := scheduler.GetCSINodeLister(args.InformerFactory)
|
||||
pvLister := args.InformerFactory.Core().V1().PersistentVolumes().Lister()
|
||||
pvcLister := args.InformerFactory.Core().V1().PersistentVolumeClaims().Lister()
|
||||
@ -75,7 +75,7 @@ func init() {
|
||||
// Fit is determined by whether or not there would be too many GCE PD volumes attached to the node
|
||||
scheduler.RegisterFitPredicateFactory(
|
||||
predicates.MaxGCEPDVolumeCountPred,
|
||||
func(args scheduler.PluginFactoryArgs) predicates.FitPredicate {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
csiNodeLister := scheduler.GetCSINodeLister(args.InformerFactory)
|
||||
pvLister := args.InformerFactory.Core().V1().PersistentVolumes().Lister()
|
||||
pvcLister := args.InformerFactory.Core().V1().PersistentVolumeClaims().Lister()
|
||||
@ -86,7 +86,7 @@ func init() {
|
||||
// Fit is determined by whether or not there would be too many Azure Disk volumes attached to the node
|
||||
scheduler.RegisterFitPredicateFactory(
|
||||
predicates.MaxAzureDiskVolumeCountPred,
|
||||
func(args scheduler.PluginFactoryArgs) predicates.FitPredicate {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
csiNodeLister := scheduler.GetCSINodeLister(args.InformerFactory)
|
||||
pvLister := args.InformerFactory.Core().V1().PersistentVolumes().Lister()
|
||||
pvcLister := args.InformerFactory.Core().V1().PersistentVolumeClaims().Lister()
|
||||
@ -96,7 +96,7 @@ func init() {
|
||||
)
|
||||
scheduler.RegisterFitPredicateFactory(
|
||||
predicates.MaxCSIVolumeCountPred,
|
||||
func(args scheduler.PluginFactoryArgs) predicates.FitPredicate {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
csiNodeLister := scheduler.GetCSINodeLister(args.InformerFactory)
|
||||
pvLister := args.InformerFactory.Core().V1().PersistentVolumes().Lister()
|
||||
pvcLister := args.InformerFactory.Core().V1().PersistentVolumeClaims().Lister()
|
||||
@ -106,7 +106,7 @@ func init() {
|
||||
)
|
||||
scheduler.RegisterFitPredicateFactory(
|
||||
predicates.MaxCinderVolumeCountPred,
|
||||
func(args scheduler.PluginFactoryArgs) predicates.FitPredicate {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
csiNodeLister := scheduler.GetCSINodeLister(args.InformerFactory)
|
||||
pvLister := args.InformerFactory.Core().V1().PersistentVolumes().Lister()
|
||||
pvcLister := args.InformerFactory.Core().V1().PersistentVolumeClaims().Lister()
|
||||
@ -118,7 +118,7 @@ func init() {
|
||||
// Fit is determined by inter-pod affinity.
|
||||
scheduler.RegisterFitPredicateFactory(
|
||||
predicates.MatchInterPodAffinityPred,
|
||||
func(args scheduler.PluginFactoryArgs) predicates.FitPredicate {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
return predicates.NewPodAffinityPredicate(args.SharedLister.NodeInfos(), args.SharedLister.Pods())
|
||||
},
|
||||
)
|
||||
@ -139,7 +139,7 @@ func init() {
|
||||
// Fit is determined by volume topology requirements.
|
||||
scheduler.RegisterFitPredicateFactory(
|
||||
predicates.CheckVolumeBindingPred,
|
||||
func(args scheduler.PluginFactoryArgs) predicates.FitPredicate {
|
||||
func(args scheduler.AlgorithmFactoryArgs) predicates.FitPredicate {
|
||||
return predicates.NewVolumeBindingPredicate(args.VolumeBinder)
|
||||
},
|
||||
)
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
func init() {
|
||||
// Register functions that extract metadata used by priorities computations.
|
||||
scheduler.RegisterPriorityMetadataProducerFactory(
|
||||
func(args scheduler.PluginFactoryArgs) priorities.MetadataProducer {
|
||||
func(args scheduler.AlgorithmFactoryArgs) priorities.MetadataProducer {
|
||||
serviceLister := args.InformerFactory.Core().V1().Services().Lister()
|
||||
controllerLister := args.InformerFactory.Core().V1().ReplicationControllers().Lister()
|
||||
replicaSetLister := args.InformerFactory.Apps().V1().ReplicaSets().Lister()
|
||||
@ -40,7 +40,7 @@ func init() {
|
||||
scheduler.RegisterPriorityConfigFactory(
|
||||
priorities.ServiceSpreadingPriority,
|
||||
scheduler.PriorityConfigFactory{
|
||||
MapReduceFunction: func(args scheduler.PluginFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
MapReduceFunction: func(args scheduler.AlgorithmFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
serviceLister := args.InformerFactory.Core().V1().Services().Lister()
|
||||
return priorities.NewSelectorSpreadPriority(serviceLister, algorithm.EmptyControllerLister{}, algorithm.EmptyReplicaSetLister{}, algorithm.EmptyStatefulSetLister{})
|
||||
},
|
||||
@ -58,7 +58,7 @@ func init() {
|
||||
scheduler.RegisterPriorityConfigFactory(
|
||||
priorities.SelectorSpreadPriority,
|
||||
scheduler.PriorityConfigFactory{
|
||||
MapReduceFunction: func(args scheduler.PluginFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
MapReduceFunction: func(args scheduler.AlgorithmFactoryArgs) (priorities.PriorityMapFunction, priorities.PriorityReduceFunction) {
|
||||
serviceLister := args.InformerFactory.Core().V1().Services().Lister()
|
||||
controllerLister := args.InformerFactory.Core().V1().ReplicationControllers().Lister()
|
||||
replicaSetLister := args.InformerFactory.Apps().V1().ReplicaSets().Lister()
|
||||
|
@ -108,8 +108,8 @@ type Configurator struct {
|
||||
pluginConfigProducerRegistry *plugins.ConfigProducerRegistry
|
||||
nodeInfoSnapshot *nodeinfosnapshot.Snapshot
|
||||
|
||||
factoryArgs PluginFactoryArgs
|
||||
configProducerArgs *plugins.ConfigProducerArgs
|
||||
algorithmFactoryArgs AlgorithmFactoryArgs
|
||||
configProducerArgs *plugins.ConfigProducerArgs
|
||||
}
|
||||
|
||||
// GetHardPodAffinitySymmetricWeight is exposed for testing.
|
||||
@ -232,12 +232,12 @@ func (c *Configurator) CreateFromKeys(predicateKeys, priorityKeys sets.String, e
|
||||
return nil, err
|
||||
}
|
||||
|
||||
priorityMetaProducer, err := getPriorityMetadataProducer(c.factoryArgs)
|
||||
priorityMetaProducer, err := getPriorityMetadataProducer(c.algorithmFactoryArgs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
predicateMetaProducer, err := getPredicateMetadataProducer(c.factoryArgs)
|
||||
predicateMetaProducer, err := getPredicateMetadataProducer(c.algorithmFactoryArgs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -337,7 +337,7 @@ func getBinderFunc(client clientset.Interface, extenders []algorithm.SchedulerEx
|
||||
// as framework plugins. Specifically, a priority will run as a framework plugin if a plugin config producer was
|
||||
// registered for that priority.
|
||||
func (c *Configurator) getPriorityConfigs(priorityKeys sets.String) ([]priorities.PriorityConfig, *schedulerapi.Plugins, []schedulerapi.PluginConfig, error) {
|
||||
allPriorityConfigs, err := getPriorityFunctionConfigs(priorityKeys, c.factoryArgs)
|
||||
allPriorityConfigs, err := getPriorityFunctionConfigs(priorityKeys, c.algorithmFactoryArgs)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
@ -370,7 +370,7 @@ func (c *Configurator) getPriorityConfigs(priorityKeys sets.String) ([]prioritie
|
||||
// Note that the framework executes plugins according to their order in the Plugins list, and so predicates run as plugins
|
||||
// are added to the Plugins list according to the order specified in predicates.Ordering().
|
||||
func (c *Configurator) getPredicateConfigs(predicateKeys sets.String) (map[string]predicates.FitPredicate, *schedulerapi.Plugins, []schedulerapi.PluginConfig, error) {
|
||||
allFitPredicates, err := getFitPredicateFunctions(predicateKeys, c.factoryArgs)
|
||||
allFitPredicates, err := getFitPredicateFunctions(predicateKeys, c.algorithmFactoryArgs)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ func newConfigFactoryWithFrameworkRegistry(
|
||||
pluginConfig: []schedulerapi.PluginConfig{},
|
||||
pluginConfigProducerRegistry: pluginConfigProducerRegistry,
|
||||
nodeInfoSnapshot: snapshot,
|
||||
factoryArgs: PluginFactoryArgs{
|
||||
algorithmFactoryArgs: AlgorithmFactoryArgs{
|
||||
SharedLister: snapshot,
|
||||
InformerFactory: informerFactory,
|
||||
HardPodAffinitySymmetricWeight: hardPodAffinitySymmetricWeight,
|
||||
|
@ -326,7 +326,7 @@ func New(client clientset.Interface,
|
||||
pluginConfig: options.frameworkPluginConfig,
|
||||
pluginConfigProducerRegistry: options.frameworkConfigProducerRegistry,
|
||||
nodeInfoSnapshot: snapshot,
|
||||
factoryArgs: PluginFactoryArgs{
|
||||
algorithmFactoryArgs: AlgorithmFactoryArgs{
|
||||
SharedLister: snapshot,
|
||||
InformerFactory: informerFactory,
|
||||
VolumeBinder: volumeBinder,
|
||||
|
Loading…
Reference in New Issue
Block a user