kubectl: rewrite docstrings in several files

Fixing inaccuracies and clarifying in the case of ambiguities.
This commit is contained in:
Alexander Campbell
2017-05-25 12:23:22 -07:00
parent d29560d89a
commit f9913c4948
8 changed files with 31 additions and 20 deletions

View File

@@ -35,14 +35,15 @@ import (
var (
cp_example = templates.Examples(i18n.T(`
# !!!Important Note!!!
# Requires that the 'tar' binary is present in your container
# image. If 'tar' is not present, 'kubectl cp' will fail.
# !!!Important Note!!!
# Requires that the 'tar' binary is present in your container
# image. If 'tar' is not present, 'kubectl cp' will fail.
# Copy /tmp/foo_dir local directory to /tmp/bar_dir in a remote pod in the default namespace
# Copy /tmp/foo_dir local directory to /tmp/bar_dir in a remote pod in the default namespace
kubectl cp /tmp/foo_dir <some-pod>:/tmp/bar_dir
# Copy /tmp/foo local file to /tmp/bar in a remote pod in a specific container
# Copy /tmp/foo local file to /tmp/bar in a remote pod in a specific container
kubectl cp /tmp/foo <some-pod>:/tmp/bar -c <specific-container>
# Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace <some-namespace>
@@ -52,8 +53,8 @@ var (
kubectl cp <some-namespace>/<some-pod>:/tmp/foo /tmp/bar`))
cpUsageStr = dedent.Dedent(`
expected 'cp <file-spec-src> <file-spec-dest> [-c container]'.
<file-spec> is:
expected 'cp <file-spec-src> <file-spec-dest> [-c container]'.
<file-spec> is:
[namespace/]pod-name:/file/path for a remote file
/file/path for a local file`)
)

View File

@@ -40,7 +40,7 @@ type CreateOptions struct {
var (
create_long = templates.LongDesc(i18n.T(`
Create a resource by filename or stdin.
Create a resource from a file or from stdin.
JSON and YAML formats are accepted.`))
@@ -60,7 +60,7 @@ func NewCmdCreate(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "create -f FILENAME",
Short: i18n.T("Create a resource by filename or stdin"),
Short: i18n.T("Create a resource from a file or from stdin."),
Long: create_long,
Example: create_example,
Run: func(cmd *cobra.Command, args []string) {

View File

@@ -38,7 +38,9 @@ var (
kubectl create deployment my-dep --image=busybox`))
)
// NewCmdCreateDeployment is a macro command to create a new deployment
// NewCmdCreateDeployment is a macro command to create a new deployment.
// This command is better known to users as `kubectl create deployment`.
// Note that this command overlaps significantly with the `kubectl run` command.
func NewCmdCreateDeployment(f cmdutil.Factory, cmdOut, cmdErr io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "deployment NAME --image=image [--dry-run]",