Commit Graph

184 Commits

Author SHA1 Message Date
Maciej Szulik
55d5df8a36
React to moves 2018-10-06 18:44:05 +02:00
Sean Sullivan
fcdc129257 kubectl drain/cmd test: remove testapi dependency 2018-10-02 13:04:29 -07:00
Maciej Szulik
5b55e1f8ed
Create cli-runtime staging repository 2018-08-21 17:08:30 +02:00
juanvallejo
4bdc636380
add updated plugin mechanism 2018-08-15 15:06:29 -04:00
David Eads
8a1eae451b stop adding internal types to external schemes 2018-08-03 09:47:04 -04:00
Mikhail Mazurskiy
bfe313d5f3
Add missing error handling in schema-related code 2018-06-23 21:06:32 +10:00
David Eads
6d117383fc fix describer tests 2018-05-24 10:50:49 -04:00
juanvallejo
3ca222b2d9 wire config flags through factory 2018-05-04 17:02:20 -04:00
juanvallejo
191a48f4c3 wire PrintFlags through get cmd 2018-04-25 15:02:48 -04:00
David Eads
8c1b687356 update more commands for iostreams 2018-04-25 08:45:15 -04:00
juanvallejo
ecaddbfc36
update delete, replace, run cmds 2018-04-16 16:48:39 -04:00
Kubernetes Submit Queue
114d481183
Merge pull request #60793 from charrywanganthony/inert_flag_showall
Automatic merge from submit-queue (batch tested with PRs 60793, 61181, 61267, 61252, 61334). 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>.

--show-all is inert in v1.11

**What this PR does / why we need it**:

`--show-all` is inert in v1.11
ref: #60210

**Special notes for your reviewer**:
/assign @deads2k 

**Release note**:

```release-note
`--show-all` (which only affected pods and only for human readable/non-API printers) is inert in v1.11, and will be removed in a future release.
```
2018-03-21 20:23:07 -07:00
Chao Wang
71a1970bf6 --show-all is inert in v1.11 2018-03-21 09:13:21 +08:00
Kubernetes Submit Queue
a41483a8f5
Merge pull request #60353 from WanLinghao/printer_clean
Automatic merge from submit-queue (batch tested with PRs 60189, 59542, 59931, 60621, 60353). 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>.

clean testprinter

**What this PR does / why we need it**:
testPrinter became useless after patch #60117 
This patch clean it 

**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
```
2018-03-20 00:42:20 -07:00
juanvallejo
8d35f94d51
use temp kubeconfig for fake factory 2018-03-09 15:53:19 -05:00
Cao Shufeng
085e8bf6c4 fix cli example 2018-02-24 14:52:49 +08:00
WanLinghao
6eee5dd421 clean testprinter after commit:
https://github.com/kubernetes/kubernetes/pull/60117

	modified:   pkg/kubectl/cmd/cmd_test.go
	modified:   pkg/kubectl/cmd/resource/get_test.go
2018-02-24 13:41:42 +08: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
David Eads
be04e7c1b1 collapse printing paths 2018-02-21 08:15:22 -05:00
David Eads
dd6405681f cleanup printers some more 2018-02-20 12:59:40 -05:00
juanvallejo
d3773b4b06
consolidate printer OutputOpts w PrintOpts
This patch removes the use of printers.OutputOptions in favor of only
having a single struct for setting / passing printer options set by user
flags.
2017-11-20 14:49:23 -05:00
Kubernetes Submit Queue
56e62b684e
Merge pull request #54053 from WanLinghao/cmd_test_unused_function
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>.

remove unused function in cmd_test.go

PR removed unused defaultClientConfigForVersion() functions from cmd_test.go.



**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-11-17 08:28:26 -08:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
WanLinghao
3be3cf6b64 removed unused defaultClientConfigForVersion()
functions from cmd_test.go.

 modified:   pkg/kubectl/cmd/cmd_test.go
2017-11-09 10:23:56 +08:00
Clayton Coleman
93fed120fb
Move printing the valid resource types to a function
Should be calculated from discovery in the future. Also improve
descriptions on the affected commands.
2017-10-30 23:45:45 -04: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
Clayton Coleman
bdd3116c09
Move more printers to TablePrinter 2017-06-26 11:38:36 -04:00
FengyunPan
f01f9a9035 Output TYPE for getting service
Now service already supported 4 ServiceTypes, ServiceTypes is
friendly to distinguish services, so outputing service type better
when running 'kubectl get service'.
2017-06-18 12:19:57 +08:00
juanvallejo
d036686185
fix --local flag for kubectl set commands 2017-06-13 12:57:05 -04:00
Clayton Coleman
b1abedbc64
Wrap HumanReadablePrinter in tab output unless explicitly asked not to
Fixes an accidental regression. In general, we should not accept an
incoming tabwriter and instead manage at a higher level. Fix the bug and
add a comment re: future refactoring.
2017-06-05 22:06:38 -04:00
Kubernetes Submit Queue
2629bf79f2 Merge pull request #46265 from waseem/printers-genericity
Automatic merge from submit-queue (batch tested with PRs 41563, 45251, 46265, 46462, 46721)

Denote if a printer is generic.

This fixes #38779.

This allows us to avoid case in which printers.GetStandardPrinter
returns nil for both printer and err removing any potential panics that
may arise throughout kubectl commands.

Please see #38779 and #38112 for complete context.
2017-06-02 19:53:40 -07:00
Waseem Ahmad
8442a118ea Denote if a printer is generic.
This fixes #38779.

This allows us to avoid case in which printers.GetStandardPrinter
returns nil for both printer and err removing any potential panics that
may arise throughout kubectl commands.

Please see #38779 and #38112 for complete context.

Add comment explaining adding handlers to printers.HumanReadablePrinter
also remove an unnecessary conversion of printers.HumanReadablePrinter
to printers.ResourcePrinter.
2017-05-31 13:02:23 +05:30
Clayton Coleman
7ce63eb608
Refactor printers to support rendering as a Table
Return tables from the server.
2017-05-29 18:30:10 -04:00
Alexander Campbell
5e1a3fd020 kubectl: improve deprecatedAlias unit test
Two new behaviors are tested:

 1. The output message that deprecatedAlias gives when it is called must
    include the word "deprecatated" and the name of the new function
    that the user should use instead.
 2. The correct function must be called by the alias (alias should "fall
    back" to the functionality of the original.
2017-05-19 14:49:03 -07:00
Alexander Campbell
ca899ec048 kubectl: write unit test for deprecatedAlias() 2017-05-19 11:25:11 -07:00
Jordan Liggitt
31b3e01f1e
Fix error printing objects from kubectl get -w 2017-02-28 22:36:26 -05:00
Clayton Coleman
2aa4abb73b
Refactor commands to use new factory method 2017-02-23 00:28:32 -05: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
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
ymqytw
3cc294b1e0 Revert "support patch list of primitives"
This reverts commit 34891ad9f6.
2016-11-22 21:06:36 -08:00
ymqytw
34891ad9f6 support patch list of primitives 2016-11-09 11:46:59 -08:00