Migrate kubectl exec from using SPDY to using WebSockets with SPDY as fallback#1980
Open
andyvandy wants to merge 1 commit intoloft-sh:mainfrom
Open
Migrate kubectl exec from using SPDY to using WebSockets with SPDY as fallback#1980andyvandy wants to merge 1 commit intoloft-sh:mainfrom
andyvandy wants to merge 1 commit intoloft-sh:mainfrom
Conversation
Per [KEP-4006](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/4006-transition-spdy-to-websockets), prioritize trying WebSockets first given it has been the default for 4 versions now and will be the standard going forward. Use a NewFallbackExecutor as is suggested in the KEP to avoid breaking existing use cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added websocket support since I want to setup a capsule kube api proxy which was dropping connections due to lack of SPDY support.
Per KEP-4006, I prioritize trying WebSockets first given Websockets have been the default for 4 versions now and will be the standard going forward. I used
NewFallbackExecutoras suggested in the KEP to avoid breaking existing use cases.This follows the implementation used by kubectl: https://github.com/kubernetes/kubectl/blob/8144b746a47f142759a073a46f581de92b1886aa/pkg/cmd/exec/exec.go#L146-L166
I've built this locally and have been using it successfully for myself and a few others. Disclosure: this fix was found with the assistance of claude/copilot.