Commit Graph

187 Commits (ba611194f7eda2257e32399cb98603c6a45998a4)

Author SHA1 Message Date
Kubernetes Submit Queue 9ce8f10a4d Merge pull request #39172 from foxish/fix-help
Automatic merge from submit-queue

Add PDB to kubectl get --help.

**What this PR does / why we need it**: Adds PDB to kubectl get --help

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: Fixes https://github.com/kubernetes/kubernetes/issues/39100

**Release note**:

```release-note
NONE
```

/cc @saad-ali @mwielgus
2016-12-27 13:19:36 -08:00
Brendan Burns 277306449b Add initial translation support. 2016-12-23 20:45:52 -08:00
Anirudh 7f0bcb3688 Add PDB to kubectl get --help. 2016-12-22 14:47:11 -08:00
ymqytw b6cfa9aa98 warn user if they try to apply on an object without the annotation 2016-12-09 17:29:31 -08:00
Kubernetes Submit Queue 1552edbf0c Merge pull request #37366 from xilabao/extend-cmd-valid-resources-information
Automatic merge from submit-queue (batch tested with PRs 37366, 36373)

extend cmd valid resources information about roles
2016-12-05 08:13:40 -08:00
Kubernetes Submit Queue 39e63e3e53 Merge pull request #37608 from tianshapjq/modify-get-help
Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678)

add some help info about the 'all' arg

**What this PR does / why we need it**:
There is an arg named "all" in the get command, we can use it like "kubectl get all". But we can get nothing about this arg in the help description. Users may not know how to use it without looking into the source code. So here I'm going to add some description about this arg.

**Which issue this PR fixes** 
We discussed about this in 
In pkg/kubectl/cmd/get.go there is a confused arg named "all" [#37533](https://github.com/kubernetes/kubernetes/issues/37533)
2016-12-02 23:32:44 -08:00
tianshapjq d0ba378177 add some help info about the 'all' arg 2016-11-29 14:45:10 +08:00
Clayton Coleman 7cdb6b169d
When --grace-period=0 is provided, wait for deletion
The grace-period is automatically set to 1 unless --force is provided,
and the client waits until the object is deleted.

This preserves backwards compatibility with 1.4 and earlier. It does not
handle scenarios where the object is deleted and a new object is created
with the same name.
2016-11-23 15:02:43 -06:00
xilabao c526849436 extend cmd valid resources information 2016-11-23 17:49:43 +08:00
Anirudh 4b53a32e14 Adding statefulset to the kubectl output for valid resources 2016-11-17 13:53:23 -08:00
Kubernetes Submit Queue 7bb031da3a Merge pull request #30237 from mikedanese/csr-porcelain
Automatic merge from submit-queue

implement kubectl procelain csr commands

cc @gtank

ref #30163
2016-11-09 16:57:49 -08:00
Mike Danese 584689f182 implement kubectl procelain csr commands 2016-11-08 06:33:46 -08:00
ymqytw b73fae6c55 Fix kubectl drain for statefulset and use eviciton for drain if possible 2016-11-07 16:13:06 -08:00
Kubernetes Submit Queue da56dc1e33 Merge pull request #35206 from juanvallejo/jvallejo/exit-w-errorcode-on-non-existent-cmds
Automatic merge from submit-queue

update default run function for sub-commands

**Release note**:

``` release-note
release-note-none
```

This patch updates parent commands of sub-commands to exit with a usage
error and exit code 1 on an invalid (non-sub-command) argument.

cc @kargakis
2016-11-05 07:33:46 -07:00
Kubernetes Submit Queue 24899597b9 Merge pull request #32687 from jouve/resource_type
Automatic merge from submit-queue

update list of vailable resources

Hi,

kubectl get --help produce a list of resource types and aliases :

```
Valid resource types include:
   * clusters (valid only for federation apiservers)
   * componentstatuses (aka 'cs')
   ...
```

``` release-note
Update the list of resources in kubectl get --help
```

The list is currently outdated (for exemple missing networkpolicy).

http://kubernetes.io/docs/user-guide/kubectl-overview/#resource-types has the same data and is also outdated.

The patch updates these 2 lists.
2016-10-31 09:28:29 -07:00
juanvallejo 988e747649 update default run function for sub-commands
This patch updates parent commands of sub-commands to exit with a usage
error and exit code 1 on an invalid (non-sub-command) argument.
2016-10-31 10:08:12 -04:00
Cyril Jouve ffcc2f61b5 update available resource list 2016-10-30 21:47:25 +01:00
Brendan Burns d65757fb88 add kubectl cp 2016-10-29 20:24:54 -07:00
Kubernetes Submit Queue 739f78fad2 Merge pull request #33250 from ymqytw/edit_before_create
Automatic merge from submit-queue

support editing before creating resource

Support `kubectl create -f config.yaml --edit`
Support editing before creating resource from files, urls and stdin.
The behavior is similar to `kubectl edit`
It won't create anything when edit make no change.

partial: #18064

Based on: #33686 and #33973

```release-note
Support editing before creating resource from files, urls and stdin, e.g. `kubectl create -f config.yaml --edit`
It won't create anything when edit make no change.
```
2016-10-29 11:45:43 -07:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
ymqytw c641834bb3 support editing before creating resource 2016-10-24 09:56:37 -07:00
Fabiano Franz 4d641c4911 Use responsive writer in help 2016-10-17 11:50:02 -02:00
Fabiano Franz f6d1ac72a0 Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
Angus Salkeld ea1063a263 Assign options.Err in "set image"
There is a usage of options.Err in a Printf, but this option is never set.
This patch passes the stderr into the command and assigns the option correctly.
2016-10-14 11:17:03 +10:00
AdoHe b2280a646a update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
juanvallejo 0988f967f0 add check to NewCmdExec before printing suggestion
checks that the "describe" command and a parent command path exist
before printing suggestion to use the describe command to list
containers in a pod.
2016-09-28 18:02:33 -04:00
juanvallejo 48370b2802 suggest use of `kube explain <resource>` in kube get output
This patch improves usability flow, making it easier for a user to
discover the command `kube explain <resource>` through `kube get`
output.
2016-09-28 14:54:15 -04:00
Marcin Maciaszczyk d2a288de6a Remove kubectl namespace command 2016-09-22 15:46:20 +02:00
juanvallejo f8cc2ab3b8
add suggestion to use `describe` to obtain container names 2016-09-07 13:06:22 -04:00
Kubernetes Submit Queue c98a1e2416 Merge pull request #31333 from xingzhou/kube-25287
Automatic merge from submit-queue

Fixed incomplete kubectl bash completion.

Added bash completion for several kubectl commands.

Fixes #25287
2016-09-01 10:49:51 -07:00
nikhiljindal 0fcbde5ee1 Adding clusters to the list of valid resources printed in kubectl help 2016-08-30 18:57:35 -07:00
Xing Zhou 80d6cd0a40 Added bash completion for several kubectl commands.
This path added/fixed bash completion for several
kubectl commands.

Fixes #25287
2016-08-30 13:12:09 +08:00
Kubernetes Submit Queue c2f8c265b4 Merge pull request #30958 from lojies/addvalidresourceforexplain
Automatic merge from submit-queue

add valid resources when args is nil

add valid resources message is more friendly to user when running `kubectl explain`
and this also can be same with other cmd like get\describe.
2016-08-25 01:38:52 -07:00
Kubernetes Submit Queue bdeeb9db90 Merge pull request #31135 from xingzhou/bash_completion_bug
Automatic merge from submit-queue

Fixed two issues of kubectl bash completion.

This patch includes the fix of the following issue:
• Correct the method invocation from "__kubectl_namespace_flag"
  to "__kubectl_override_flags"
• Support bash completion if "--namespace=xxx" style flags are
  specified in the kubectl command

Fixes #31134
2016-08-24 23:43:20 -07:00
lojies f21c37db64 change to stderr 2016-08-23 14:51:56 +08:00
lojies f5b7a6e2a3 add valid resources when args is nil 2016-08-23 09:40:57 +08:00
Xing Zhou 48100f7117 Fixed two issues of kubectl bosh completion.
This patch includes the fix of the following issue:
• Correct the method invocation from "__kubectl_namespace_flag"
  to "__kubectl_override_flags"
• Support bash completion if "--namespace=xxx" style flags are
  specified in the kubectl command

Fixes #31134
2016-08-23 01:13:38 +08:00
AdoHe b411fe217f update kubectl help output for better organization 2016-08-20 08:03:39 +08:00
vefimova f20c40ed65 Added warning msg for `kubectl get`
- added warning description regarding terminated objects to `get` long help message
  - added printing of warning message in case of `get pods` if there are hidden pods
Fixes #22986
2016-08-15 22:49:37 +00:00
mksalawa 5df9fe684d Implement kubectl top command with subcommands. 2016-08-11 17:25:18 +02:00
lojies 79f09cb687 add shorthand cm for configmaps 2016-07-27 10:54:11 +08:00
Sergey Lukjanov 3c0f0474d3 Add "deploy" abbrev for deployments to kubectl 2016-07-12 16:52:17 +03:00
k8s-merge-robot b71b6eb8e8 Merge pull request #25646 from nhlfr/kubectl-petset-resource
Automatic merge from submit-queue

Include petsets in kubectl valid commands

Petsets are already implemented in kubectl, but there were no hints
for that subcommand.

Fixes #25615
2016-07-08 16:36:54 -07:00
Davanum Srinivas e3146456d3
Change Commands to Sub-commands in help 2016-07-06 23:29:49 -04:00
Davanum Srinivas 59142694bf
Remove Extra line after Aliases 2016-07-06 23:28:11 -04:00
Davanum Srinivas 91f16364b8
kubectl should print usage at the bottom
Override the Usage: output using SetUsageTemplate. Just moved
the strings in the template to make sure we print Usage: at
the bottom of the output and not at the top.

Fixes issue 7496
2016-07-05 10:08:51 -04:00
k8s-merge-robot 23e7b6653f Merge pull request #27049 from andreykurilin/kubectl_help
Automatic merge from submit-queue

Implement custom help command for kubectl

```release-note
* kubectl help now provides "Did you mean this?" suggestions for typo/invalid command names.
```

Custom implementation of help command allows to print `Did you mean this?` with
suggestions, which is missed in embed help command from github.com/spf13/cobra

Also, it can be extended with different search features. At this patch, help
command searches query in short descriptions of commands in case of mismatch
with commands names.

fixes #25234
2016-06-30 16:32:16 -07:00
Andrey Kurilin 48d47b1027 Implement custom help command for kubectl
Own implemenation of help command allows to print `Did you mean this?` with
suggestions, which is missed in embed help command from github.com/spf13/cobra

Also, it can be extended with different search features. At this patch, help
command search query in short descriptions of commands in case of mismatch
with commands names.

fixes #25234
2016-07-01 00:35:56 +03:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Dr. Stefan Schimanski e78d7749a5 Add awareness of more override flags in bash-completion 2016-06-28 20:56:36 +02:00