Skip to content

portforward: Allow websockets to be used for port-forwarding #6569

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

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

ahamilton55
Copy link
Contributor

@ahamilton55 ahamilton55 commented Jun 13, 2025

The current implementation of port-forwarding only supports the spdy protocol. Newer API servers can handle websockets and fall back to spdy if they aren't available.

This updates the code to use websockets for port forwarding when available and to fall back to spdy if it needs to.

This is pretty much the same way that the kubectl port-forward command handles this situation.

Fixes #6568.

@ahamilton55 ahamilton55 force-pushed the add-websocket-portforwarder branch 2 times, most recently from bf00d45 to 81bec1d Compare June 13, 2025 00:54
Signed-off-by: Andrew Hamilton <ahamilton55@gmail.com>
@ahamilton55 ahamilton55 force-pushed the add-websocket-portforwarder branch from 81bec1d to 0445003 Compare June 13, 2025 01:09
@ahamilton55
Copy link
Contributor Author

@nicks This test failed in CI but it doesn't really seem to be related to the change. I tried running it again but it failed again. I ran the tests locally and they all passed so I'm not sure what the issue is.

Copy link
Member

@nicks nicks left a comment

Choose a reason for hiding this comment

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

lgtm - sorry i thought i had added this bit

@nicks nicks merged commit f43ca21 into tilt-dev:master Jun 13, 2025
8 checks passed
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.

Websockets don't work when trying to port-forward
2 participants