-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Stream Translator Proxy and FallbackExecutor for WebSockets #119186
Stream Translator Proxy and FallbackExecutor for WebSockets #119186
Conversation
/sig api-machinery |
1dcb306
to
a372caa
Compare
/retest |
a372caa
to
1785deb
Compare
@seans3: The
The following commands are available to trigger optional jobs:
Use
In 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:
|
3ff941f
to
210c8aa
Compare
/retest ...unrelated test failure for required test
|
210c8aa
to
b6bb8f8
Compare
#119186 (comment) is my only remaining comment, lgtm otherwise |
is the fallback e2e running in the alpha job? |
b6bb8f8
to
168998e
Compare
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. Git 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
Needs 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. 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. I understand the commands that are listed here. |
/retest |
Implements
StreamTranslator
proxy, 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 theStreamTranslator
proxy if the upgrade request isWebSockets/V5
.Implements
FallbackExecutor
, which first attempts a WebSocket upgrade, then fallsback to legacy SPDY.Adds
TranslateStreamCloseWebsocketRequests
feature gate, which is off by default (WebSockets is alpha). An enabled feature gate allows theStreamTranslator
proxy to be delegated from the currentUpgradeAware
proxy forWebSockets/V5
upgrade requests.Adds
KUBECTL_REMOTE_COMMAND_WEBSOCKETS
environment variable feature gate forkubectl
, which is off by default. An enabled feature gate substitutes aFallbackExecutor
for the legacySPDYExecutor
.Merging this PR will complete
alpha
functionality for transitioning from SPDY to WebSocket for bi-directional streaming. When both feature gates are turned on, the communication leg fromkubectl
to 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
nginx
pod:$ ./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
StreamTranslator
proxy testing STDIN and STDOUT streams/kind feature
Fixes: #89163