Skip to content

Routes with multiple parent references only update status for one parent (v1.5.1 regression) #7067

@rajsinghtech

Description

@rajsinghtech

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

  1. 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
  1. Check the route status: kubectl get httproute example -o jsonpath='{.status.parents}'
  2. 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

  1. Downgrade to v1.5.0
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions