Repository navigation
Closed
Labels
Description
Description:
This is a follow-up to #9105, which was fixed by #9192 and released in Envoy Gateway v1.9.0.
In v1.9.0, hostname conflict precedence between two ListenerSet resources is now reported correctly:
- The older ListenerSet remains
Accepted=True,Programmed=True, andConflicted=False. - The newer conflicting ListenerSet becomes
Accepted=False,Programmed=False, andConflicted=True.
However, an HTTPRoute whose parentRef points to the older, non-conflicted ListenerSet becomes Accepted=False after the conflicting ListenerSet is created.
The winning ListenerSet also changes from attachedRoutes: 1 to attachedRoutes: 0.
Expected behavior:
- The older ListenerSet remains accepted and programmed.
- Its existing HTTPRoute remains
Accepted=True. - Its listener continues reporting
attachedRoutes: 1. - Creating the losing ListenerSet does not interrupt traffic through the winning ListenerSet.
Actual behavior:
- The older ListenerSet remains accepted and non-conflicted.
- Its listener changes to
attachedRoutes: 0. - The HTTPRoute changes to
Accepted=Falsewith reasonNoMatchingListenerHostname. - The route is removed from the generated configuration.
Repro steps:
- Create a Gateway that permits ListenerSet attachment:
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: envoy-gateway
namespace: envoy-gateway-system
spec:
gatewayClassName: envoy-gateway
allowedListeners:
namespaces:
from: All
listeners:
- name: http
protocol: HTTP
port: 80
allowedRoutes:
namespaces:
from: All- Create the first ListenerSet:
apiVersion: gateway.networking.k8s.io/v1
kind: ListenerSet
metadata:
name: listenerset-a
namespace: example
spec:
parentRef:
group: gateway.networking.k8s.io
kind: Gateway
name: envoy-gateway
namespace: envoy-gateway-system
listeners:
- name: example-com
hostname: example.com
port: 443
protocol: HTTPS
allowedRoutes:
namespaces:
from: Same- Create an HTTPRoute referring to the first ListenerSet:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: route-a
namespace: example
spec:
hostnames:
- example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: ListenerSet
name: listenerset-a
rules:
- backendRefs:
- group: ""
kind: Service
name: example
port: 80
matches:
- path:
type: PathPrefix
value: /- Verify the initial state:
ListenerSet listenerset-a:
Accepted=True
Programmed=True
listener Conflicted=False
attachedRoutes=1
HTTPRoute route-a:
Accepted=True
- Create a newer ListenerSet with the same port and hostname:
apiVersion: gateway.networking.k8s.io/v1
kind: ListenerSet
metadata:
name: listenerset-b
namespace: example
spec:
parentRef:
group: gateway.networking.k8s.io
kind: Gateway
name: envoy-gateway
namespace: envoy-gateway-system
listeners:
- name: example-com-conflict
hostname: example.com
port: 443
protocol: HTTPS
allowedRoutes:
namespaces:
from: Same- Observe that ListenerSet precedence is correct:
listenerset-a:
Accepted=True
Programmed=True
Conflicted=False
attachedRoutes=0
listenerset-b:
Accepted=False
Programmed=False
Conflicted=True
reason=HostnameConflict
attachedRoutes=0
- Observe that the HTTPRoute attached to listenerset-a is rejected:
conditions:
- message: There were no hostname intersections between the HTTPRoute and this parent ref's Listener(s).
reason: NoMatchingListenerHostname
status: "False"
type: Accepted
- message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
The HTTPRoute spec and the winning listener both use the same hostname, example.com, so NoMatchingListenerHostname is unexpected.
Environment:
- Envoy Gateway: v1.9.0
- Envoy Proxy: v1.39.0
- Kubernetes: v1.34.9-eks-8f14419
Reacted by Dag Andersen and zirain
Activity
TheisFerre commentedon Aug 26, 2026
Hey @zirain and @zhaohuabing - just a friendly ping
This is a blocker for us currently.