Skip to content

Commit 4ef427b

Browse files
fixup! fixup! fixup! fixup! fixup! fixup! fixup! Add KEP 4444: Routing Preference for Services
1 parent e26d59d commit 4ef427b

File tree

1 file changed

+69
-60
lines changed
  • keps/sig-network/4444-service-routing-preference

1 file changed

+69
-60
lines changed

keps/sig-network/4444-service-routing-preference/README.md

Lines changed: 69 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@
1313
- [Story 1](#story-1)
1414
- [Story 2](#story-2)
1515
- [Story 3](#story-3)
16-
- [Story 4](#story-4)
1716
- [Notes/Constraints/Caveats](#notesconstraintscaveats)
1817
- [Risks and Mitigations](#risks-and-mitigations)
1918
- [Design Details](#design-details)
2019
- [Standard Heuristic Implementation (kube-proxy dataplane)](#standard-heuristic-implementation-kube-proxy-dataplane)
2120
- [<code>Default</code>](#default)
2221
- [<code>Close</code>](#close)
2322
- [Changes within kube-proxy](#changes-within-kube-proxy)
24-
- [Status Reporting](#status-reporting)
25-
- [Condition usage by other implementations](#condition-usage-by-other-implementations)
2623
- [Choice of field name](#choice-of-field-name)
2724
- [Intersection with internal/externalTrafficPolicy](#intersection-with-internalexternaltrafficpolicy)
2825
- [Test Plan](#test-plan)
@@ -34,6 +31,10 @@
3431
- [Alpha](#alpha)
3532
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
3633
- [Version Skew Strategy](#version-skew-strategy)
34+
- [Possible future expansions](#possible-future-expansions)
35+
- [Status Reporting](#status-reporting)
36+
- [Condition usage by other implementations](#condition-usage-by-other-implementations)
37+
- [Implementation specific heuristics](#implementation-specific-heuristics)
3738
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
3839
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
3940
- [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
@@ -218,10 +219,6 @@ Implementations SHOULD support the standard values. While some flexibility in
218219
interpretation is permitted, implementations should aim to align their behavior
219220
with the described intent of these preferences as closely as possible.
220221

221-
Implementations may support additional routing heuristics using values of the
222-
form `<domain>/<heuristicName>`. Heuristics without a domain prefix will be
223-
reserved for potential future standardization.
224-
225222
NOTE: Implementations reserve the right to refine the behavior associated with
226223
any heuristic, including standard heuristics. This means the behavior enabled
227224
by values such as `Default` or `Close` might evolve over time, and some
@@ -268,16 +265,6 @@ NOTE: Implementations reserve the right to refine the behavior associated with
268265
implementation. This simplifies their deployment process and reduces the
269266
complexity of managing cross-cluster applications.
270267

271-
#### Story 4
272-
* **Requirement:** I have some other precise preferences for how traffic should
273-
be routed, and I know that my chosen implementation supports the desired
274-
preference.
275-
* **Solution:** Set `routingPreference: <domain>/<heuristicName>` (where
276-
`<domain>` and `<heuristicName>` are provided by your implementation).
277-
* **Effect:** The Kubernetes implementation will apply the specified routing
278-
heuristic. It's important to note that the precise behavior of
279-
implementation-specific heuristics might vary.
280-
281268
### Notes/Constraints/Caveats
282269

283270
This proposal is our third attempt at an API revolving around such a
@@ -375,49 +362,6 @@ NOTE: The expectation remains that *all* endpoints within an EndpointSlice must
375362
Aware
376363
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."_
377364

378-
### Status Reporting
379-
380-
To provide clear status updates about the routing preferences to the user, the
381-
EndpointSlice controller (which is acting as the control plane) will update the
382-
Service status with the following conditions (inspired by Gateway API conditions)
383-
384-
* RoutingPreferenceAccepted
385-
* **Type:** `RoutingPreferenceAccepted`
386-
* **Description:**
387-
* Indicates whether a control plane component recognized and successfully
388-
parsed the `routingPreference` value. A `False` status typically suggests
389-
a configuration issue (e.g., an unsupported or malformed preference).
390-
* The EndpointSlice controller will set this status to `True` if it
391-
recognizes the `routingPreference` value as one it explicitly supports.
392-
393-
* RoutingPreferenceProgrammed
394-
* **Type:** `RoutingPreferenceProgrammed`
395-
* **Description:**
396-
* This condition indicates whether they `routingPreference` has generated
397-
some configuration that is assumed to be ready soon in the underlying data
398-
plane.
399-
* The EndpointSlice controller will set this status to `True` if it
400-
successfully populated the EndpointSlice hints based on the
401-
`routingPreference`.
402-
403-
Note that the EndpointSlice controller and kube-proxy implementation does not
404-
currently provide a condition denoting acknowledgment from the dataplane. In the
405-
future when this is possible, another condition like the following could be
406-
used:
407-
408-
* RoutingPreferenceHonored
409-
* **Type:** `RoutingPreferenceHonored`
410-
* **Description:** Confirms that the dataplane has received the hints,
411-
acknowledged them, and configured itself accordingly.
412-
413-
#### Condition usage by other implementations
414-
415-
Other implementations supporting `routingPreference` **should** adopt a domain
416-
prefixing strategy for their condition types. This means prefixing condition
417-
types with a domain string (e.g., `my.domain.io/RoutingPreferenceAccepted`) to
418-
prevent conflicts when multiple control planes (like the default EndpointSlice
419-
controller) are present.
420-
421365
<<[UNRESOLVED Name for the field is being discussed]>>
422366

423367
### Choice of field name
@@ -594,6 +538,71 @@ Version skews should naturally get handled as per the following behaviour.
594538
because if `routingPreference` is not set, kube-proxy would think it's set
595539
to the `Default` value.
596540

541+
## Possible future expansions
542+
543+
Based on user feedback, we **may** consider adding support for the following in
544+
future iterations.
545+
546+
### Status Reporting
547+
548+
To provide clear status updates about the routing preferences to the user, the
549+
EndpointSlice controller (which is acting as the control plane) will update the
550+
Service status with the following conditions (inspired by Gateway API conditions)
551+
552+
* RoutingPreferenceAccepted
553+
* **Type:** `RoutingPreferenceAccepted`
554+
* **Description:**
555+
* Indicates whether a control plane component recognized and successfully
556+
parsed the `routingPreference` value. A `False` status typically suggests
557+
a configuration issue (e.g., an unsupported or malformed preference).
558+
* The EndpointSlice controller will set this status to `True` if it
559+
recognizes the `routingPreference` value as one it explicitly supports.
560+
561+
* RoutingPreferenceProgrammed
562+
* **Type:** `RoutingPreferenceProgrammed`
563+
* **Description:**
564+
* This condition indicates whether they `routingPreference` has generated
565+
some configuration that is assumed to be ready soon in the underlying data
566+
plane.
567+
* The EndpointSlice controller will set this status to `True` if it
568+
successfully populated the EndpointSlice hints based on the
569+
`routingPreference`.
570+
571+
Note that the EndpointSlice controller and kube-proxy implementation does not
572+
currently provide a condition denoting acknowledgment from the dataplane. In the
573+
future when this is possible, another condition like the following could be
574+
used:
575+
576+
* RoutingPreferenceHonored
577+
* **Type:** `RoutingPreferenceHonored`
578+
* **Description:** Confirms that the dataplane has received the hints,
579+
acknowledged them, and configured itself accordingly.
580+
581+
#### Condition usage by other implementations
582+
583+
Other implementations supporting `routingPreference` **should** adopt a domain
584+
prefixing strategy for their condition types. This means prefixing condition
585+
types with a domain string (e.g., `my.domain.io/RoutingPreferenceAccepted`) to
586+
prevent conflicts when multiple control planes (like the default EndpointSlice
587+
controller) are present.
588+
589+
### Implementation specific heuristics
590+
591+
Implementations may support additional routing heuristics using values of the
592+
form `<domain>/<heuristicName>`. Heuristics without a domain prefix will be
593+
reserved for potential future standardization.
594+
595+
This can enable supporting the following user story:
596+
597+
* **Requirement:** I have some other precise preferences for how traffic should
598+
be routed, and I know that my chosen implementation supports the desired
599+
preference.
600+
* **Solution:** Set `routingPreference: <domain>/<heuristicName>` (where
601+
`<domain>` and `<heuristicName>` are provided by your implementation).
602+
* **Effect:** The Kubernetes implementation will apply the specified routing
603+
heuristic. It's important to note that the precise behavior of
604+
implementation-specific heuristics might vary.
605+
597606
## Production Readiness Review Questionnaire
598607

599608
### Feature Enablement and Rollback

0 commit comments

Comments
 (0)