Skip to content

xRoutes do not report possible conflicts #4303

@rikatz

Description

@rikatz

This story/bug/feature enhancement request is about a bad UX I had while testing some scenarios of conflicts.

After creating a Gateway and attaching two equal similar routes to the Gateway, as a user I have no report that something may be wrong. This leads to a misunderstanding of why my routes are not working (or are working but giving me wrong answers), as there's no sign of my route not being the one really programmed on the proxy.

Let's take a look into the following manifest:

---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: gateway
spec:
  gatewayClassName: someclass
  listeners:
  - name: default
    port: 80
    protocol: HTTP
    allowedRoutes:
      namespaces:
        from: All
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: echo
  namespace: user1
spec:
  parentRefs:
  - name: gateway
  hostnames: ["some.example.tld"]
  rules:
  - matches:
    - path:
        type: Exact
        value: /
    backendRefs:
    - name: echo
      port: 3000
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: echo
  namespace: user2
spec:
  parentRefs:
  - name: gateway
  hostnames: ["some.example.tld"]
  rules:
  - matches:
    - path:
        type: Exact
        value: /
    backendRefs:
    - name: echo
      port: 3000

Once applied, both users from namespaces user1 and user2 will be expecting that a curl to "http://some.example.tld" would return their backend, but just user1 will get the right answer, while user2 will have the feeling that everything is working fine, but the app is misbehaving and returning something different.

Why?

Because the status of both routes never let any of them know that one of the routes wasn't really programmed. Looking at the status of both, they have the same answer:

status:
  parents:
  - conditions:
    - lastTransitionTime: "2025-12-02T18:13:39Z"
      message: Route is accepted
      observedGeneration: 2
      reason: Accepted
      status: "True"
      type: Accepted
    - lastTransitionTime: "2025-12-02T18:13:39Z"
      message: Resolved all the Object references for the Route
      observedGeneration: 2
      reason: ResolvedRefs
      status: "True"
      type: ResolvedRefs

Once the older route is deleted, the new one starts working.

So we need to start providing some more information for users when a route was properly programmed or not, and why it may not have been programmed (eg.: conflicted)

Tested implementations

The situation above was tested and confirmed with:

  • Envoy Gateway 1.5.0
  • Istio (1.29-alpha.d16be7b7a857b66a7a633f4b532c89b8428b485a)
  • Cilium 1.18.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions