mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
implement taints and tolerations
This commit is contained in:
@@ -145,6 +145,14 @@ func defaultPredicates() sets.String {
|
||||
// GeneralPredicates are the predicates that are enforced by all Kubernetes components
|
||||
// (e.g. kubelet and all schedulers)
|
||||
factory.RegisterFitPredicate("GeneralPredicates", predicates.GeneralPredicates),
|
||||
|
||||
// Fit is determined based on whether a pod can tolerate all of the node's taints
|
||||
factory.RegisterFitPredicateFactory(
|
||||
"PodToleratesNodeTaints",
|
||||
func(args factory.PluginFactoryArgs) algorithm.FitPredicate {
|
||||
return predicates.NewTolerationMatchPredicate(args.NodeInfo)
|
||||
},
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -173,5 +181,14 @@ func defaultPriorities() sets.String {
|
||||
Weight: 1,
|
||||
},
|
||||
),
|
||||
factory.RegisterPriorityConfigFactory(
|
||||
"TaintTolerationPriority",
|
||||
factory.PriorityConfigFactory{
|
||||
Function: func(args factory.PluginFactoryArgs) algorithm.PriorityFunction {
|
||||
return priorities.NewTaintTolerationPriority(args.NodeLister)
|
||||
},
|
||||
Weight: 1,
|
||||
},
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user