You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[An alternative definition of <code>PreferClose</code>](#an-alternative-definition-of-preferclose)
48
51
-[Repurpose the existing topology annotation to recognize additional values](#repurpose-the-existing-topology-annotation-to-recognize-additional-values)
49
52
-[Reuse the fields internal/externalTrafficPolicy to offer these routing preferences](#reuse-the-fields-internalexternaltrafficpolicy-to-offer-these-routing-preferences)
@@ -70,20 +73,20 @@ checklist items _must_ be updated for the enhancement to be released.
70
73
71
74
Items marked with (R) are required *prior to targeting to a milestone / release*.
72
75
73
-
-[] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
74
-
-[] (R) KEP approvers have approved the KEP status as `implementable`
75
-
-[] (R) Design details are appropriately documented
76
-
-[] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
77
-
-[] e2e Tests for all Beta API Operations (endpoints)
78
-
-[] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
79
-
-[] (R) Minimum Two Week Window for GA e2e tests to prove flake free
80
-
-[] (R) Graduation criteria is in place
81
-
-[] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
82
-
-[] (R) Production readiness review completed
83
-
-[] (R) Production readiness review approved
84
-
-[] "Implementation History" section is up-to-date for milestone
85
-
-[] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
86
-
-[] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
76
+
-[X] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
77
+
-[X] (R) KEP approvers have approved the KEP status as `implementable`
78
+
-[X] (R) Design details are appropriately documented
79
+
-[X] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
80
+
-[X] e2e Tests for all Beta API Operations (endpoints)
81
+
-[X] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
82
+
-[X] (R) Minimum Two Week Window for GA e2e tests to prove flake free
83
+
-[X] (R) Graduation criteria is in place
84
+
-[X] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
85
+
-[X] (R) Production readiness review completed
86
+
-[X] (R) Production readiness review approved
87
+
-[X] "Implementation History" section is up-to-date for milestone
88
+
-[X] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
89
+
-[X] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
87
90
88
91
<!--
89
92
**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.
@@ -196,7 +199,7 @@ such a preference in future refinements.
196
199
***Immediate Support for All Possible Heuristics:** The initial implementation
197
200
focuses on a core set of heuristics. Addition of new heuristics (like
198
201
`Local` for Node local preference) could be explored in future
199
-
refinements.
202
+
refinements. (See https://kep.k8s.io/3015)
200
203
201
204
## Proposal
202
205
@@ -206,11 +209,12 @@ while making routing decisions. It does not offer strict routing guarantees.
206
209
207
210
The field will support the following initial values:
208
211
212
+
*`PreferClose`: Indicates a preference for routing traffic to endpoints in
213
+
the same zone as the client.
209
214
210
-
*`PreferClose`: Indicates a preference for routing traffic to endpoints that
211
-
are topologically proximate to the client. The interpretation of
212
-
"topologically proximate" may vary across implementations and could encompass
213
-
endpoints within the same node, rack, zone, or even region.
215
+
(For background on the name `PreferClose` and its definition, see the "[An
The absence of a value indicates no specific routing preference. In this case,
216
220
the user delegates the routing decision to the implementation, allowing it to
@@ -220,17 +224,6 @@ Implementations SHOULD support the standard values. While some flexibility in
220
224
interpretation is permitted, implementations should aim to align their behavior
221
225
with the described intent of these preferences as closely as possible.
222
226
223
-
NOTE: Implementations reserve the right to refine the behavior associated with
224
-
any heuristic, including standard heuristics. This means the behavior enabled
225
-
by values such as `PreferClose` might evolve over time, and some
226
-
evolutions might interpret the heuristic goals slightly differently. For
227
-
example, in the case of `PreferClose`, an implementation might initially route
228
-
traffic within the zone without considering endpoint overload, while a future
229
-
refinement could introduce feedback mechanisms to detect overload and route
230
-
traffic outside the zone when necessary, optimizing overall performance. The
231
-
decision of what constitutes an "improvement" remains at the discretion of the
232
-
implementation.
233
-
234
227
### User Stories
235
228
236
229
#### Story 1
@@ -312,8 +305,10 @@ the value configured for `trafficDistribution`
312
305
313
306
#### `PreferClose`
314
307
***Meaning:** Attempts to route traffic to endpoints within the same zone as
315
-
the client. If no endpoints are available within the zone, traffic would be
316
-
routed to other zones.
308
+
the client. A zone represents a logical failure domain and has the same
309
+
meaning as in the well-known label `topology.kubernetes.io/zone`. If no
310
+
endpoints are available within the zone, traffic would be routed to other
311
+
zones.
317
312
* This preference will be implemented by the use of Hints within EndpointSlices.
318
313
* We already use Hints to implement `service.kubernetes.io/topology-mode: Auto`
319
314
In a similar manner, the EndpointSlice controller will now also populate hints
@@ -363,8 +358,6 @@ NOTE: The expectation remains that *all* endpoints within an EndpointSlice must
363
358
Aware
364
359
Hints](https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/2433-topology-aware-hints/README.md#kube-proxy), i.e. _"This is to provide safer transitions between enabled and disabled states. Without this fallback, endpoints could easily get overloaded as hints were being added or removed from some EndpointSlices but had not yet propagated to all of them."_
365
360
366
-
<<[UNRESOLVED Name for the field is being discussed]>>
367
-
368
361
### Choice of field name
369
362
The name `trafficDistribution` is meant to capture the highly
370
363
implementation-specific nature of this field and how it affects the routing of
@@ -387,8 +380,6 @@ traffic
387
380
so as not to confuse with the actual process of selecting the complete set of
388
381
pods backing a service.
389
382
390
-
<<[/UNRESOLVED]>>
391
-
392
383
### Intersection with internal/externalTrafficPolicy
393
384
394
385
The intersection of the field with `internalTrafficPolicy` and
@@ -462,6 +453,10 @@ The following packages will also see minor changes:
462
453
and field `trafficDistribution: PreferClose` are configured, precedence is given to
463
454
the annotation.
464
455
456
+
Link to tests: https://github.com/kubernetes/kubernetes/blob/69ab91a5c59617872c9f48737c64409a9dec2957/test/integration/service/service_test.go#L292-L652
457
+
458
+
Link to k8s-triage: https://storage.googleapis.com/k8s-triage/index.html?sig=network&test=service_test
459
+
465
460
##### e2e tests
466
461
467
462
* Verify that EndpointSlice hints are correctly populated when
@@ -471,12 +466,44 @@ The following packages will also see minor changes:
471
466
requests originating from zones with no service pods, requests should not get
472
467
blackholed and should rather be forwarded to any service pod from the cluster.
0 commit comments