You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep replacing route policies out of shared clusters #9588
Keep replacing route policies out of shared clusters
When two rules reference the same backend, but one has a more-specific BackendTrafficPolicy with mergeType unset, that policy must completely replace the gateway policy. Because merge eligibility only treats fields explicitly set by the route policy as cluster-scoped, both rules can still share a BackendCluster; this unconditional loop then installs the gateway policy's circuit breaker, health check, load balancer, and other cluster settings on that shared cluster, so the replacing rule still inherits settings it explicitly overrides. Such routes must be demerged or clusters must be partitioned by their effective policy set.
Expected for route-a: fault injection only. No circuit breaker, no active health check, default round-robin — the gateway policy is replaced wholesale.
What actually happens:
┌─────────────────────────────────────────────────┬─────────────────────────────────────────────────────┐
│ step │ result │
├─────────────────────────────────────────────────┼─────────────────────────────────────────────────────┤
│ btpSpecHasClusterScopedFields(btp-a.Spec) │ false — faultInjection isn't in the list │
├─────────────────────────────────────────────────┼─────────────────────────────────────────────────────┤
│ hasRouteLevelClusterSettings for route-a's rule │ false → merge-eligible │
├─────────────────────────────────────────────────┼─────────────────────────────────────────────────────┤
│ getOrCreateBackendCluster for foo:8080 │ route-a and route-b get the same *ir.BackendCluster │
├─────────────────────────────────────────────────┼─────────────────────────────────────────────────────┤
│ route-level pass │ r.Traffic on route-a's IR route = faultInjection ✓ │
├─────────────────────────────────────────────────┼─────────────────────────────────────────────────────┤
│ gateway pass, r.Traffic != nil guard │ route-a's route skipped ✓ │
├─────────────────────────────────────────────────┼─────────────────────────────────────────────────────┤
│ gateway pass, line 1498 loop │ bc.Traffic = btp-gw's tf on the shared cluster ✗ │
└─────────────────────────────────────────────────┴─────────────────────────────────────────────────────┘
CDS output: route-a's traffic lands on a cluster with maxConnections: 10, active HTTP health checking, and LeastRequest — every setting it opted out of.
right, the symptom is different, #9541 is about RoutingType index, this is about ClusterSettings index, but the proposed fix muwaqar#4 covers both scenarios. I am just waiting on #9590 to land first independently so that it can be cherry-picked to older releases as per need, and then follow-up with fix for this issue. Happy to keep this tracking issue open till then.
Activity
zhaohuabing commentedon Jul 28, 2026
cc @muwaqar-cflt
muwaqar-cflt commentedon Jul 28, 2026
@zhaohuabing this seems a duplicate of #9541, no?
zhaohuabing commentedon Jul 28, 2026
I think the symptoms are different: #9541 is about RoutingType, this one is about traffic policy override.
Example:
Expected for route-a: fault injection only. No circuit breaker, no active health check, default round-robin — the gateway policy is replaced wholesale.
What actually happens:
CDS output: route-a's traffic lands on a cluster with maxConnections: 10, active HTTP health checking, and LeastRequest — every setting it opted out of.
muwaqar-cflt commentedon Jul 28, 2026
right, the symptom is different, #9541 is about RoutingType index, this is about ClusterSettings index, but the proposed fix muwaqar#4 covers both scenarios. I am just waiting on #9590 to land first independently so that it can be cherry-picked to older releases as per need, and then follow-up with fix for this issue. Happy to keep this tracking issue open till then.
testdata: add golden fixture proving route policy replaces gateway cl…
gatewayapi: add TODO on the merged-cluster Traffic gap for mergeType-…
gatewayapi: extend MergeBackends precedence-index fix to ClusterSetti…
gatewayapi: remove stale TODO(envoyproxy#9588) comment, already fixed…
fix(gatewayapi): don't skip MergeBackends precedence-index claims for…
fix: keep Replace-merged routes off shared backend clusters