envoyproxy/gateway

BackendTrafficPolicy ConsistentHash (SourceIP) not working for UDPRoute

Ouverte

#9 534 ouverte le 20 juil. 2026

 (3 commentaires) (0 réaction) (0 personne assignée)Go (802 forks)auto 404
help wantedkind/bug

Métriques du dépôt

Stars
 (2 871 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

Description:

When we change the load balancing policy in BackendTrafficPolicy to consistent hashing based on source IP (ConsistentHash + SourceIP), we notice that if it targets a UDPRoute, the traffic is not routed consistently by the source IP; instead, it still feels like it is being distributed randomly.

I wanted to check if this is a known limitation of the current Gateway API or our specific controller regarding the UDP protocol. Has anyone else run into a similar issue with UDP session persistence failing?

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
  creationTimestamp: "2026-07-20T14:37:19Z"
  generation: 3
  name: udp-policy
  namespace: test
  resourceVersion: "73853849"
  uid: 3005640b-8be2-4204-b128-a1ea74c38ade
spec:
  loadBalancer:
    consistentHash:
      tableSize: 65537
      type: SourceIP
    type: ConsistentHash
  targetRefs:
  - group: gateway.networking.k8s.io
    kind: UDPRoute
    name: route-udp-10000
status:
  ancestors:
  - ancestorRef:
      group: gateway.networking.k8s.io
      kind: Gateway
      name: test-1
      namespace: test
      sectionName: listener-udp-10000
    conditions:
    - lastTransitionTime: "2026-07-20T16:40:32Z"
      message: Policy has been accepted.
      observedGeneration: 3
      reason: Accepted
      status: "True"
      type: Accepted
    controllerName: gateway.envoyproxy.io/gatewayclass-controller

Guide contributeur