Skip to content

feat(kuma-cp): support Retry policy for Gateways#3402

Merged
jpeach merged 1 commit intokumahq:masterfrom
jpeach:feat/gateway-retry-support
Dec 2, 2021
Merged

feat(kuma-cp): support Retry policy for Gateways#3402
jpeach merged 1 commit intokumahq:masterfrom
jpeach:feat/gateway-retry-support

Conversation

@jpeach
Copy link
Contributor

@jpeach jpeach commented Dec 1, 2021

Summary

Add Retry support to Gateway routes. This takes a different approach
from mesh, but populating the retry policy on the routing route action.
Since Retry is a connection policy that matches a sources and destination,
the routing step is the best place to attach the policy since at that
point we know both the source and the destination services. The only
complication is when we are forwarding to a weighted cluster composed
of multiple services, where the selected policy may not be especially
obvious.

Full changelog

N/A

Issues resolved

Fix #3319.

Documentation

N/A

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Update UPGRADE.md with any steps users will need to take
    when upgrading.
  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

@codecov-commenter
Copy link

codecov-commenter commented Dec 1, 2021

Codecov Report

Merging #3402 (a5f9d08) into master (e36d451) will increase coverage by 0.08%.
The diff coverage is 60.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3402      +/-   ##
==========================================
+ Coverage   52.18%   52.26%   +0.08%     
==========================================
  Files         940      941       +1     
  Lines       54677    54837     +160     
==========================================
+ Hits        28532    28663     +131     
- Misses      23927    23946      +19     
- Partials     2218     2228      +10     
Impacted Files Coverage Δ
pkg/plugins/runtime/gateway/route/configurers.go 73.28% <46.05%> (-9.59%) ⬇️
pkg/plugins/runtime/gateway/match/policy.go 85.71% <66.66%> (-14.29%) ⬇️
...g/plugins/runtime/gateway/route_table_generator.go 81.19% <66.66%> (-18.81%) ⬇️
pkg/plugins/runtime/gateway/cluster_generator.go 88.28% <100.00%> (-0.41%) ⬇️
pkg/plugins/runtime/gateway/generator.go 78.62% <100.00%> (+0.45%) ⬆️
pkg/plugins/runtime/gateway/route/util.go 100.00% <100.00%> (ø)
pkg/xds/envoy/listeners/v3/retry_configurer.go 83.05% <100.00%> (ø)
api/observability/v1/mads.pb.go 35.56% <0.00%> (+1.03%) ⬆️
pkg/mads/v1/client/client.go 43.75% <0.00%> (+2.50%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e36d451...a5f9d08. Read the comment docs.

@jpeach jpeach marked this pull request as ready for review December 1, 2021 07:00
@jpeach jpeach requested a review from a team as a code owner December 1, 2021 07:00
@jpeach jpeach changed the title feat(kuma-cp) support Retry policy for Gateways feat(kuma-cp): support Retry policy for Gateways Dec 2, 2021
Add Retry support to Gateway routes. This takes a different approach
from mesh, but populating the retry policy on the routing route action.
Since Retry is a connection policy that matches a sources and destination,
the routing step is the best place to attach the policy since at that
point we know both the source and the destination services. The only
complication is when we are forwarding to a weighted cluster composed
of multiple services, where the selected policy may not be especially
obvious.

This fixes #3319.

Signed-off-by: James Peach <james.peach@konghq.com>
@jpeach jpeach merged commit 1642741 into kumahq:master Dec 2, 2021
@jpeach jpeach deleted the feat/gateway-retry-support branch December 2, 2021 22:53
@lahabana lahabana added this to the gateway preview release milestone Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Retry policies in Gateway

5 participants