|
1 | 1 | # KEP: Topology Aware Hints
|
2 | 2 | <!-- toc -->
|
3 | 3 | - [Release Signoff Checklist](#release-signoff-checklist)
|
| 4 | +- [IMPORTANT: Scope Reduction (Feb 2025)](#important-scope-reduction-feb-2025) |
4 | 5 | - [Summary](#summary)
|
5 | 6 | - [Motivation](#motivation)
|
6 | 7 | - [Goals](#goals)
|
7 | 8 | - [Non-Goals](#non-goals)
|
8 | 9 | - [Proposal](#proposal)
|
9 | 10 | - [Risks and Mitigations](#risks-and-mitigations)
|
10 | 11 | - [Design Details](#design-details)
|
| 12 | + - [API](#api) |
| 13 | + - [Future API Expansion](#future-api-expansion) |
11 | 14 | - [Configuration](#configuration)
|
12 | 15 | - [Interoperability](#interoperability)
|
13 | 16 | - [Feature Gate](#feature-gate)
|
14 |
| - - [API](#api) |
15 |
| - - [Future API Expansion](#future-api-expansion) |
16 | 17 | - [Kube-Proxy](#kube-proxy)
|
17 | 18 | - [EndpointSlice Controller](#endpointslice-controller)
|
18 | 19 | - [Heuristics](#heuristics)
|
@@ -65,15 +66,42 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
|
65 | 66 | - [x] (R) Graduation criteria is in place
|
66 | 67 | - [x] (R) Production readiness review completed
|
67 | 68 | - [x] (R) Production readiness review approved
|
68 |
| -- [ ] "Implementation History" section is up-to-date for milestone |
69 |
| -- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io] |
70 |
| -- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes |
| 69 | +- [X] "Implementation History" section is up-to-date for milestone |
| 70 | +- [X] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io] |
| 71 | +- [X] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes |
71 | 72 |
|
72 | 73 | [kubernetes.io]: https://kubernetes.io/
|
73 | 74 | [kubernetes/enhancements]: https://git.k8s.io/enhancements
|
74 | 75 | [kubernetes/kubernetes]: https://git.k8s.io/kubernetes
|
75 | 76 | [kubernetes/website]: https://git.k8s.io/website
|
76 | 77 |
|
| 78 | +## IMPORTANT: Scope Reduction (Feb 2025) |
| 79 | + |
| 80 | +This KEP's GA scope has been significantly reduced. While originally the KEP |
| 81 | +proposed both the `hints` field in `EndpointSlice` *and* a topology-aware |
| 82 | +routing implementation using Service annotation |
| 83 | +`service.kubernetes.io/topology-mode=Auto`, *only the `hints` field is being |
| 84 | +graduated to GA*. The topology-aware routing aspects, including the |
| 85 | +`service.kubernetes.io/topology-mode` annotation and associated heuristics, are |
| 86 | +not part of this GA release. |
| 87 | + |
| 88 | +The following sections of this KEP are provided for historical context and to |
| 89 | +explain the rationale behind the `hints` field. The reason the entire KEP has |
| 90 | +not been updated is to maintain this valuable context. While other sections of |
| 91 | +this KEP remain, they have not been updated to fully reflect this scope |
| 92 | +reduction and should be considered in that light. Much of the content, including |
| 93 | +aspects of the Production Readiness Review, remains applicable as significant |
| 94 | +portions of the original implementation are still in use and will graduate to GA |
| 95 | +separately (through other KEPs, with their own Production Readiness Review), |
| 96 | +even though only the API change (the `hints` field itself) is graduating through |
| 97 | +this KEP. |
| 98 | + |
| 99 | +For current active plans on topology-aware routing solutions, please refer to the |
| 100 | +following KEPs: |
| 101 | + |
| 102 | + * https://kep.k8s.io/4444 |
| 103 | + * https://kep.k8s.io/3015 |
| 104 | + |
77 | 105 | ## Summary
|
78 | 106 |
|
79 | 107 | Kubernetes clusters are increasingly deployed in multi-zone environments but
|
@@ -132,9 +160,10 @@ for most use cases.
|
132 | 160 | - Ensuring that Pods are distributed evenly across zones.
|
133 | 161 |
|
134 | 162 | ## Proposal
|
| 163 | + |
135 | 164 | This KEP describes two related concepts:
|
136 | 165 |
|
137 |
| -1. A way to express the heuristic you'd like to use for Topology Aware Routing. |
| 166 | +1. (Not graduating to GA; see [scope reduction](#important-scope-reduction-feb-2025)) A way to express the heuristic you'd like to use for Topology Aware Routing. |
138 | 167 | 2. A new Hints field in EndpointSlices that can be used to enable certain
|
139 | 168 | topology heuristics.
|
140 | 169 |
|
@@ -194,33 +223,6 @@ with a new Service annotation.
|
194 | 223 |
|
195 | 224 | ## Design Details
|
196 | 225 |
|
197 |
| -### Configuration |
198 |
| - |
199 |
| -A new `service.kubernetes.io/topology-mode` annotation can be used to enable or |
200 |
| -disable Topology Aware Routing heuristics for a Service. |
201 |
| - |
202 |
| -The previous `service.kubernetes.io/topology-aware-hints` annotation will |
203 |
| -continue to be supported as a means of configuring this feature for both "Auto" |
204 |
| -and "Disabled" values. New values will only be supported by the new annotation. |
205 |
| - |
206 |
| -### Interoperability |
207 |
| - |
208 |
| -Topology hints will be ignored if the TopologyKeys field has at least one entry. |
209 |
| -This field is deprecated and will be removed soon. |
210 |
| - |
211 |
| -Both ExternalTrafficPolicy and InternalTrafficPolicy will be given precedence |
212 |
| -over topology aware routing. For example, if `ExternalTrafficPolicy=Local` and |
213 |
| -topology was enabled, external traffic would be routed using the |
214 |
| -ExternalTrafficPolicy configuration while internal traffic would be routed with |
215 |
| -topology. |
216 |
| - |
217 |
| -### Feature Gate |
218 |
| - |
219 |
| -This functionality will be guarded by the `TopologyAwareHints` feature gate. |
220 |
| -This gate also interacts with 2 other feature gates: |
221 |
| -- It is dependent on the `ServiceTrafficPolicy` feature gate. |
222 |
| -- It is not compatible with the deprecated `ServiceTopology` feature gate. |
223 |
| - |
224 | 226 | ### API
|
225 | 227 |
|
226 | 228 | A new `EndpointHints` struct would be added to the `EndpointSlice.Endpoint`
|
@@ -271,6 +273,44 @@ Additionally we could easily expand this API to include support for region
|
271 | 273 | hints. Although it is unclear if either expansion will be necessary, the API is
|
272 | 274 | designed in a way to make expansions straightforward.
|
273 | 275 |
|
| 276 | +``` |
| 277 | + |
| 278 | ++---------------------------------- IMPORTANT -------------------------------------+ |
| 279 | +| | |
| 280 | +| NOTE: The remaining design proposals described in this KEP will not graduate to | |
| 281 | +| GA. For more information, see the scope reduction details a the beginning of the | |
| 282 | +| KEP. | |
| 283 | +| | |
| 284 | ++----------------------------------------------------------------------------------+ |
| 285 | + |
| 286 | +``` |
| 287 | +### Configuration |
| 288 | + |
| 289 | +A new `service.kubernetes.io/topology-mode` annotation can be used to enable or |
| 290 | +disable Topology Aware Routing heuristics for a Service. |
| 291 | + |
| 292 | +The previous `service.kubernetes.io/topology-aware-hints` annotation will |
| 293 | +continue to be supported as a means of configuring this feature for both "Auto" |
| 294 | +and "Disabled" values. New values will only be supported by the new annotation. |
| 295 | + |
| 296 | +### Interoperability |
| 297 | + |
| 298 | +Topology hints will be ignored if the TopologyKeys field has at least one entry. |
| 299 | +This field is deprecated and will be removed soon. |
| 300 | + |
| 301 | +Both ExternalTrafficPolicy and InternalTrafficPolicy will be given precedence |
| 302 | +over topology aware routing. For example, if `ExternalTrafficPolicy=Local` and |
| 303 | +topology was enabled, external traffic would be routed using the |
| 304 | +ExternalTrafficPolicy configuration while internal traffic would be routed with |
| 305 | +topology. |
| 306 | + |
| 307 | +### Feature Gate |
| 308 | + |
| 309 | +This functionality will be guarded by the `TopologyAwareHints` feature gate. |
| 310 | +This gate also interacts with 2 other feature gates: |
| 311 | +- It is dependent on the `ServiceTrafficPolicy` feature gate. |
| 312 | +- It is not compatible with the deprecated `ServiceTopology` feature gate. |
| 313 | + |
274 | 314 | ### Kube-Proxy
|
275 | 315 |
|
276 | 316 | When the `TopologyAwareHints` feature gate is enabled, Kube-Proxy will be
|
@@ -590,13 +630,19 @@ completeness.
|
590 | 630 | - Tests expanded to include e2e coverage described above.
|
591 | 631 |
|
592 | 632 | **GA:**
|
593 |
| -- Feedback from real world usage shows that feature is working as intended |
594 |
| -- Events are triggered on each Service to provide users with clear information |
595 |
| - on when the feature transitioned between enabled and disabled states. |
| 633 | +- Feedback from real world usage shows that feature is working as intended (i.e., the `hints` field is functioning correctly). |
596 | 634 | - Test coverage in EndpointSlice strategy to ensure that the Hints field is
|
597 | 635 | dropped when the feature gate is not enabled.
|
598 | 636 | - Test coverage in EndpointSlice controller for the transition from enabled to
|
599 | 637 | disabled.
|
| 638 | + |
| 639 | +**[Deprecated] GA:** |
| 640 | + |
| 641 | +The following points were originally considered for GA but are *not* part of |
| 642 | +this KEP's GA release (see [scope reduction](#important-scope-reduction-feb-2025)): |
| 643 | + |
| 644 | +- Events are triggered on each Service to provide users with clear information |
| 645 | + on when the feature transitioned between enabled and disabled states. |
600 | 646 | - Ensure that existing Topology Hints e2e test runs as a presubmit if any code
|
601 | 647 | changes in kube-proxy or the EndpointSlice controller.
|
602 | 648 | - Autoscaling and Scheduling SIGs have a plan to provide zone aware autoscaling
|
@@ -776,6 +822,7 @@ enabled even if the annotation has been set on the Service.
|
776 | 822 | - Alpha release: Kubernetes 1.21
|
777 | 823 | - Beta Release: Kubernetes 1.23[^1]
|
778 | 824 | - Feature Gate on-by default, feature available by default: 1.24
|
| 825 | +- KEP Graduates to GA in 1.33 with [reduced scope](#important-scope-reduction-feb-2025) |
779 | 826 |
|
780 | 827 | [^1]: This was intended to also flip the feature gate to enabled by default, but
|
781 | 828 | unfortunately that part was missed in 1.23. See
|
|
0 commit comments