-
Notifications
You must be signed in to change notification settings - Fork 715
Stale listener condition present in Gateway for a non-existing Listener #773
Copy link
Copy link
Closed
Labels
good first issueGood for newcomersGood for newcomerskind/bugSomething isn't workingSomething isn't workingpriority/mediumLabel used to express the "medium" priority levelLabel used to express the "medium" priority level
Milestone
Description
Description:
Following the reproduction steps, it is seen that the Gateway is left with a stale listener condition, for a listener
that no longer exists.
Repro steps:
- apply
examples/kubernetes/quickstart.yaml- ensure that Gateway has proper Status conditions, with 1 listener condition
showingattachedRoutes: 1. - Add another listener in the gateway, for the listener spec to look something like this
listeners:
- allowedRoutes:
namespaces:
from: Same
name: http
port: 8080
protocol: HTTP
- allowedRoutes:
namespaces:
from: Same
name: http2
port: 8081
protocol: HTTP This should create 2 listener conditions, both specifying attachedRoutes: 1.
3. Remove the single HTTPRoute that was created by the quickstart.yaml. Both existing listener conditions are updated correctly, specifying attachedRoutes: 0.
4. Re-apply the quickstart.yaml which will "recreate" the HTTPRoute, and "update" the Gateway to have only one listener.
5. The bug is that - in the Gateway status still shows the stale listener Condition corresponding to listener http2 with attachedRoutes: 0
The spec and status thus looks like this
spec:
gatewayClassName: eg
listeners:
- allowedRoutes:
namespaces:
from: Same
name: http
port: 8080
protocol: HTTP
status:
....
conditions:
....
listeners:
- attachedRoutes: 1
conditions:
- lastTransitionTime: "2022-12-03T06:58:58Z"
message: Listener is ready
observedGeneration: 3
reason: Ready
status: "True"
type: Ready
name: http
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
- attachedRoutes: 0
conditions:
- lastTransitionTime: "2022-12-03T06:58:48Z"
message: Listener is ready
observedGeneration: 2
reason: Ready
status: "True"
type: Ready
name: http2
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRouteReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerskind/bugSomething isn't workingSomething isn't workingpriority/mediumLabel used to express the "medium" priority levelLabel used to express the "medium" priority level