Don't require failureDomains in PodAffinityChecker

failureDomains are only used for PreferredDuringScheduling pod
anti-affinity, which is ignored by PodAffinityChecker.
This unnecessary requirement was making it hard to move
PodAffinityChecker to GeneralPredicates because that would require
passing --failure-domains to both kubelet and kube-controller-manager.
This commit is contained in:
Ivan Shvedunov
2016-10-11 16:31:47 +03:00
parent 6b9a944285
commit d40a8f3279
5 changed files with 29 additions and 24 deletions

View File

@@ -139,7 +139,7 @@ func defaultPredicates() sets.String {
factory.RegisterFitPredicateFactory(
"MatchInterPodAffinity",
func(args factory.PluginFactoryArgs) algorithm.FitPredicate {
return predicates.NewPodAffinityPredicate(args.NodeInfo, args.PodLister, args.FailureDomains)
return predicates.NewPodAffinityPredicate(args.NodeInfo, args.PodLister)
},
),