Commit Graph

39 Commits

Author SHA1 Message Date
Maciej Szulik
5b55e1f8ed
Create cli-runtime staging repository 2018-08-21 17:08:30 +02:00
Sean Sullivan
d4e9233875 moved dependency within kubernetes core to staging 2018-08-10 13:45:17 -07:00
juanvallejo
3a3633a32e
update logs 2018-08-01 10:44:44 -04:00
David Eads
5ba07364ee fix logs command to be generic for all resources again 2018-07-20 15:10:44 -04:00
David Eads
c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02:00
David Eads
eabfcfaa2b start splitting polymorphic functions out of the factory 2018-05-17 08:55:31 -04:00
Di Xu
e8ef744493 fix missing flag value bindings in kubectl 2018-05-14 14:38:54 +08: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
a06f0077bd Support multi-container pod for "kubectl logs"
kubectl logs -l will print logs for pods with the same label, however
it doesn't support pods with multi containers. This change adds support
to it with --all-containers.

Ussage:
$ kubectl logs my-pod --all-containers
$ kubectl logs -laa=bb --all-containers
$ kubectl logs my-pod my-container --all-containers (err: --all-containers=true should not be specifiled with container name my-container)
2018-03-27 11:44:31 +08: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
Kubernetes Submit Queue
b9eee8fd6b
Merge pull request #54902 from YuxiJin-tobeyjin/addunitforlogs
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>.

Supplement unit test for kubectl logs

**What this PR does / why we need it**:
Supplement unit test for kubectl logs

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE

```
2017-12-16 09:15:26 -08:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
YuxiJin-tobeyjin
655d734138 Add complementary unittest for kubectl logs 2017-11-01 10:35:50 +08: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
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
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
deads2k
81ae13084d handle non-generated client removal 2016-10-26 16:10:41 -04: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
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
Clayton Coleman
0a274a85d1 Allow logs to be used with a preloaded pod. 2016-03-21 23:59:59 -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
Tim Hockin
43ed74748e Clean up and document validation strings
Also add a detail string for Required and Forbidden.  Fix tests.
2015-12-18 09:40:50 -08:00
hurf
91ad5b4ec3 Cleanup logs command
use 'logs' instead of 'log'
2015-11-25 14:11:27 +08:00