envoyproxy / envoyproxy/gateway
Add CEL validation for unsupported BTP fields on TCPRoute/UDPRoute targets
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
## Summary
Some `BackendTrafficPolicySpec` fields are silently ignored when the policy targets a `TCPRoute` or `UDPRoute`. For example, HTTP-specific fields like `rateLimit`, `faultInjection`, `compression`, `responseOverride`, `httpUpgrade`, `requestBuffer`, and `telemetry` have no effect on TCP/UDP routes but are not rejected at admission time.
This is inconsistent with the CEL validation added for Backend targets in #8890, which explicitly rejects unsupported fields via CEL rules.
## Proposal
Add CEL validation rules to reject fields that are not applicable when the `targetRef` kind is `TCPRoute` or `UDPRoute`, similar to how Backend-targeted BTPs reject RDS-only fields.
## Context
Raised in [PR #8890 review](https://github.com/envoyproxy/gateway/pull/8890#discussion_r2128652942) by @zhaohuabing as a non-blocking nit for consistency.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.