Skip to content

feature: Add support to opt-out from zone aware routing via Ingress/RouteGroup#4049

Open
greeshma1196 wants to merge 5 commits into
masterfrom
opt-out/zone-aware-routing
Open

feature: Add support to opt-out from zone aware routing via Ingress/RouteGroup#4049
greeshma1196 wants to merge 5 commits into
masterfrom
opt-out/zone-aware-routing

Conversation

@greeshma1196

@greeshma1196 greeshma1196 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Introduce the annotation zalando.org/traffic-zone-aware: "false" on Ingress and RouteGroup resources. When set, the resource receives all endpoints across all zones, bypassing zone filtering both at the dataclient layer (endpoint fetch) and at the routesrv layer (per-zone route serving).

Usage:

metadata:
  annotations:
    zalando.org/traffic-zone-aware: "false"

Tasks

  1. Define zalando.org/traffic-zone-aware annotation constant in the kubernetes package
  2. Extend eskip.Route with EnableZoneAwareness field to carry the annotation value through the route pipeline to routesrv
  3. Modify GetEndpointSlicesByService and GetEndpointSlicesByTarget in clusterstate.go to accept zoneAwareTraffic param and skip zone filtering when value is "false"
  4. Modify Ingress v1 path rule conversion (convertPathRuleV1) and default backend conversion (convertDefaultBackendV1) to read the annotation, pass it to endpoint fetch, and set r.EnableZoneAwareness
  5. Modify RouteGroup backend application (applyServiceBackend) to read the annotation, pass it to endpoint fetch, and set r.EnableZoneAwareness
  6. Modify getRouteForZone in routesrv/polling.go to return the route unmodified when EnableZoneAwareness == "false"
  7. Add integration test with two Ingresses in zone eu-central-1a: one opted out (expects all endpoints across zones), one default (expects only zone-local endpoints)
  8. Add unit tests for filterRoutesByZone covering opt-out scenarios: both routes opted out, opt-out mixed with normal route, and opt-out with a below-threshold zone

ref: #3971

Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
@greeshma1196 greeshma1196 added the minor no risk changes, for example new filters label Jun 4, 2026
Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
@szuecs szuecs changed the title Add support for annotation to opt-out from zone aware routing feature: Add support for annotation to opt-out from zone aware routing Jun 4, 2026
Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
@greeshma1196 greeshma1196 requested review from MustafaSaber and szuecs and removed request for MustafaSaber June 4, 2026 14:58
@greeshma1196 greeshma1196 changed the title feature: Add support for annotation to opt-out from zone aware routing feature: Add support to opt-out from zone aware routing via Ingress/RouteGroup Jun 4, 2026
- add missing test covering defaultBackend + opt-out
- change EnableZoneAwareness from string to bool

Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
Comment thread eskip/eskip.go
LBEndpoints []*LBEndpoint

// DisableZoneAwareness indicates that the route should not be processed with zone awareness.
DisableZoneAwareness bool

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good idea to have it in eskip.
It has nothing to do with the language.

@szuecs

szuecs commented Jun 6, 2026

Copy link
Copy Markdown
Member

In general I think we might want to pass the new filter through the ingress context and routegroup context instead of a parameter of a function. The parameter feels disconnected to the other.

@greeshma1196

Copy link
Copy Markdown
Collaborator Author

@szuecs If we pass the annotation through ingress/routegroup context, RouteSRV still needs to know whether to filter this route or not. In order for that to work we need to set a field within the Route struct.
But maybe if it is a filter we can reference route.Filters to check if the disableZoneAwareness() is set. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor no risk changes, for example new filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants