Expand description
The Kubernetes remote command protocols of exec and attach sessions, as k8s.io/cri-streaming serves them for CRI-O otherwise.
Clients speak them over WebSocket, v5.channel.k8s.io and the versions
before it, or over SPDY. The kubelet proxies them unchanged, but the API
server translates v5.channel.k8s.io to SPDY, which kubectl arrives with
then. Each transport turns the input of the client into ClientEvents,
and Output sends the output of a session the way its protocol needs
it.
Modulesยง
- spdy ๐
- Exec and attach over SPDY: the protocol versions, the streams of a session and the input of the client.
- status ๐
- The final status of a session, as the client gets it.
- websocket ๐
- Exec and attach over a WebSocket: the framing of each subprotocol and the input of the client.
Structsยง
- Output ๐
- The sending half of a session. A failing send means that the client went away, which ends the session. After a clean close of a WebSocket client, sends fail as well, the output gets dropped then. The session still forwards the stdin which the client sent before its close to the process and reads the output meanwhile, so that the process does not wait for it. A SPDY connection which ends after the client closed its stdin counts as a clean close.
Enumsยง
- Client
Event ๐ - What a client sends during a session.
- Stdin ๐
- The stdin of a client.
- Transport ๐
- Version ๐
- A version of the protocols, which decides how a session reports its status and whether the client resizes terminals.
Constantsยง
- CLOSE_
BYTE ๐ - The channel which closes another one, since
v5.channel.k8s.io. - MESSAGE_
TOO_ ๐LARGE - The failure of a session whose client sent a message larger than the server takes.
- RESIZE_
BYTE ๐ - The channel of the resize events.
- STDERR_
BYTE ๐ - The channel of stderr.
- STDIN_
BYTE ๐ - The channel of stdin, the first byte of a WebSocket message.
- STDOUT_
BYTE ๐ - The channel of stdout.
- STREAM_
ERR_ ๐BYTE - The channel of the status of the session.
- SUCCESS_
STATUS ๐ - The status of a session which succeeded. The kubelet sends it as well, some clients take an empty error stream for a failure.
Traitsยง
- Client
Input ๐ - The input of a client.