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): add gateway support for external services #2990

Merged
merged 2 commits into from
Oct 27, 2021
Merged

feat(kuma-cp): add gateway support for external services #2990

merged 2 commits into from
Oct 27, 2021

Conversation

jpeach
Copy link
Contributor

@jpeach jpeach commented Oct 22, 2021

Signed-off-by: James Peach james.peach@konghq.com

Summary

Add Gateway generator support for ExternalServvice backends. Like
mesh services, ExternalService backends are selected by matching
the kuma.io/service tag. Where the tags are ambiguous (i.e. we
have both Dataplane and ExternalService resources for the same
service), ExternalService takes priority.

This change separates the cluster generation from the route table
generation just to reduce the amount of complexity in a single generator.

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 Oct 22, 2021

Codecov Report

Merging #2990 (7905fc5) into master (a7c04ee) will decrease coverage by 0.00%.
The diff coverage is 52.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2990      +/-   ##
==========================================
- Coverage   52.25%   52.24%   -0.01%     
==========================================
  Files         913      915       +2     
  Lines       52906    53002      +96     
==========================================
+ Hits        27644    27692      +48     
- Misses      23062    23106      +44     
- Partials     2200     2204       +4     
Impacted Files Coverage Δ
...g/plugins/runtime/gateway/route_table_generator.go 95.55% <ø> (+9.72%) ⬆️
test/e2e/gateway/gateway_universal.go 0.00% <0.00%> (ø)
pkg/plugins/runtime/gateway/match/external.go 71.42% <71.42%> (ø)
pkg/plugins/runtime/gateway/generator.go 78.87% <75.00%> (-0.84%) ⬇️
pkg/plugins/runtime/gateway/cluster_generator.go 84.11% <84.11%> (ø)
pkg/plugins/runtime/gateway/plugin.go 100.00% <100.00%> (ø)
pkg/xds/topology/outbound.go 74.21% <100.00%> (ø)
pkg/plugins/runtime/gateway/route/sorter.go 61.53% <0.00%> (-5.13%) ⬇️
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 2 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 a7c04ee...7905fc5. Read the comment docs.

@jpeach jpeach changed the title WIP: external service support for gateway deat(kuma-cp): add gateway support for external services Oct 25, 2021
@jpeach jpeach changed the title deat(kuma-cp): add gateway support for external services feat(kuma-cp): add gateway support for external services Oct 25, 2021
@jpeach jpeach marked this pull request as ready for review October 25, 2021 05:54
@jpeach jpeach requested a review from a team as a code owner October 25, 2021 05:54
Add Gateway generator support for ExternalServvice backends.  Like
mesh services, ExternalService backends are selected by matching
the `kuma.io/service` tag. Where the tags are ambiguous (i.e. we
have both Dataplane and ExternalService resources for the same
service), ExternalService takes priority.

This change separates the cluster generation from the route table
generation just to reduce the amount of complexity in a single generator.

Signed-off-by: James Peach <james.peach@konghq.com>
Signed-off-by: James Peach <james.peach@konghq.com>
@jpeach jpeach merged commit ad2e07d into kumahq:master Oct 27, 2021
@jpeach jpeach deleted the feat/gateway-ext-service branch October 27, 2021 21:22
mergify bot pushed a commit that referenced this pull request Oct 27, 2021
Add Gateway generator support for ExternalService backends.  Like
mesh services, ExternalService backends are selected by matching
the `kuma.io/service` tag. Where the tags are ambiguous (i.e. we
have both Dataplane and ExternalService resources for the same
service), ExternalService takes priority.

This change separates the cluster generation from the route table
generation just to reduce the amount of complexity in a single generator.

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

# Conflicts:
#	pkg/plugins/runtime/gateway/gateway_route_generator_test.go
#	pkg/plugins/runtime/gateway/plugin.go
#	pkg/plugins/runtime/gateway/route_table_generator.go
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