Commit Graph

16 Commits (00aae980e889e8a5731ad4639154b6524ee8749a)

Author SHA1 Message Date
Matt Liggett 805a740d64 Fix lint error in remotecommand.go
Before:

pkg/client/unversioned/remotecommand/remotecommand.go:101:9: should omit type http.RoundTripper from declaration of var rt; it will be inferred from the right-hand side

Please fix the above errors. You can test via "golint" and commit the result.
2016-10-17 17:26:27 -07:00
bindata-mockuser e792d4117d Add return code support to kubectl-exec and -run 2016-08-20 15:58:47 +02:00
Andy Goldstein 3b21a9901b Support terminal resizing for exec/attach/run
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
2016-07-13 17:06:16 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Andy Goldstein 4551ba6b53 Refactor exec code to support version skew testing
Refactor exec/attach client and server code to better support interoperability testing of different
client and server subprotocol versions.
2016-04-01 13:05:50 -04:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Kris 9b75b88d4e Move client's tranport to a separate package 2015-11-19 14:55:47 -08:00
Jordan Liggitt ddae749111 Read error from failed upgrade attempts 2015-11-02 22:39:58 -05:00
Andy Goldstein 6fddb0e83a Add httpstream.Handshake unit test 2015-10-23 14:09:41 -04:00
Andy Goldstein ff9883d9ec Address code review comments 2015-10-21 21:53:51 -04:00
Andy Goldstein 6c7b519619 Move protocol handlers to separate files 2015-10-21 21:53:51 -04:00
Andy Goldstein 3d1cafc2c3 Add streaming subprotocol negotiation
Add streaming subprotocol negotiation for exec, attach, and port
forwarding. Restore previous (buggy) exec functionality as an
unspecified/unversioned subprotocol so newer kubectl clients can work
against 1.0.x kubelets.
2015-10-21 21:53:51 -04:00
Clayton Coleman 3f1b18fbba Refactor exec to make attach useful without a client.Config
The current executor structure is too dependent on client.Request
and client.Config. In order to do an attach from the server, it needs
to be possible to create an Executor from crypto/tls#TLSConfig and to
bypassing having a client.Request.

Changes:

* remotecommand.spdyExecutor - handles upgrading a request to SPDY and getting a connection
* remotecommand.NewAttach / New - moved to exec / portforward / attach since they handle requests
* Remove request.Upgrade() - it's too coupled to SPDY, and can live with the spdyExecutor
* Add request.VersionedParams(runtime.Object, runtime.ObjectConvertor) to handle object -> query transform
2015-10-09 14:36:46 -04:00
Andy Goldstein c83786979c Various exec fixes
If stdin is noninteractive, the io.Copy from stdin to remoteStdin will
unblock when it finishes reading from stdin. In this case, make sure to
close remoteStdin so the server knows the client won't be sending any
more data. This ensures that the remote process terminates. For example:

echo foo | kubectl exec -i <pod> -- cat

Without this change, the `cat` process never terminates and `kubectl
exec` hangs.

Fix interactive exec sessions hanging after you type 'exit'.

Add e2e test to cover noninteractive stdin: `echo a | kubectl exec -i <pod>
cat`

Add e2e test to cover psuedo-interactive stdin: `kubectl exec -i <pod> bash`

Prep for sending multiple data frames over multiple streams in remote command
test, which is more likely to find flakes (requires bump of spdystream
once an issue with the frame worker queues not being fully drained when
a goaway frame is received).
2015-09-04 10:40:53 -04:00
Kris Rousey 9cea046f42 Get the unversioned client to build 2015-08-18 10:03:19 -07:00
Kris Rousey 7ba5b058cc Moving client libs to unversioned dir 2015-08-18 10:03:19 -07:00