-
Notifications
You must be signed in to change notification settings - Fork 708
Description
Bug Report
Description
When an HTTPRoute (or any route) has multiple parent references pointing to different gateways managed by the same Envoy Gateway controller, only one parent reference gets its status updated in v1.5.1. This is a regression from v1.5.0 where all parent references were properly updated.
Impact
This breaks external-dns and other tools that rely on route status to determine which routes are accepted by which gateways.
Root Cause
The bug was introduced in commit 44f43ea (#6812) which attempted to cleanup dangling route status conditions. The new mergeRouteParentStatus function incorrectly removes parent statuses when:
- The parent is managed by our controller
- The parent is not in the new status update
This happens because the function assumes that if a parent managed by our controller isn't in the new status, it should be removed. However, when processing routes with multiple parent references, each reconciliation may only update specific parents, not all of them.
Reproduction Steps
- Create an HTTPRoute with multiple parent references to different gateways managed by the same controller:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: example
spec:
parentRefs:
- name: gateway-1
namespace: default
- name: gateway-2
namespace: default
hostnames:
- example.com
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: example-service
port: 80- Check the route status:
kubectl get httproute example -o jsonpath='{.status.parents}' - Only one parent will have a status entry instead of both
Expected Behavior
All parent references should have their status properly updated and maintained.
Actual Behavior
Only the last processed parent reference retains its status; others are incorrectly removed during the merge.
Environment
- Envoy Gateway Version: v1.5.1
- Kubernetes Version: Any
- Gateway API Version: v1.0+
Workaround
- Downgrade to v1.5.0
- Or split routes with multiple parent references into separate routes (one per gateway)
Proposed Fix
The mergeRouteParentStatus function needs to be corrected to properly handle multiple parent references from the same controller. The logic should not remove parent statuses just because they're not in the current update batch.