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

k8s: add websocket support to exec #6496

Merged
merged 1 commit into from
Feb 5, 2025
Merged

Conversation

ChyZma
Copy link
Contributor

@ChyZma ChyZma commented Feb 4, 2025

In version 1.31, Kubernetes switched from SPDY to WebSockets for streaming (blog post).

For clusters where SPDY is unavailable (e.g., the Kubernetes API server is accessed through an edge proxy that doesn't support SPDY), the exec operation must use WebSockets.
A possible solution for this would be to use a WebSocket Stream Executor by default and fall back to a SPDY Stream Executor when WebSocket based streaming is unavailable. (this also aligns with what kubectl exec currently does)

I also replaced Executor.Stream with Executor.StreamWithContext because the former is deprecated.

(A similar solution could be used to solve #6445. I might check it out over the weekend.)

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!

awesome, thanks!

@nicks nicks merged commit 258b83f into tilt-dev:master Feb 5, 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.

2 participants