[v2.2.x] apply TrafficPolicy retries per route (#14304)#14392
Merged
davidjumani merged 1 commit intoJul 13, 2026
Conversation
Signed-off-by: omar <[email protected]> (cherry picked from commit 599c83d)
Contributor
There was a problem hiding this comment.
Pull request overview
This backport fixes TrafficPolicy retry translation by ensuring inherited retry settings are applied at the Envoy route level (rather than virtual host level), preserving consistent behavior and precedence (including for HTTPS listener translation).
Changes:
- Update TrafficPolicy translation to apply inherited retry policy per-route (without overriding any already-set route retry policy).
- Refresh golden output to reflect route-level retry policy placement.
- Add a golden translator test covering HTTPS listener retries.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/kgateway/extensions2/plugins/trafficpolicy/traffic_policy_plugin.go | Moves inherited retry application from vhost scope to per-route via a shared helper that preserves precedence. |
| pkg/kgateway/translator/gateway/gateway_translator_test.go | Adds a new translator golden test case for HTTPS TrafficPolicy retries. |
| pkg/kgateway/translator/gateway/testutils/inputs/traffic-policy/https-retry.yaml | New input fixture exercising HTTPS listener + HTTPRoute-attached TrafficPolicy retry. |
| pkg/kgateway/translator/gateway/testutils/outputs/traffic-policy/https-retry.yaml | New expected output verifying retryPolicy appears on the route for HTTPS. |
| pkg/kgateway/translator/gateway/testutils/outputs/traffic-policy/timeout-retry.yaml | Updates expected output to remove vhost retryPolicy and show retryPolicy on each route instead. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
alexliu541
approved these changes
Jul 13, 2026
davidjumani
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #14304 (originally backported from #14360) to the
v2.2.xbranch.Move inherited TrafficPolicy retry settings from virtual hosts onto routes so retry behavior is preserved consistently, including HTTPS listener translation.
This also adds a golden translator test covering HTTPS listener retries.
Change Type
/kind fix
Changelog
Additional Notes
Clean cherry-pick of 599c83d apart from one conflict in
gateway_translator_test.go: the source commit's diff context included a pre-existinggrpcroute-timeouttest that does not exist onv2.2.x, so only the newTrafficPolicy HTTPS retrytest case was applied. Thehttps-retry.yamlgolden output was regenerated onv2.2.x(REFRESH_GOLDEN=true); the only differences from the source golden are pre-existing branch differences in Gateway status (AttachedListenerSetscondition, noGRPCRoutesupported kind) — the Envoy retry config is identical.