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(dest): Allow destination controller to force opaque transport #13699

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sfleen
Copy link
Contributor

@sfleen sfleen commented Feb 21, 2025

Non-opaque meshed traffic currently flows over the original destination port, which requires the inbound proxy to do protocol detection.

This adds an option to the destination controller that configures all meshed traffic to flow to the inbound proxy's inbound port. This will allow us to include more session protocol information in the future, obviating the need for inbound protocol detection.

This doesn't do much in the way of testing, since the default behavior should be unchanged. When this default changes, more validation will be done on the behavior here.

@sfleen sfleen requested a review from a team as a code owner February 21, 2025 21:38
// Opaque.
if opaquePort {
weightedAddr.ProtocolHint.Protocol = &pb.ProtocolHint_Opaque_{
Opaque: &pb.ProtocolHint_Opaque{},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This (and above for external workloads) are the meat and potatoes of this change, with the rest being config wiring.

@sfleen sfleen force-pushed the sfleen/endpoint-translate branch from 15b4644 to 331ef1e Compare February 21, 2025 21:41
Non-opaque meshed traffic currently flows over the original destination port, which requires the inbound proxy to do protocol detection.

This adds an option to the destination controller that configures all meshed traffic to flow to the inbound proxy's inbound port. This will allow us to include more session protocol information in the future, obviating the need for inbound protocol detection.

This doesn't do much in the way of testing, since the default behavior should be unchanged. When this default changes, more validation will be done on the behavior here.

Signed-off-by: Scott Fleener <[email protected]>
@sfleen sfleen force-pushed the sfleen/endpoint-translate branch from 331ef1e to b6b560d Compare February 24, 2025 22:03
sfleen added a commit that referenced this pull request Feb 25, 2025
A follow up to #13699, this default-enables the config option introduced in that PR. Now, all traffic between meshed pods should flow to the proxy's inbound port.

Signed-off-by: Scott Fleener <[email protected]>
Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

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

This seems like we can easily test.

nit: Subject: feat(destination): introduce transport-protocol outbound TLS mode

Comment on lines +35 to +36
forceOpaqueTransport := cmd.Bool("force-opaque-transport", false,
"Force proxies to route all outbound meshed traffic to the proxy's default inbound port")
Copy link
Member

Choose a reason for hiding this comment

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

We probably want to reframe this a bit as far as the external- (and especially user-) facing interface is concerned. It's not critical to address in the command line flag; though it is probably generally better for the terms to be consistent between the implementation and the helm chart...

https://github.com/BuoyantIO/buoyant-linkerd2/blob/eddd3f6e7812b82df24d899039c904fe8a89fb3a/charts/linkerd-control-plane/templates/destination.yaml#L199-L209

We could frame this as an "outbound TLS mode", with values of:

  • legacy-transparent -- the old behavior: transparently implement mTLS on connections
  • transport-protocol -- the new behavior: use the transport protocol to route traffic

in that case, we could call this flag something like force-legacy-outbound-tls-mode.

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.

2 participants