Stream Translator Proxy and FallbackExecutor for WebSockets#119186
Conversation
|
/sig api-machinery |
1dcb306 to
a372caa
Compare
|
/retest |
a372caa to
1785deb
Compare
| github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
| github.com/modern-go/reflect2 v1.0.2 // indirect | ||
| github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
| github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect |
There was a problem hiding this comment.
TODO @aojea , see if we can move to the std library and remove this dependency https://pkg.go.dev/golang.org/x/time/rate
|
/retest required test spurious failure |
|
/hold cancel ...turned off feature flags |
|
@seans3: The
The following commands are available to trigger optional jobs:
Use
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/test pull-kubernetes-e2e-gce ...unrelated error: |
|
/retest ...unrelated test failure for required test |
|
#119186 (comment) is my only remaining comment, lgtm otherwise |
|
is the fallback e2e running in the alpha job? |
Fixed |
Apparently it is not running in the But it is running in the |
|
/retest ...unrelated test failure in required test. |
|
/retest ...unrelated test failure in required test |
yeah, the thing is that this test has to pass always, independent of the feature flag or not, because it has fallback |
|
/lgtm go go go |
|
LGTM label has been added. DetailsGit tree hash: daff9aa59a28efad0c7d296cea96399112f9612c |
/lgtm That's good, but we also want to exercise the server translation layer. Can we get that test to run in the alpha e2e? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, logicalhan, seans3 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@seans3: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/retest |
Implements
StreamTranslatorproxy, which forwards data from a websocket server into a SPDY client. This proxy allows incremental WebSocket communication legs. This proxy is wrapped by theTranslatingHandler, delegating to theStreamTranslatorproxy if the upgrade request isWebSockets/V5.Implements
FallbackExecutor, which first attempts a WebSocket upgrade, then fallsback to legacy SPDY.Adds
TranslateStreamCloseWebsocketRequestsfeature gate, which is off by default (WebSockets is alpha). An enabled feature gate allows theStreamTranslatorproxy to be delegated from the currentUpgradeAwareproxy forWebSockets/V5upgrade requests.Adds
KUBECTL_REMOTE_COMMAND_WEBSOCKETSenvironment variable feature gate forkubectl, which is off by default. An enabled feature gate substitutes aFallbackExecutorfor the legacySPDYExecutor.Merging this PR will complete
alphafunctionality for transitioning from SPDY to WebSocket for bi-directional streaming. When both feature gates are turned on, the communication leg fromkubectlto the API Server will use the WebSocket protocol forRemoteCommand(e.g.kubectl exec, cp, and attach) instead of SPDY.Manually tested successfully with the following commands using the
nginxpod:$ ./kubectl exec nginx -- date(basic command with STDOUT)$ echo "this is a test" | ./kubectl exec -i nginx -- cat(pipe STDIN to command running on container)$ ./kubectl cp ~/deploy-1.yaml nginx:/(cp file from local to container)$ ./kubectl cp nginx:/product_name /tmp/product_name(cp file from container to local)$ ./kubectl exec -it nginx -- bash(interactive terminal)Example stress test for WebSocket client running through the
StreamTranslatorproxy testing STDIN and STDOUT streams/kind feature
Fixes: #89163