• Wei Huang's avatar
    fix PodAntiAffinity issues · 74905421
    Wei Huang authored
    - update logic of verifying incoming pod's anti-affinity
    - rename podMatchesAffinityTermProperties to podMatchesAllAffinityTermProperties
    - add podMatchesAnyAffinityTermProperties which is used in some PodAntiAffinity cases
    - rename some functions to make it more readable
    - add unit tests to verify correctness of PodAffinity and PodAntiAffinity
      - verifying "Existing pod anti-affinity"
      - verifying "incoming pod's anti-affinity"
      - verifying "incoming pod's affinity"
    74905421
metadata_test.go 25.9 KB