Commit Graph

35 Commits (630c8410759c005894f3189120ccb98542ecf69c)

Author SHA1 Message Date
Matthias Bertschy 9b15af19b2 Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
Cao Shufeng 2273d08f4b remove deprecated -a
ref: https://github.com/kubernetes/kubernetes/pull/60210
ref: https://github.com/kubernetes/kubernetes/pull/60793
2018-03-26 14:40:28 +08:00
Jordan Liggitt 0d5b9dd3d4
Avoid error on closed pipe 2018-01-03 16:44:50 -05:00
Shiyang Wang 1010916c1a add cmd-test for sort-by command 2017-08-11 15:53:31 +08:00
Kubernetes Submit Queue 22cc294364 Merge pull request #46598 from xiangpengzhao/fix-kubectl-version
Automatic merge from submit-queue (batch tested with PRs 46210, 48607, 46874, 46598, 49240)

Make "kubectl version" json format output more readable.

**What this PR does / why we need it**:
##39858 adds a flag --output to `kubectl version`, but the json format output is displayed in one line. It's not so readable. This PR fixes it.

and

- adds a shorthand for `output`
- ~~refactors that: if `--short` is specified, `--output` will be ignored~~

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

**Special notes for your reviewer**:
/cc @php-coder @alejandroEsc 

**Release note**:

```release-note
NONE
```
2017-07-21 17:00:21 -07:00
xiangpengzhao a6be3b64f8 Make "kubectl version" json output more readable. 2017-07-18 11:21:35 +08:00
Cao Shufeng c28efb85ff add cmd test for kubectl auth can-i 2017-06-03 17:01:00 +08:00
Alejandro Escobar a5e6dcb434 addressing issue #39427 adding a flag --output to allow for either json or yaml.
updating with PR changes requested.

latest changes to having short for human readable only, and error cases moved a bit to the end.

rebase fixes

latest pr. changes.

small change moving return nil out of switch.

updated the nil check for the error in the humanreadable case.

more optimization in humanreadable code.

pushed up current test changes, this is purely temporary

finished writing tests

updated test and function names.

changed output extensions from .sh to output.

updated version, version struct now just called Version and not VersionObj.

made a few changes to testing.

fixed testing issues, created better test and cleanup

go format change.
2017-03-28 10:07:53 -07:00
Clayton Coleman 4e7c10a520
Don't bypass filter on generic output
It is inconsistent and confusing (filtering is orthogonal from output)
and we don't want to regress behavior from 1.5.
2017-03-02 15:58:22 -05:00
nikhiljindal b6e2a09c2b Add cascading deletion test cases to kubectl tests 2017-02-23 12:04:13 -08:00
juanvallejo 5ec2a4c3ca only output "No resources found." for human readable printers 2017-01-27 13:30:23 -05:00
Jordan Liggitt a7f52b276f
Add test shell stack traces 2017-01-25 13:34:16 -05:00
nikhiljindal 5424d50c03 Adding test-federation-cmd.sh to test kubectl with federation apiserver 2017-01-04 11:17:05 -08:00
Jan Chaloupka 7992123449 --export flag belongs to kubectl get, not kubectl
When running the kubectl via symlink to hyperkube, the --export is not delegated to 'kubectl get' but to 'kubectl' only.
Ending with unrecognized flag.
2016-11-17 15:45:55 +01:00
Clayton Coleman 6e25830378
Add --force to kubectl delete and explain force deletion
--force is required for --grace-period=0. --now is == --grace-period=1.
Improve command help to explain what graceful deletion is and warn about
force deletion.
2016-11-02 17:44:05 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Jan Chaloupka dd2c9c578d Introduce kubectl describe --show-events
Introduce DescriberSettings for Describer display options
Introduce --show-events flag and DescriberSettings in Describer methods
Introduce unit-tests
Regenerated kubectl describe docs
Add events flag tests to test-cmd.sh

Signed-off-by: dhodovsk@redhat.com
Signed-off-by: jchaloup@redhat.com
2016-05-06 11:40:11 +02:00
jay vyas 7a824aaf49 Cassandra de-flake 2016-05-04 21:11:56 -04:00
Brendan Burns 4123a61df7 Add the client side bits of kubectl export 2015-12-22 10:41:59 -08:00
feihujiang 98689a99ec Limit the type for kubectl expose command 2015-09-15 11:17:04 +08:00
Dai Zuozhuo 2e2ef3e830 change -o template to -o go-template=... 2015-09-05 22:30:47 +08:00
Saad Ali 489e75e073 Merge pull request #12202 from daizuozhuo/kubectl
add jsonpath to kubectl
2015-08-20 14:31:45 -07:00
Clayton Coleman 9267f829eb Update tests to prepare for graceful deletion
For cases where we want to immediately cleanup the pod, start using
gracePeriod 0 in test cases.
2015-08-19 22:20:29 -04:00
Dai Zuozhuo b61a905b19 add jsonpath to kubectl 2015-08-20 08:57:24 +08:00
Robert Bailey 08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Clayton Coleman b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
feihujiang 73b694e6c1 kubectl describe <kind> work with no arguments
Add describe_resource_assert to test describe <kind> with no object arg
2015-08-10 14:08:38 +08:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Clayton Coleman 984692d205 Verify in hack/test-cmd 2015-06-01 19:24:01 -04:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Tim Hockin eeff1b74fb Fixes from feedback and testing 2015-03-30 23:52:37 -07:00
Deyuan Deng 58776da6a4 Add more information to node describe 2015-03-09 18:56:59 -04:00
Salvatore Dario Minonne 75f2efb500 moving ParseSelector to Parse for labels only. 2015-03-05 22:39:36 +01:00
Filip Grzadkowski 6ad2b86181 Fix hack/test-cmd.sh so that it passes on a local machine 2015-03-03 17:23:55 +01:00
Lénaïc Huard c23046dc0a Assert pre and post conditions of all commands in test-cmd.sh
`hack/test-cmd.sh` contains a list of `kubectl` commands to test.
However, the effect of the execution of those commands was not systematically
checked. As a consequence, it was possible to break a command without breaking
those tests.

This commit surrounds every single `kubectl` command with assertions on
pre and post condition.
2015-02-25 18:26:30 +01:00