From 8858d20044c863900fdef32d5b5ede7f88e60839 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Mon, 21 Mar 2016 14:17:23 -0400 Subject: [PATCH] Fix `kubectl create configmap` help Remove "generic" from the help text, as that was an inadvertent carry-over from `kubectl create secret generic`. --- docs/man/man1/kubectl-create-configmap.1 | 6 +++--- docs/user-guide/kubectl/kubectl_create_configmap.md | 10 +++++----- pkg/kubectl/cmd/create_configmap.go | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/man/man1/kubectl-create-configmap.1 b/docs/man/man1/kubectl-create-configmap.1 index 45b48a90516..361e67d66df 100644 --- a/docs/man/man1/kubectl-create-configmap.1 +++ b/docs/man/man1/kubectl-create-configmap.1 @@ -193,13 +193,13 @@ symlinks, devices, pipes, etc). .nf # Create a new configmap named my\-config with keys for each file in folder bar - kubectl create configmap generic my\-config \-\-from\-file=path/to/bar + kubectl create configmap my\-config \-\-from\-file=path/to/bar # Create a new configmap named my\-config with specified keys instead of names on disk - kubectl create configmap generic my\-config \-\-from\-file=ssh\-privatekey=\~/.ssh/id\_rsa \-\-from\-file=ssh\-publickey=\~/.ssh/id\_rsa.pub + kubectl create configmap my\-config \-\-from\-file=key1=/path/to/bar/file1.txt \-\-from\-file=key2=/path/to/bar/file2.txt # Create a new configMap named my\-config with key1=config1 and key2=config2 - kubectl create configmap generic my\-config \-\-from\-literal=key1=config1 \-\-from\-literal=key2=config2 + kubectl create configmap my\-config \-\-from\-literal=key1=config1 \-\-from\-literal=key2=config2 .fi .RE diff --git a/docs/user-guide/kubectl/kubectl_create_configmap.md b/docs/user-guide/kubectl/kubectl_create_configmap.md index 638d50a4300..99a0b58a823 100644 --- a/docs/user-guide/kubectl/kubectl_create_configmap.md +++ b/docs/user-guide/kubectl/kubectl_create_configmap.md @@ -52,20 +52,20 @@ symlinks, devices, pipes, etc). ``` -kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run] +kubectl create configmap NAME [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run] ``` ### Examples ``` # Create a new configmap named my-config with keys for each file in folder bar - kubectl create configmap generic my-config --from-file=path/to/bar + kubectl create configmap my-config --from-file=path/to/bar # Create a new configmap named my-config with specified keys instead of names on disk - kubectl create configmap generic my-config --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub + kubectl create configmap my-config --from-file=key1=/path/to/bar/file1.txt --from-file=key2=/path/to/bar/file2.txt # Create a new configMap named my-config with key1=config1 and key2=config2 - kubectl create configmap generic my-config --from-literal=key1=config1 --from-literal=key2=config2 + kubectl create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2 ``` ### Options @@ -119,7 +119,7 @@ kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from * [kubectl create](kubectl_create.md) - Create a resource by filename or stdin -###### Auto generated by spf13/cobra on 5-Apr-2016 +###### Auto generated by spf13/cobra on 29-Apr-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_configmap.md?pixel)]() diff --git a/pkg/kubectl/cmd/create_configmap.go b/pkg/kubectl/cmd/create_configmap.go index 729ac398396..6af07920583 100644 --- a/pkg/kubectl/cmd/create_configmap.go +++ b/pkg/kubectl/cmd/create_configmap.go @@ -40,19 +40,19 @@ symlinks, devices, pipes, etc). ` configMapExample = ` # Create a new configmap named my-config with keys for each file in folder bar - kubectl create configmap generic my-config --from-file=path/to/bar + kubectl create configmap my-config --from-file=path/to/bar # Create a new configmap named my-config with specified keys instead of names on disk - kubectl create configmap generic my-config --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub + kubectl create configmap my-config --from-file=key1=/path/to/bar/file1.txt --from-file=key2=/path/to/bar/file2.txt # Create a new configMap named my-config with key1=config1 and key2=config2 - kubectl create configmap generic my-config --from-literal=key1=config1 --from-literal=key2=config2` + kubectl create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2` ) // ConfigMap is a command to ease creating ConfigMaps. func NewCmdCreateConfigMap(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command { cmd := &cobra.Command{ - Use: "configmap NAME [--type=string] [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run]", + Use: "configmap NAME [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run]", Short: "Create a configMap from a local file, directory or literal value.", Long: configMapLong, Example: configMapExample, @@ -70,7 +70,7 @@ func NewCmdCreateConfigMap(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command return cmd } -// CreateConfigMap is the implementation of the create configmap generic command. +// CreateConfigMap is the implementation of the create configmap command. func CreateConfigMap(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error { name, err := NameFromCommandArgs(cmd, args) if err != nil {