-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[NET-5772] Make tcp external service registered on terminating gw reachable from peered cluster #19881
Conversation
@erichaberkorn @jm96441n this still needs tests, a changelog entry, etc.; however, I'd appreciate it if you guys could sanity check my change here. I've verified that it works for |
@@ -1188,29 +1190,9 @@ func createDownstreamTransportSocketForConnectTLS(cfgSnap *proxycfg.ConfigSnapsh | |||
} | |||
|
|||
// Inject peering trust bundles if this service is exported to peered clusters. | |||
if len(peerBundles) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic gets moved out to a re-usable function below
af9a1a4
to
015eb39
Compare
approach overall LGTM, do you have an existing setup to run/test it out locally that I could steal to do some testing as well? |
015eb39
to
b8fc1c7
Compare
…chain This allows an external service registered on a terminating gateway to be exported to and reachable from a peered cluster
9d0edc5
to
1105345
Compare
1105345
to
d0fa205
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! nice work
Note
This is a followup to #18959 which fixed the same problem specifically when using
http
protocol.Description
The terminating gateways needs to be able to handle TCP connections from peers which are not TLS-terminated at the local mesh gateway. This amounts to including the target SNI that downstreams from peers would use when building the TLS context for the terminating gateway.
Filter chain match before this change
Filter chain match after this change
Testing & Reproduction steps
You can test this fix using the setup here, changing the
<ServiceDefaults>.spec.protocol
as necessary inresources/dc2/external-service.yaml
if you want to see the behavior forhttp
services as well.You will need to pin a build of this branch as
global.image
invalues-dc2.yaml
. I would recommend doing an install without this build to witness things in their current broken state, and then doing ahelm upgrade
withglobal.image
set.Links
PR Checklist