Using NAME to replace ID in help string
This commit is contained in:
@@ -32,7 +32,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
delete_long = `Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
|
||||
delete_long = `Delete a resource by filename, stdin, resource and name, or by resources and label selector.
|
||||
|
||||
JSON and YAML formats are accepted.
|
||||
|
||||
@@ -42,16 +42,16 @@ arguments are used and the filename is ignored.
|
||||
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
|
||||
will be lost along with the rest of the resource.`
|
||||
delete_example = `// Delete a pod using the type and ID specified in pod.json.
|
||||
delete_example = `// Delete a pod using the type and name specified in pod.json.
|
||||
$ kubectl delete -f pod.json
|
||||
|
||||
// Delete a pod based on the type and ID in the JSON passed into stdin.
|
||||
// Delete a pod based on the type and name in the JSON passed into stdin.
|
||||
$ cat pod.json | kubectl delete -f -
|
||||
|
||||
// Delete pods and services with label name=myLabel.
|
||||
$ kubectl delete pods,services -l name=myLabel
|
||||
|
||||
// Delete a pod with ID 1234-56-7890-234234-456456.
|
||||
// Delete a pod with UID 1234-56-7890-234234-456456.
|
||||
$ kubectl delete pod 1234-56-7890-234234-456456
|
||||
|
||||
// Delete all pods
|
||||
@@ -61,8 +61,8 @@ $ kubectl delete pods --all`
|
||||
func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
var filenames util.StringList
|
||||
cmd := &cobra.Command{
|
||||
Use: "delete ([-f FILENAME] | (RESOURCE [(ID | -l label | --all)]",
|
||||
Short: "Delete a resource by filename, stdin, resource and ID, or by resources and label selector.",
|
||||
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.",
|
||||
Long: delete_long,
|
||||
Example: delete_example,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
@@ -45,7 +45,7 @@ $ kubectl scale --current-replicas=2 --replicas=3 replicationcontrollers foo`
|
||||
// NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale
|
||||
func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT RESOURCE ID",
|
||||
Use: "scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT RESOURCE NAME",
|
||||
// resize is deprecated
|
||||
Aliases: []string{"resize"},
|
||||
Short: "Set a new size for a Replication Controller.",
|
||||
@@ -71,7 +71,7 @@ func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri
|
||||
|
||||
count := cmdutil.GetFlagInt(cmd, "replicas")
|
||||
if count < 0 {
|
||||
return cmdutil.UsageError(cmd, "--replicas=COUNT RESOURCE ID")
|
||||
return cmdutil.UsageError(cmd, "--replicas=COUNT RESOURCE NAME")
|
||||
}
|
||||
|
||||
cmdNamespace, err := f.DefaultNamespace()
|
||||
|
@@ -27,7 +27,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
stop_long = `Gracefully shut down a resource by id or filename.
|
||||
stop_long = `Gracefully shut down a resource by name or filename.
|
||||
|
||||
Attempts to shut down and delete a resource that supports graceful termination.
|
||||
If the resource is scalable it will be scaled to 0 before deletion.`
|
||||
@@ -49,8 +49,8 @@ func NewCmdStop(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
Filenames util.StringList
|
||||
}{}
|
||||
cmd := &cobra.Command{
|
||||
Use: "stop (-f FILENAME | RESOURCE (ID | -l label | --all))",
|
||||
Short: "Gracefully shut down a resource by id or filename.",
|
||||
Use: "stop (-f FILENAME | RESOURCE (NAME | -l label | --all))",
|
||||
Short: "Gracefully shut down a resource by name or filename.",
|
||||
Long: stop_long,
|
||||
Example: stop_example,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
Reference in New Issue
Block a user