Commit 59ad9a30 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #36060 from resouer/fix-service-affinity

Automatic merge from submit-queue Add use case to service affinity Also part of nits in refactoring predicates, I found the explanation of `serviceaffinity` in its comment is very hard to understand. So I added example instead here to help user/developer to digest it.
parents d9aed2c5 a0e836a3
...@@ -737,6 +737,11 @@ func NewServiceAffinityPredicate(podLister algorithm.PodLister, serviceLister al ...@@ -737,6 +737,11 @@ func NewServiceAffinityPredicate(podLister algorithm.PodLister, serviceLister al
// the same service are running on nodes with // the same service are running on nodes with
// the exact same ServiceAffinity.label values). // the exact same ServiceAffinity.label values).
// //
// For example:
// If the first pod of a service was scheduled to a node with label "region=foo",
// all the other subsequent pods belong to the same service will be schedule on
// nodes with the same "region=foo" label.
//
// Details: // Details:
// //
// If (the svc affinity labels are not a subset of pod's label selectors ) // If (the svc affinity labels are not a subset of pod's label selectors )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment