Skip to content

Support using xPolicies with routes that attach to ListenerSets #9242

Closed

Description

@eplightning

Description:
Currently (v1.8.1) attaching policies to routes that attach to ListenerSet instead of Gateway doesn't work. The policies get ignored - they don't have their status fields set and they don't affect anything (double-checked by dumping and verifying xDS).

Example that doesn't work:

---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  namespace: envoy-gateway
  name: gateway-1
spec:
  gatewayClassName: envoy-gateway-class
  listeners:
    - name: http
      protocol: HTTP
      port: 80
      allowedRoutes:
        namespaces:
          from: All
  allowedListeners:
    namespaces:
      from: All
---
apiVersion: gateway.networking.k8s.io/v1
kind: ListenerSet
metadata:
  namespace: default
  name: listener-1
spec:
  parentRef:
    name: gateway-1
    namespace: envoy-gateway
  listeners:
    - name: extra-http-one
      protocol: HTTP
      port: 8081
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  namespace: default
  name: httproute-1
spec:
  hostnames:
    - gateway.envoyproxy.io
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: ListenerSet
      name: listener-1
  rules:
    - matches:
        - path:
            value: "/http1"
      backendRefs:
        - name: service-1
          port: 8080
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
  namespace: default
  name: policy-for-httproute-1
spec:
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      name: httproute-1
  requestBuffer:
    limit: 4Mi

Activity

  1. added
    kind/bug
    and removed on Jun 23, 2026
  2. thannaske commented on Jul 17, 2026

    @thannaske

    Just encountered that very issue and spent an hour confirming that I'm not stupid or something 😅 Great to see that there's already a good bit of progress going on. Thanks a lot to all involved!

  3. github-actions commented on Aug 16, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

  4. thannaske commented on Aug 16, 2026

    @thannaske

    Not stale, from my understanding this has been fixed with #8092 in v1.9.0-rc.1

  5. github-actions commented on Sep 15, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

  6. zirain commented on Nov 10, 2026

    @zirain
    Member

    closed this since #8092 landed in v1.9, feel free to reopen.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions