This PR improves the pod Affinity/Anti-affinity performance.
Currently we process pod by pod for all pods having pod affinity/anti-affinity. With this change we group pods that can be processed together and separate other pods that need to be processed one by one. This is done before scheduling by analysing the Affinity/Anti-affinity conflicts among pods and grouping into sets of pods that can be processed together. The pod that do not have conflict with other pods can be processed in batch with those pods and the pods that have conflict with all other pods shall be processed one by one. So lesser the affinity/anti-affinity conflicts among pending pods better is the performance of scheduling.
This PR improves the pod
Affinity/Anti-affinity
performance. Currently we process pod by pod for all pods having pod affinity/anti-affinity. With this change we group pods that can be processed together and separate other pods that need to be processed one by one. This is done before scheduling by analysing theAffinity/Anti-affinity
conflicts among pods and grouping into sets of pods that can be processed together. The pod that do not have conflict with other pods can be processed in batch with those pods and the pods that have conflict with all other pods shall be processed one by one. So lesser the affinity/anti-affinity conflicts among pending pods better is the performance of scheduling.