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

Pod attach #64

Open
5 tasks
vigoo opened this issue Jan 29, 2021 · 0 comments
Open
5 tasks

Pod attach #64

vigoo opened this issue Jan 29, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@vigoo
Copy link
Collaborator

vigoo commented Jan 29, 2021

Endpoint:

/api/v1/namespaces/{namespace}/pods/{name}/attach

This is one of the cases where the action in the schema is specified as connect.
This means that the request has to be upgraded to a websocket connection. Both sttp ZIO backends supports websockets so this should be simple to implement. Other than that it is structured like a subresource, so the simplest way to add it is to add support for the connect action for subresources and everything else will be generated automatically.

Very similar to #65 and #66.

It is possible to examine how it works with kubectl attach -v=9.

Example upgrade headers:

X-Stream-Protocol-Version: v4.channel.k8s.io
Date: Sun, 14 Feb 2021 10:28:04 GMT
Connection: Upgrade
Upgrade: SPDY/3.1

Steps to do:

  • Implement the connect action by using websockets in Subresource, SubresourceClient and TestSubresourceClient
  • Check classification and EndpointType in the code generator, it most likely needs support there too
  • Support it in the SubresourceClientGenerator
  • Support it in the ClientModuleGenerator
  • Remove from codegen whitelist
@vigoo vigoo added the enhancement New feature or request label Jan 29, 2021
This was referenced Feb 14, 2021
@vigoo vigoo added this to the 1.1 milestone Mar 12, 2021
@vigoo vigoo self-assigned this Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant