Repository navigation
Conversation
…HTTP routes A BackendTrafficPolicy that sets only http1 on a GRPCRoute, TCPRoute, TLSRoute or UDPRoute counted as cluster-affecting in the merge-backends index, although translation ignores http1 for those routes. The route then got inline cluster settings instead of a merged BackendClusterRef. Leave http1 out of the check for those route kinds. Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
cc @muwaqar |
|
cc @guydc |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10421 +/- ##
==========================================
- Coverage 82.70% 82.70% -0.01%
==========================================
Files 277 277
Lines 44451 44457 +6
==========================================
+ Hits 36763 36767 +4
- Misses 7687 7689 +2
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/retest |
|
Hi @cvas22 ! Thanks for picking this up. Implementation looks good to me. I want to note that #10307 refers to a wider pattern. While the HTTP1 example was flagged in a previous review, there are additional BTP fields that may be excluded based on routes types. I updated the issue to reflect that more clearly. It's fine to keep the PR scoped to HTTP1, and have the more conservative de-merge for other cases. cc @muwaqar-cflt - WDYT about the following:
|
|
IMHO this has the potential to quickly become non-maintainable with the code overriding what the user has supplied in the policy. For the background, if these policies do not support the relevant fields, why not validate them before any processing is run? Either thru CEL or thru a controller (like how we added "Invalid" status for backend-BTP). |
|
It might be a bit nuanced for CEL. When targeting xRoutes, the validation is possible. For other targets, it gets complicated:
Controller validation is probably possible, but will perhaps be breaking for existing users. I agree that this warrants further discussion on which approach to take - should policies be strictly validated for compatibility with all targets in scope, or translated in a best-effort sort of way. cc @envoyproxy/gateway-maintainers |
Wait for a decision on wider policy strict validation topic
|
Thanks @guydc and @muwaqar-cflt. I'll keep this PR scoped to On the wider pattern: the translator already ignores these fields per route kind ( Happy to take either once you've settled on the approach. |
|
The remaining failure is |
…-eligibility Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
|
Put up #10804 as a possible follow-up to use one function to decide which BTP fields reach which kind of cluster, and the merge check uses it. It goes with best-effort rather than strict validation, to avoid a breaking change. It covers http1 on GRPCRoute too, so the two overlap. |
What this PR does / why we need it:
With merge backends enabled,
BuildBTPIndexesmarks a route as cluster-affecting when a route-level BackendTrafficPolicy sets any cluster-scoped field,http1included. For GRPCRoute, TCPRoute, TLSRoute and UDPRoute, translation ignoreshttp1and only warns about it (validateBackendTrafficPolicyForRoute). AStrategicMergepolicy that sets onlyhttp1on such a route still maderouteDestinationForListeneremit inline cluster settings instead of aBackendClusterRef. That demerged the backend, and could keep a valid Service-targeted BTP from applying.I added
btpSpecHasClusterScopedFieldsForRoute, which leaveshttp1out of the check for those four route kinds, and use it for the route and route-rule entries of the cluster-settings index. Gateway, listener and ListenerSet targets, and HTTPRoute targets, behave as before.Which issue(s) this PR fixes:
Fixes #10307
Notes:
I added
TestBtpSpecHasClusterScopedFieldsForRouteandTestBTPClusterSettingsIndexIgnoresHTTP1OnGRPCRoute. They pass along with the existingTestBtpSpecHasClusterScopedFields*andTestBTPClusterSettingsIndex. I haven't runmake lintormake gen-checklocally.PR Checklist
git commit -s). See DCO: Sign your work.make generate gen-check,make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, butgen-check,lint, and coverage MUST pass.)release-notes/current/<section>/<pr-number>-<slug>.md(seerelease-notes/current/README.mdfor sections and naming). N/A if this PR does not contain non-trivial changes.release-notes/current/breaking_changes/.