Commit Graph

47 Commits (284e8182a402cfd545fc000fedaea071fed873b0)

Author SHA1 Message Date
David Eads a89291a5de stop duplicating preferred version order 2018-04-26 10:03:36 -04:00
Cao Shufeng edce292a1f Remove invalid comments in unit tests 2018-03-10 15:08:12 +08:00
juanvallejo 8d35f94d51
use temp kubeconfig for fake factory 2018-03-09 15:53:19 -05:00
David Eads 6047ead2e5 simplify kubectl testing factory 2018-02-23 08:02:53 -05:00
David Eads d8a5420b7c remove unneeded factory codec methods 2018-02-21 15:20:20 -05:00
linweibin fa8afc1d39 Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Solly Ross eac2049fc9 [client-go] avoid Registry in fake REST client
Previously, the fake RESTClient in client-go required a Registry.  It
used the Registry to fetch the GroupVersion for the fake client.
However, the way it did so was dubious in some cases (it hard-coded the
default API group in places), and not strictly necssary.

This updates the fake client to just recieve the GroupVersion and
internal group name directly, instead of requiring a Registry, so that
it can be consumed in unit tests where a Registry isn't necessarily
readily available (e.g. elsewhere in client-go).
2017-10-19 11:01:44 -04:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
zhengjiajin 9ecab7e20c clean up: put test description in head to locate quickly 2017-05-19 02:04:59 +08:00
Dmitry Shulyak 2612e0c78a Move client/unversioned/remotecommand to client-go
Module remotecommand originally part of kubernetes/pkg/client/unversioned was moved
to client-go/tools, and will be used as authoritative in kubectl, e2e and other places.

Module remotecommand relies on util/exec module which will be copied to client-go/pkg/util
2017-05-15 16:28:56 +03:00
Dmitry Shulyak f50480c714 Decouple remotecommand client from term/kubelet dependencies
In order to move client/unversioned/remotecommand to client-go as a followup
for this change we have to decouple it from tons of dependencies
2017-04-13 15:56:40 +03:00
shiywang 52e4be2578 Be able to specify the timeout to wait for pod for kubectl logs/attach 2017-03-14 23:00:31 +08:00
shiywang 919cb19706 kubectl attach support for multiple types
hot fix

add unit test and statefulSet

update example

remove package

change to ResourceNames

remove some code

remove strings

add fake testing func for AttachablePodForObject

minor change

add test.obj nil check

update testfile

gofmt

update

add fallthough

revert back
2017-02-08 16:10:55 +08:00
deads2k 502bfdf944 client/restclient/fake move to client-go 2017-01-25 08:29:48 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu fd2fdfba89 move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
Angus Salkeld d58554a647 Move the common test functions from cmd_test.go to cmd/testing/fake.go
This is so that we can use NewAPIFactory() from cmd/set/*test.go
Up until now we would get a import loop error.

This commit also adds a basic unit test case for cmd/set/set_image.go
2016-10-19 08:53:26 +10:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
deads2k 9d43f7e52c convert more command to use a generated clientset 2016-09-12 07:38:34 -04:00
deads2k 1d5e5532ed add ClientSet to factory to remove non-generated client 2016-09-07 09:44:01 -04:00
Andy Goldstein 77b0547b3d Fix Windows terminal handling
Fix some issues with Windows terminal handling with respect to TTYs that came up as part of the
code that adds support for terminal resizing.
2016-07-20 13:37:14 -04:00
k8s-merge-robot 50172148e4 Merge pull request #25273 from ncdc/exec-sigwinch
Automatic merge from submit-queue

Support terminal resizing for exec/attach/run

```release-note
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.
```

Fixes #13585
2016-07-14 07:26:49 -07: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
Wojciech Tyczynski 7403564366 Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Dr. Stefan Schimanski 0acca44dc1 Error out on non-existing container in kubectl attach 2016-06-28 21:11:29 +02:00
Sylwester Brzeczkowski a558cadedd Fix attach command for InitContainers 2016-06-24 14:35:02 +02:00
Wojciech Tyczynski 5d046fed41 Fix tests for renegotiation 2016-05-12 08:21:11 +02:00
Clayton Coleman 3a29e3971b Improve terminal reuse and attach
Currently attach and the editor do not share the same logic for saving
and restoring the terminal, and are not suitable for nesting (when the
caller wants to create something, attach, and then delete something when
the attach is over).  This commit moves the interrupt protection logic
to a util package and supports nesting interrupt handlers.
2016-03-21 23:59:58 -04:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Clayton Coleman 38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -05:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
deads2k a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
Kris eacf65ddce Renaming HTTPClientFunc to CreateHTTPClient 2015-11-11 11:54:58 -08:00
Fabiano Franz c60f19a1f8 Attach must only allow a tty when container supports it 2015-11-02 09:56:58 -05:00
Clayton Coleman 7f6f85bd7b Fix attach, which was broken during the refactor
The new e2e test catches the break in attach (no e2e test
exposed this codepath before).
2015-10-16 20:33: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
Chao Xu ac5481d089 move client/unversioned/fake.go to its own package 2015-09-11 17:33:54 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Brendan Burns 97cb1cd071 Add support for attach to kubectl 2015-07-30 12:56:18 -07:00