From a0e836a378967d2d046f1b21ef748241dba7a857 Mon Sep 17 00:00:00 2001 From: Harry Zhang Date: Wed, 2 Nov 2016 05:17:35 -0400 Subject: [PATCH] Add use case to service affinity --- plugin/pkg/scheduler/algorithm/predicates/predicates.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index ab8ce5ad16d..60605cc0f7d 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -715,6 +715,11 @@ func NewServiceAffinityPredicate(podLister algorithm.PodLister, serviceLister al // the same service are running on nodes with // 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: // // If (the svc affinity labels are not a subset of pod's label selectors )