Skip to content

Commit

Permalink
Correct kubectl delete's wrong synopsis
Browse files Browse the repository at this point in the history
  • Loading branch information
feihujiang committed Aug 3, 2015
1 parent 6129d3d commit fa68de4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
7 changes: 3 additions & 4 deletions docs/man/man1/kubectl-delete.1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

.SH NAME
.PP
kubectl delete \- Delete a resource by filename, stdin, resource and name, or by resources and label selector.
kubectl delete \- Delete resources by filenames, stdin, resources and names, or by resources and label selector.


.SH SYNOPSIS
Expand All @@ -13,14 +13,13 @@ kubectl delete \- Delete a resource by filename, stdin, resource and name, or by

.SH DESCRIPTION
.PP
Delete a resource by filename, stdin, resource and name, or by resources and label selector.
Delete resources by filenames, stdin, resources and names, or by resources and label selector.

.PP
JSON and YAML formats are accepted.

.PP
If both a filename and command line arguments are passed, the command line
arguments are used and the filename is ignored.
Only one type of the arguments may be specified: filenames, resources and names, or resources and label selector

.PP
Note that the delete command does NOT do resource version checks, so if someone
Expand Down
5 changes: 2 additions & 3 deletions docs/user-guide/kubectl/kubectl.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ kubectl
* [kubectl cluster-info](kubectl_cluster-info.md) - Display cluster info
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
* [kubectl delete](kubectl_delete.md) - Delete a resource by filename, stdin, resource and name, or by resources and label selector.
* [kubectl delete](kubectl_delete.md) - Delete resources by filenames, stdin, resources and names, or by resources and label selector.
* [kubectl describe](kubectl_describe.md) - Show details of a specific resource or group of resources
* [kubectl exec](kubectl_exec.md) - Execute a command in a container.
* [kubectl expose](kubectl_expose.md) - Take a replicated application and expose it as Kubernetes Service
Expand All @@ -101,8 +101,7 @@ kubectl
* [kubectl stop](kubectl_stop.md) - Deprecated: Gracefully shut down a resource by name or filename.
* [kubectl version](kubectl_version.md) - Print the client and server version information.

###### Auto generated by spf13/cobra at 2015-07-30 03:45:17.319803488 +0000 UTC

###### Auto generated by spf13/cobra at 2015-08-03 05:57:27.777459508 +0000 UTC

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]()
Expand Down
9 changes: 4 additions & 5 deletions docs/user-guide/kubectl/kubectl_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,16 @@ Documentation for other releases can be found at

## kubectl delete

Delete a resource by filename, stdin, resource and name, or by resources and label selector.
Delete resources by filenames, stdin, resources and names, or by resources and label selector.

### Synopsis


Delete a resource by filename, stdin, resource and name, or by resources and label selector.
Delete resources by filenames, stdin, resources and names, or by resources and label selector.

JSON and YAML formats are accepted.

If both a filename and command line arguments are passed, the command line
arguments are used and the filename is ignored.
Only one type of the arguments may be specified: filenames, resources and names, or resources and label selector

Note that the delete command does NOT do resource version checks, so if someone
submits an update to a resource right when you submit a delete, their update
Expand Down Expand Up @@ -119,7 +118,7 @@ $ kubectl delete pods --all

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra at 2015-07-23 17:43:06.942148224 +0000 UTC
###### Auto generated by spf13/cobra at 2015-07-31 02:09:06.816515226 +0000 UTC


<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
Expand Down
7 changes: 3 additions & 4 deletions pkg/kubectl/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ import (
)

const (
delete_long = `Delete a resource by filename, stdin, resource and name, or by resources and label selector.
delete_long = `Delete resources by filenames, stdin, resources and names, or by resources and label selector.
JSON and YAML formats are accepted.
If both a filename and command line arguments are passed, the command line
arguments are used and the filename is ignored.
Only one type of the arguments may be specified: filenames, resources and names, or resources and label selector
Note that the delete command does NOT do resource version checks, so if someone
submits an update to a resource right when you submit a delete, their update
Expand All @@ -63,7 +62,7 @@ func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command {
var filenames util.StringList
cmd := &cobra.Command{
Use: "delete ([-f FILENAME] | (RESOURCE [(NAME | -l label | --all)]",
Short: "Delete a resource by filename, stdin, resource and name, or by resources and label selector.",
Short: "Delete resources by filenames, stdin, resources and names, or by resources and label selector.",
Long: delete_long,
Example: delete_example,
Run: func(cmd *cobra.Command, args []string) {
Expand Down

0 comments on commit fa68de4

Please sign in to comment.