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(gatewayapi): add gateways.kuma.io/cross-mesh annotation for GatewayAPI Gateways #4911

Closed
wants to merge 2 commits into from

Conversation

michaelbeaumont
Copy link
Contributor

@michaelbeaumont michaelbeaumont commented Aug 25, 2022

This proposes using the gateways.kuma.io/cross-mesh annotation to set all listeners to be cross-mesh for Gateway API Gateways. This presumably covers most use cases. Users wanting to mix cross-mesh/non cross-mesh listeners can fall back on MeshGateway.

Closes #4397

Checklist prior to review

  • Link to docs PR or issue --
  • Link to UI issue or PR --
  • Is the issue worked on linked? --
  • The PR does not hardcode values that might break projects that depend on kuma (e.g. "kumahq" as a image registry) --
  • The PR will work for both Linux and Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Unit Tests --
  • E2E Tests --
  • Manual Universal Tests -- none
  • Manual Kubernetes Tests --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here?

…wayAPI Gateways

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2022

Codecov Report

Merging #4911 (ca08fb3) into master (22c157d) will increase coverage by 0.05%.
The diff coverage is 42.85%.

@@            Coverage Diff             @@
##           master    #4911      +/-   ##
==========================================
+ Coverage   46.68%   46.73%   +0.05%     
==========================================
  Files         687      687              
  Lines       46656    46668      +12     
==========================================
+ Hits        21781    21812      +31     
+ Misses      22966    22950      -16     
+ Partials     1909     1906       -3     
Impacted Files Coverage Δ
...e/k8s/controllers/gatewayapi/gateway_controller.go 0.00% <0.00%> (ø)
...e/k8s/controllers/gatewayapi/gateway_conversion.go 41.30% <64.28%> (+10.36%) ⬆️
pkg/core/resources/manager/cache.go 88.31% <0.00%> (+2.59%) ⬆️
pkg/plugins/leader/postgres/leader_elector.go 89.36% <0.00%> (+6.38%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@michaelbeaumont michaelbeaumont marked this pull request as ready for review August 25, 2022 19:14
@michaelbeaumont michaelbeaumont requested a review from a team as a code owner August 25, 2022 19:14
@jakubdyszkiewicz
Copy link
Contributor

Have you considered

kind: Gateway
spec:
  listeners:
  - tls:
      mode: Terminate
      options:
        cross-mesh: true

?

This way you can have listeners that are both cross-mesh and non-cross-mesh.

@michaelbeaumont
Copy link
Contributor Author

michaelbeaumont commented Aug 29, 2022

Yeah. But it's the same as for MeshGateway, any service that can contact this Gateway will see an HTTP connection, not HTTPS. The fact that it's TLS is due to the underlying mesh. To me it feels off to have TLS/HTTPS as the protocol

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.

please remember about docs

@michaelbeaumont
Copy link
Contributor Author

@lahabana @johnharris85 WDYT? Any strong opinions?

@johnharris85
Copy link
Contributor

No strong opinions.

@lahabana
Copy link
Contributor

lahabana commented Sep 9, 2022

I get your point @michaelbeaumont sounds like we should go the way you've implemented atm

@lukidzi
Copy link
Contributor

lukidzi commented Sep 20, 2022

@michaelbeaumont Are we fine to merge it?

@michaelbeaumont
Copy link
Contributor Author

@lukidzi Not yet, I want to try out another way using MeshGatewayConfig.

@michaelbeaumont
Copy link
Contributor Author

michaelbeaumont commented Oct 21, 2022

Closing this for now for the more Gateway API-like MeshGatewayConfig.crossMesh

@michaelbeaumont michaelbeaumont deleted the feat/gateway_api_cross-mesh branch October 21, 2022 09:46
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.

Cross-mesh gateway through Gateway API
6 participants