Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kuma-cp) initial gateway TrafficRoute support #2547

Merged
merged 5 commits into from
Sep 7, 2021
Merged

feat(kuma-cp) initial gateway TrafficRoute support #2547

merged 5 commits into from
Sep 7, 2021

Conversation

jpeach
Copy link
Contributor

@jpeach jpeach commented Aug 11, 2021

Summary

Add support for binding TrafficRoute resources to Gateways. This is
based on outbound proxy generator code, but there are still a number of
missing features and outstanding TODO items.

It is possible to configure simple HTTP Gateway use cases and forward
traffic to Kuma services as long as the mesh is not configures with mTLS.
A Gateway can have more than one TrafficRoute resource bound, and this
works correctly by merging the routes in match order.

Full changelog

N/A

Issues resolved

N/A

Documentation

N/A

Testing

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

Backwards compatibility

  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2021

Codecov Report

Merging #2547 (e0fc011) into master (7793853) will increase coverage by 0.19%.
The diff coverage is 79.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2547      +/-   ##
==========================================
+ Coverage   52.25%   52.45%   +0.19%     
==========================================
  Files         865      872       +7     
  Lines       49300    49662     +362     
==========================================
+ Hits        25761    26049     +288     
- Misses      21453    21510      +57     
- Partials     2086     2103      +17     
Impacted Files Coverage Δ
pkg/xds/envoy/routes/configurers.go 90.90% <0.00%> (-9.10%) ⬇️
pkg/plugins/runtime/gateway/builder.go 72.72% <63.63%> (-9.10%) ⬇️
.../plugins/runtime/gateway/virtual_host_generator.go 71.42% <71.42%> (ø)
pkg/plugins/runtime/gateway/match/gateway.go 75.00% <75.00%> (ø)
pkg/plugins/runtime/gateway/merge/traffic_route.go 76.19% <76.19%> (ø)
pkg/plugins/runtime/gateway/generator.go 76.59% <76.59%> (ø)
...plugins/runtime/gateway/traffic_route_generator.go 79.83% <79.83%> (ø)
pkg/plugins/runtime/gateway/match/util.go 85.71% <85.71%> (ø)
pkg/plugins/runtime/gateway/match/routes.go 86.66% <86.66%> (ø)
...s/runtime/gateway/route_configuration_generator.go 86.66% <86.66%> (ø)
... and 21 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 7793853...e0fc011. Read the comment docs.

@jpeach jpeach changed the title chore(kuma-cp) refactor gateway generators feat(kuma-cp) initial gateway TrafficRoute support Aug 19, 2021
@jpeach jpeach marked this pull request as ready for review August 19, 2021 06:27
@jpeach jpeach requested a review from a team as a code owner August 19, 2021 06:27
Add support for binding TrafficRoute resources to Gateways. This is
based on outbound proxy generator code, but there are still a number of
missing features and outstanding TODO items.

It is possible to configure simple HTTP Gateway use cases and forward
traffic to Kuma services as long as the mesh is not configures with mTLS.
A Gateway can have more than one TrafficRoute resource bound, and this
works correctly by merging the routes in match order.

Signed-off-by: James Peach <james.peach@konghq.com>
pkg/plugins/runtime/gateway/generator.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/match/util.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/match/routes.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/generator.go Show resolved Hide resolved
pkg/plugins/runtime/gateway/generator.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/generator.go Show resolved Hide resolved
Signed-off-by: James Peach <james.peach@konghq.com>
@jpeach
Copy link
Contributor Author

jpeach commented Aug 27, 2021

@lobkovilya sorry about the force push, my working copy was a bit behind my fork :-(

Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are lots of todos but as a concept, we are heading in a good direction.

pkg/plugins/runtime/gateway/match/gateway.go Show resolved Hide resolved
pkg/plugins/runtime/gateway/virtual_host_generator.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/match/util.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/match/util.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/match/routes.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/match/routes.go Outdated Show resolved Hide resolved
pkg/plugins/runtime/gateway/traffic_route_generator.go Outdated Show resolved Hide resolved
@jpeach
Copy link
Contributor Author

jpeach commented Sep 2, 2021

I've addresses all the review feedback so far. Thanks!

@jpeach jpeach merged commit d5af0df into kumahq:master Sep 7, 2021
@jpeach jpeach deleted the experiment/integrate-traffic-route branch September 7, 2021 23:17
mergify bot pushed a commit that referenced this pull request Sep 7, 2021
Add support for binding TrafficRoute resources to Gateways. This is
based on outbound proxy generator code, but there are still a number of
missing features and outstanding TODO items.

It is possible to configure simple HTTP Gateway use cases and forward
traffic to Kuma services as long as the mesh is not configures with mTLS.
A Gateway can have more than one TrafficRoute resource bound, and this
works correctly by merging the routes in match order.

Signed-off-by: James Peach <james.peach@konghq.com>
(cherry picked from commit d5af0df)
jpeach added a commit that referenced this pull request Sep 8, 2021
Add support for binding TrafficRoute resources to Gateways. This is
based on outbound proxy generator code, but there are still a number of
missing features and outstanding TODO items.

It is possible to configure simple HTTP Gateway use cases and forward
traffic to Kuma services as long as the mesh is not configures with mTLS.
A Gateway can have more than one TrafficRoute resource bound, and this
works correctly by merging the routes in match order.

Signed-off-by: James Peach <james.peach@konghq.com>
(cherry picked from commit d5af0df)

Co-authored-by: James Peach <james.peach@konghq.com>
nikita15p pushed a commit to nikita15p/kuma that referenced this pull request Sep 28, 2021
Add support for binding TrafficRoute resources to Gateways. This is
based on outbound proxy generator code, but there are still a number of
missing features and outstanding TODO items.

It is possible to configure simple HTTP Gateway use cases and forward
traffic to Kuma services as long as the mesh is not configures with mTLS.
A Gateway can have more than one TrafficRoute resource bound, and this
works correctly by merging the routes in match order.

Signed-off-by: James Peach <james.peach@konghq.com>
nikita15p pushed a commit to nikita15p/kuma that referenced this pull request Sep 28, 2021
Add support for binding TrafficRoute resources to Gateways. This is
based on outbound proxy generator code, but there are still a number of
missing features and outstanding TODO items.

It is possible to configure simple HTTP Gateway use cases and forward
traffic to Kuma services as long as the mesh is not configures with mTLS.
A Gateway can have more than one TrafficRoute resource bound, and this
works correctly by merging the routes in match order.

Signed-off-by: James Peach <james.peach@konghq.com>
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.

4 participants