Commit Graph

56 Commits (c582a37cae02b4d1a850e6668ea8ea0a81dcd204)

Author SHA1 Message Date
David Eads 8a1eae451b stop adding internal types to external schemes 2018-08-03 09:47:04 -04:00
David Eads dd2af1c8a4 snip legacy scheme uses we don't need 2018-08-02 14:17:17 -04:00
David Eads c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02:00
David Eads c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
David Eads facd04be43 use IOStreams for cli commands 2018-05-08 09:02:34 -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
Kubernetes Submit Queue 39c7e9242b
Merge pull request #60139 from soltysh/deprecate_scale_job
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deprecate kubectl scale job

**What this PR does / why we need it**:
With the generic scaler (https://github.com/kubernetes/kubernetes/pull/58298) the only problem is job and as discussed in https://github.com/kubernetes/kubernetes/pull/58468#issuecomment-360794229 and during SIG CLI we've agreed that scaling jobs was a mistake we need to revert. 
This PR deprecates scale command for jobs, only. 

/assign @deads2k @pwittrock 

**Release note**:
```release-note
Deprecate kubectl scale jobs (only jobs). 
```
2018-02-22 01:29:30 -08:00
Maciej Szulik 2935fd69e9
Change printDeprecationWarning to use fmt.Fprintf instead of glog 2018-02-21 22:38:39 +01: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
ymqytw 4487cc5e15 switch some commands to use its own scheme 2017-10-27 18:31:42 -07: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
ymqytw f0ce897277 move term to kubectl/util 2017-06-30 15:00:24 -07: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
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
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
AdoHe b2280a646a update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
Illia Khudoshyn ea12b32d6a Allow 'pod/' prefix in pod name for 'kubectl exec'
Fixes #24225

This PR adds ability to provide pod name with 'pod/' prefix for 'kubectl exec' command. Pod names without 'pod/' prefix are still allowed.
2016-10-12 17:42:31 +03: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
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
Wojciech Tyczynski 5d046fed41 Fix tests for renegotiation 2016-05-12 08:21:11 +02: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
k8s-merge-robot cadb6c06be Merge pull request #14161 from feihujiang/letKubectlExecFollowDashRule
Auto commit by PR queue bot
2015-10-19 08:58:37 -07:00
feihujiang 4f38e8a745 Let kubectl exec follow dash rule 2015-10-12 01:29:07 +08: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
Clayton Coleman 0b5410f30f Exec should be easier to reuse as a command
We have a few use cases where we want to have shortcut commands
for common behavior. In these cases, we want to default commands
with a simpler syntax, so being able to reuse Exec from code but
not share the same arguments is useful.

In this case, we're introducing 'rsh' which tries to run exec -itp --
bash.
2015-07-24 18:14:28 -04:00