envoyproxy / envoyproxy/gateway

Creating HTTPRoute with multiple custom backendrefs only translates to one cluster

Open
#7,766 3 comments 0 reactions 0 assignees View on GitHub
stale triage
Dominant language
Go
Stars
3k
Forks
864
Avg merge
2d 2h
Merged PRs (30d)
140

Description

*Description*:
When providing a list of custom backendrefs in an HTTPRoute, only one of them is selected. This is likely due to [NeedsClusterPerSetting](https://github.com/envoyproxy/gateway/blob/26a7734ea36125eab45fdcb4438a9e45f6da0961/internal/ir/xds.go#L843-L855) not also checking if there is a custom backend provided.

*Repro steps*:
See https://github.com/wtzhang23/xds-backend/issues/19. Relevant snippet:
```
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: example-route
namespace: default
spec:
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: envoy-gateway
namespace: envoy-gateway-system
hostnames:
- "apis.foo.com"
rules:
- backendRefs:
- group: xdsbackend.wtzhang23.github.io
kind: XdsBackend
weight: 1
name: foo
namespace: envoy-gateway-system
- group: xdsbackend.wtzhang23.github.io
kind: XdsBackend
weight: 2
name: bar
namespace: envoy-gateway-system
```

*Environment*:
Gateway Version: v1.6.0, no custom Envoy image.

*Logs*:
See above

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.