From 3949ee0f79b44f5101295ca910b7547837619f27 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Tue, 16 Apr 2019 22:58:10 +0800 Subject: [PATCH] clean up command description information for consistency and readability --- cmd/kubeadm/app/cmd/alpha/certs.go | 10 +++++----- cmd/kubeadm/app/cmd/alpha/kubeconfig.go | 6 +++--- cmd/kubeadm/app/cmd/alpha/kubelet.go | 14 ++++++------- cmd/kubeadm/app/cmd/alpha/selfhosting.go | 8 ++++---- cmd/kubeadm/app/cmd/completion.go | 2 +- cmd/kubeadm/app/cmd/config.go | 18 ++++++++--------- cmd/kubeadm/app/cmd/init.go | 2 +- cmd/kubeadm/app/cmd/phases/init/addons.go | 12 +++++------ .../app/cmd/phases/init/bootstraptoken.go | 2 +- cmd/kubeadm/app/cmd/phases/init/certs.go | 10 +++++----- .../app/cmd/phases/init/controlplane.go | 4 ++-- cmd/kubeadm/app/cmd/phases/init/etcd.go | 4 ++-- cmd/kubeadm/app/cmd/phases/init/kubeconfig.go | 20 +++++++++---------- cmd/kubeadm/app/cmd/phases/init/kubelet.go | 4 ++-- .../app/cmd/phases/init/uploadconfig.go | 16 +++++++-------- .../app/cmd/phases/join/controlplanejoin.go | 4 ++-- .../cmd/phases/join/controlplaneprepare.go | 12 +++++------ cmd/kubeadm/app/cmd/phases/join/kubelet.go | 4 ++-- cmd/kubeadm/app/cmd/phases/workflow/runner.go | 2 +- cmd/kubeadm/app/cmd/reset.go | 2 +- cmd/kubeadm/app/cmd/token.go | 10 +++++----- cmd/kubeadm/app/cmd/upgrade/apply.go | 2 +- cmd/kubeadm/app/cmd/upgrade/node.go | 14 ++++++------- cmd/kubeadm/app/cmd/upgrade/plan.go | 2 +- cmd/kubeadm/app/cmd/upgrade/upgrade.go | 2 +- 25 files changed, 93 insertions(+), 93 deletions(-) diff --git a/cmd/kubeadm/app/cmd/alpha/certs.go b/cmd/kubeadm/app/cmd/alpha/certs.go index 138eaa5705..ad88c7da69 100644 --- a/cmd/kubeadm/app/cmd/alpha/certs.go +++ b/cmd/kubeadm/app/cmd/alpha/certs.go @@ -34,12 +34,12 @@ import ( var ( genericLongDesc = normalizer.LongDesc(` - Renews the %[1]s, and saves them into %[2]s.cert and %[2]s.key files. + Renew the %[1]s, and save them into %[2]s.cert and %[2]s.key files. Extra attributes such as SANs will be based on the existing certificates, there is no need to resupply them. `) allLongDesc = normalizer.LongDesc(` - Renews all known certificates necessary to run the control plane. Renewals are run unconditionally, regardless + Renew all known certificates necessary to run the control plane. Renewals are run unconditionally, regardless of expiration date. Renewals can also be run individually for more control. `) ) @@ -60,7 +60,7 @@ func newCmdCertsUtility() *cobra.Command { func newCmdCertsRenewal() *cobra.Command { cmd := &cobra.Command{ Use: "renew", - Short: "Renews certificates for a Kubernetes cluster", + Short: "Renew certificates for a Kubernetes cluster", Long: cmdutil.MacroCommandLongDescription, RunE: cmdutil.SubCmdRunE("renew"), } @@ -107,7 +107,7 @@ func getRenewSubCommands() []*cobra.Command { allCmd := &cobra.Command{ Use: "all", - Short: "renew all available certificates", + Short: "Renew all available certificates", Long: allLongDesc, Run: func(*cobra.Command, []string) { for _, f := range funcList { @@ -156,7 +156,7 @@ func generateRenewalFunction(cert *certsphase.KubeadmCert, caCert *certsphase.Ku func generateRenewalCommand(cert *certsphase.KubeadmCert, cfg *renewConfig) *cobra.Command { cmd := &cobra.Command{ Use: cert.Name, - Short: fmt.Sprintf("Generates the %s", cert.LongName), + Short: fmt.Sprintf("Generate the %s", cert.LongName), Long: fmt.Sprintf(genericLongDesc, cert.LongName, cert.BaseName), } addFlags(cmd, cfg) diff --git a/cmd/kubeadm/app/cmd/alpha/kubeconfig.go b/cmd/kubeadm/app/cmd/alpha/kubeconfig.go index 7f4bb91c34..b9b099a0c4 100644 --- a/cmd/kubeadm/app/cmd/alpha/kubeconfig.go +++ b/cmd/kubeadm/app/cmd/alpha/kubeconfig.go @@ -37,11 +37,11 @@ var ( ` + cmdutil.AlphaDisclaimer) userKubeconfigLongDesc = normalizer.LongDesc(` - Outputs a kubeconfig file for an additional user. + Output a kubeconfig file for an additional user. ` + cmdutil.AlphaDisclaimer) userKubeconfigExample = normalizer.Examples(` - # Outputs a kubeconfig file for an additional user named foo + # Output a kubeconfig file for an additional user named foo kubeadm alpha kubeconfig user --client-name=foo `) ) @@ -72,7 +72,7 @@ func newCmdUserKubeConfig(out io.Writer) *cobra.Command { // Creates the UX Command cmd := &cobra.Command{ Use: "user", - Short: "Outputs a kubeconfig file for an additional user", + Short: "Output a kubeconfig file for an additional user", Long: userKubeconfigLongDesc, Example: userKubeconfigExample, Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/kubeadm/app/cmd/alpha/kubelet.go b/cmd/kubeadm/app/cmd/alpha/kubelet.go index f488fc2e16..9157a8e5a8 100644 --- a/cmd/kubeadm/app/cmd/alpha/kubelet.go +++ b/cmd/kubeadm/app/cmd/alpha/kubelet.go @@ -35,21 +35,21 @@ import ( var ( kubeletConfigDownloadLongDesc = normalizer.LongDesc(` - Downloads the kubelet configuration from a ConfigMap of the form "kubelet-config-1.X" in the cluster, + Download the kubelet configuration from a ConfigMap of the form "kubelet-config-1.X" in the cluster, where X is the minor version of the kubelet. Either kubeadm autodetects the kubelet version by exec-ing "kubelet --version" or respects the --kubelet-version parameter. ` + cmdutil.AlphaDisclaimer) kubeletConfigDownloadExample = normalizer.Examples(fmt.Sprintf(` - # Downloads the kubelet configuration from the ConfigMap in the cluster. Autodetects the kubelet version. + # Download the kubelet configuration from the ConfigMap in the cluster. Autodetect the kubelet version. kubeadm alpha phase kubelet config download - # Downloads the kubelet configuration from the ConfigMap in the cluster. Uses a specific desired kubelet version. + # Download the kubelet configuration from the ConfigMap in the cluster. Use a specific desired kubelet version. kubeadm alpha phase kubelet config download --kubelet-version %s `, constants.CurrentKubernetesVersion)) kubeletConfigEnableDynamicLongDesc = normalizer.LongDesc(` - Enables or updates dynamic kubelet configuration for a Node, against the kubelet-config-1.X ConfigMap in the cluster, + Enable or update dynamic kubelet configuration for a Node, against the kubelet-config-1.X ConfigMap in the cluster, where X is the minor version of the desired kubelet version. WARNING: This feature is still experimental, and disabled by default. Enable only if you know what you are doing, as it @@ -58,7 +58,7 @@ var ( ` + cmdutil.AlphaDisclaimer) kubeletConfigEnableDynamicExample = normalizer.Examples(fmt.Sprintf(` - # Enables dynamic kubelet configuration for a Node. + # Enable dynamic kubelet configuration for a Node. kubeadm alpha phase kubelet enable-dynamic-config --node-name node-1 --kubelet-version %s WARNING: This feature is still experimental, and disabled by default. Enable only if you know what you are doing, as it @@ -99,7 +99,7 @@ func newCmdKubeletConfigDownload() *cobra.Command { cmd := &cobra.Command{ Use: "download", - Short: "Downloads the kubelet configuration from the cluster ConfigMap kubelet-config-1.X, where X is the minor version of the kubelet.", + Short: "Download the kubelet configuration from the cluster ConfigMap kubelet-config-1.X, where X is the minor version of the kubelet", Long: kubeletConfigDownloadLongDesc, Example: kubeletConfigDownloadExample, Run: func(cmd *cobra.Command, args []string) { @@ -134,7 +134,7 @@ func newCmdKubeletConfigEnableDynamic() *cobra.Command { cmd := &cobra.Command{ Use: "enable-dynamic", - Short: "EXPERIMENTAL: Enables or updates dynamic kubelet configuration for a Node", + Short: "EXPERIMENTAL: Enable or update dynamic kubelet configuration for a Node", Long: kubeletConfigEnableDynamicLongDesc, Example: kubeletConfigEnableDynamicExample, Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/kubeadm/app/cmd/alpha/selfhosting.go b/cmd/kubeadm/app/cmd/alpha/selfhosting.go index c7f3a98775..6c4b5e14cc 100644 --- a/cmd/kubeadm/app/cmd/alpha/selfhosting.go +++ b/cmd/kubeadm/app/cmd/alpha/selfhosting.go @@ -46,14 +46,14 @@ import ( var ( selfhostingLongDesc = normalizer.LongDesc(` - Converts static Pod files for control plane components into self-hosted DaemonSets configured via the Kubernetes API. + Convert static Pod files for control plane components into self-hosted DaemonSets configured via the Kubernetes API. See the documentation for self-hosting limitations. ` + cmdutil.AlphaDisclaimer) selfhostingExample = normalizer.Examples(` - # Converts a static Pod-hosted control plane into a self-hosted one. + # Convert a static Pod-hosted control plane into a self-hosted one. kubeadm alpha phase self-hosting convert-from-staticpods `) @@ -64,7 +64,7 @@ func NewCmdSelfhosting(in io.Reader) *cobra.Command { cmd := &cobra.Command{ Use: "selfhosting", Aliases: []string{"selfhosted", "self-hosting"}, - Short: "Makes a kubeadm cluster self-hosted", + Short: "Make a kubeadm cluster self-hosted", Long: cmdutil.MacroCommandLongDescription, } @@ -86,7 +86,7 @@ func getSelfhostingSubCommand(in io.Reader) *cobra.Command { cmd := &cobra.Command{ Use: "pivot", Aliases: []string{"from-staticpods"}, - Short: "Converts a static Pod-hosted control plane into a self-hosted one", + Short: "Convert a static Pod-hosted control plane into a self-hosted one", Long: selfhostingLongDesc, Example: selfhostingExample, Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/kubeadm/app/cmd/completion.go b/cmd/kubeadm/app/cmd/completion.go index 3980d70985..6ea155da1e 100644 --- a/cmd/kubeadm/app/cmd/completion.go +++ b/cmd/kubeadm/app/cmd/completion.go @@ -102,7 +102,7 @@ func GetSupportedShells() []string { func NewCmdCompletion(out io.Writer, boilerPlate string) *cobra.Command { cmd := &cobra.Command{ Use: "completion SHELL", - Short: "Output shell completion code for the specified shell (bash or zsh).", + Short: "Output shell completion code for the specified shell (bash or zsh)", Long: completionLong, Example: completionExample, Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/kubeadm/app/cmd/config.go b/cmd/kubeadm/app/cmd/config.go index 228d051ba5..996533f0df 100644 --- a/cmd/kubeadm/app/cmd/config.go +++ b/cmd/kubeadm/app/cmd/config.go @@ -64,7 +64,7 @@ func NewCmdConfig(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "config", - Short: "Manage configuration for a kubeadm cluster persisted in a ConfigMap in the cluster.", + Short: "Manage configuration for a kubeadm cluster persisted in a ConfigMap in the cluster", Long: fmt.Sprintf(dedent.Dedent(` There is a ConfigMap in the %s namespace called %q that kubeadm uses to store internal configuration about the cluster. kubeadm CLI v1.8.0+ automatically creates this ConfigMap with the config used with 'kubeadm init', but if you @@ -223,7 +223,7 @@ func NewCmdConfigMigrate(out io.Writer) *cobra.Command { var oldCfgPath, newCfgPath string cmd := &cobra.Command{ Use: "migrate", - Short: "Read an older version of the kubeadm configuration API types from a file, and output the similar config object for the newer version.", + Short: "Read an older version of the kubeadm configuration API types from a file, and output the similar config object for the newer version", Long: fmt.Sprintf(dedent.Dedent(` This command lets you convert configuration objects of older versions to the latest supported version, locally in the CLI tool without ever touching anything in the cluster. @@ -267,7 +267,7 @@ func NewCmdConfigMigrate(out io.Writer) *cobra.Command { func NewCmdConfigUpload(out io.Writer, kubeConfigFile *string) *cobra.Command { cmd := &cobra.Command{ Use: "upload", - Short: "Upload configuration about the current state, so that 'kubeadm upgrade' can later know how to configure the upgraded cluster.", + Short: "Upload configuration about the current state, so that 'kubeadm upgrade' can later know how to configure the upgraded cluster", RunE: cmdutil.SubCmdRunE("upload"), } @@ -280,7 +280,7 @@ func NewCmdConfigUpload(out io.Writer, kubeConfigFile *string) *cobra.Command { func NewCmdConfigView(out io.Writer, kubeConfigFile *string) *cobra.Command { return &cobra.Command{ Use: "view", - Short: "View the kubeadm configuration stored inside the cluster.", + Short: "View the kubeadm configuration stored inside the cluster", Long: fmt.Sprintf(dedent.Dedent(` Using this command, you can view the ConfigMap in the cluster where the configuration for kubeadm is located. @@ -303,7 +303,7 @@ func NewCmdConfigUploadFromFile(out io.Writer, kubeConfigFile *string) *cobra.Co var cfgPath string cmd := &cobra.Command{ Use: "from-file", - Short: "Upload a configuration file to the in-cluster ConfigMap for kubeadm configuration.", + Short: "Upload a configuration file to the in-cluster ConfigMap for kubeadm configuration", Long: fmt.Sprintf(dedent.Dedent(` Using this command, you can upload configuration to the ConfigMap in the cluster using the same config file you gave to 'kubeadm init'. If you initialized your cluster using a v1.7.x or lower kubeadm client and used the --config option, you need to run this command with the @@ -343,7 +343,7 @@ func NewCmdConfigUploadFromFlags(out io.Writer, kubeConfigFile *string) *cobra.C cmd := &cobra.Command{ Use: "from-flags", - Short: "Create the in-cluster configuration file for the first time from using flags.", + Short: "Create the in-cluster configuration file for the first time from using flags", Long: fmt.Sprintf(dedent.Dedent(` Using this command, you can upload configuration to the ConfigMap in the cluster using the same flags you gave to 'kubeadm init'. If you initialized your cluster using a v1.7.x or lower kubeadm client and set certain flags, you need to run this command with the @@ -397,7 +397,7 @@ func RunConfigView(out io.Writer, client clientset.Interface) error { func NewCmdConfigImages(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "images", - Short: "Interact with container images used by kubeadm.", + Short: "Interact with container images used by kubeadm", RunE: cmdutil.SubCmdRunE("images"), } cmd.AddCommand(NewCmdConfigImagesList(out, nil)) @@ -414,7 +414,7 @@ func NewCmdConfigImagesPull() *cobra.Command { cmd := &cobra.Command{ Use: "pull", - Short: "Pull images used by kubeadm.", + Short: "Pull images used by kubeadm", Run: func(_ *cobra.Command, _ []string) { externalcfg.ClusterConfiguration.FeatureGates, err = features.NewFeatureGate(&features.InitFeatureGates, featureGatesString) kubeadmutil.CheckErr(err) @@ -472,7 +472,7 @@ func NewCmdConfigImagesList(out io.Writer, mockK8sVersion *string) *cobra.Comman cmd := &cobra.Command{ Use: "list", - Short: "Print a list of images kubeadm will use. The configuration file is used in case any images or image repositories are customized.", + Short: "Print a list of images kubeadm will use. The configuration file is used in case any images or image repositories are customized", Run: func(_ *cobra.Command, _ []string) { externalcfg.ClusterConfiguration.FeatureGates, err = features.NewFeatureGate(&features.InitFeatureGates, featureGatesString) kubeadmutil.CheckErr(err) diff --git a/cmd/kubeadm/app/cmd/init.go b/cmd/kubeadm/app/cmd/init.go index bc21992201..dff80eb03d 100644 --- a/cmd/kubeadm/app/cmd/init.go +++ b/cmd/kubeadm/app/cmd/init.go @@ -135,7 +135,7 @@ func NewCmdInit(out io.Writer, initOptions *initOptions) *cobra.Command { cmd := &cobra.Command{ Use: "init", - Short: "Run this command in order to set up the Kubernetes control plane.", + Short: "Run this command in order to set up the Kubernetes control plane", Run: func(cmd *cobra.Command, args []string) { c, err := initRunner.InitData(args) kubeadmutil.CheckErr(err) diff --git a/cmd/kubeadm/app/cmd/phases/init/addons.go b/cmd/kubeadm/app/cmd/phases/init/addons.go index 7dcdce84ea..7256ddc846 100644 --- a/cmd/kubeadm/app/cmd/phases/init/addons.go +++ b/cmd/kubeadm/app/cmd/phases/init/addons.go @@ -31,12 +31,12 @@ import ( var ( coreDNSAddonLongDesc = normalizer.LongDesc(` - Installs the CoreDNS addon components via the API server. + Install the CoreDNS addon components via the API server. Please note that although the DNS server is deployed, it will not be scheduled until CNI is installed. `) kubeProxyAddonLongDesc = normalizer.LongDesc(` - Installs the kube-proxy addon components via the API server. + Install the kube-proxy addon components via the API server. `) ) @@ -44,25 +44,25 @@ var ( func NewAddonPhase() workflow.Phase { return workflow.Phase{ Name: "addon", - Short: "Installs required addons for passing Conformance tests", + Short: "Install required addons for passing Conformance tests", Long: cmdutil.MacroCommandLongDescription, Phases: []workflow.Phase{ { Name: "all", - Short: "Installs all the addons", + Short: "Install all the addons", InheritFlags: getAddonPhaseFlags("all"), RunAllSiblings: true, }, { Name: "coredns", - Short: "Installs the CoreDNS addon to a Kubernetes cluster", + Short: "Install the CoreDNS addon to a Kubernetes cluster", Long: coreDNSAddonLongDesc, InheritFlags: getAddonPhaseFlags("coredns"), Run: runCoreDNSAddon, }, { Name: "kube-proxy", - Short: "Installs the kube-proxy addon to a Kubernetes cluster", + Short: "Install the kube-proxy addon to a Kubernetes cluster", Long: kubeProxyAddonLongDesc, InheritFlags: getAddonPhaseFlags("kube-proxy"), Run: runKubeProxyAddon, diff --git a/cmd/kubeadm/app/cmd/phases/init/bootstraptoken.go b/cmd/kubeadm/app/cmd/phases/init/bootstraptoken.go index dc14487a31..3de062365a 100644 --- a/cmd/kubeadm/app/cmd/phases/init/bootstraptoken.go +++ b/cmd/kubeadm/app/cmd/phases/init/bootstraptoken.go @@ -38,7 +38,7 @@ var ( `) bootstrapTokenExamples = normalizer.Examples(` - # Makes all the bootstrap token configurations and creates an initial token, functionally + # Make all the bootstrap token configurations and create an initial token, functionally # equivalent to what generated by kubeadm init. kubeadm init phase bootstrap-token `) diff --git a/cmd/kubeadm/app/cmd/phases/init/certs.go b/cmd/kubeadm/app/cmd/phases/init/certs.go index 8d2fe25a4e..d2ac72f06b 100644 --- a/cmd/kubeadm/app/cmd/phases/init/certs.go +++ b/cmd/kubeadm/app/cmd/phases/init/certs.go @@ -37,13 +37,13 @@ import ( var ( saKeyLongDesc = fmt.Sprintf(normalizer.LongDesc(` - Generates the private key for signing service account tokens along with its public key, and saves them into + Generate the private key for signing service account tokens along with its public key, and save them into %s and %s files. If both files already exist, kubeadm skips the generation step and existing files will be used. `+cmdutil.AlphaDisclaimer), kubeadmconstants.ServiceAccountPrivateKeyName, kubeadmconstants.ServiceAccountPublicKeyName) genericLongDesc = normalizer.LongDesc(` - Generates the %[1]s, and saves them into %[2]s.cert and %[2]s.key files.%[3]s + Generate the %[1]s, and save them into %[2]s.cert and %[2]s.key files.%[3]s If both files already exist, kubeadm skips the generation step and existing files will be used. ` + cmdutil.AlphaDisclaimer) @@ -79,7 +79,7 @@ func newCertSubPhases() []workflow.Phase { // All subphase allPhase := workflow.Phase{ Name: "all", - Short: "Generates all certificates", + Short: "Generate all certificates", InheritFlags: getCertPhaseFlags("all"), RunAllSiblings: true, } @@ -102,7 +102,7 @@ func newCertSubPhases() []workflow.Phase { // SA creates the private/public key pair, which doesn't use x509 at all saPhase := workflow.Phase{ Name: "sa", - Short: "Generates a private key for signing service account tokens along with its public key", + Short: "Generate a private key for signing service account tokens along with its public key", Long: saKeyLongDesc, Run: runCertsSa, InheritFlags: []string{options.CertificatesDir}, @@ -116,7 +116,7 @@ func newCertSubPhases() []workflow.Phase { func newCertSubPhase(certSpec *certsphase.KubeadmCert, run func(c workflow.RunData) error) workflow.Phase { phase := workflow.Phase{ Name: certSpec.Name, - Short: fmt.Sprintf("Generates the %s", certSpec.LongName), + Short: fmt.Sprintf("Generate the %s", certSpec.LongName), Long: fmt.Sprintf( genericLongDesc, certSpec.LongName, diff --git a/cmd/kubeadm/app/cmd/phases/init/controlplane.go b/cmd/kubeadm/app/cmd/phases/init/controlplane.go index 6406f04721..895e2d7ab1 100644 --- a/cmd/kubeadm/app/cmd/phases/init/controlplane.go +++ b/cmd/kubeadm/app/cmd/phases/init/controlplane.go @@ -66,12 +66,12 @@ func getPhaseDescription(component string) string { func NewControlPlanePhase() workflow.Phase { phase := workflow.Phase{ Name: "control-plane", - Short: "Generates all static Pod manifest files necessary to establish the control plane", + Short: "Generate all static Pod manifest files necessary to establish the control plane", Long: cmdutil.MacroCommandLongDescription, Phases: []workflow.Phase{ { Name: "all", - Short: "Generates all static Pod manifest files", + Short: "Generate all static Pod manifest files", InheritFlags: getControlPlanePhaseFlags("all"), Example: controlPlaneExample, RunAllSiblings: true, diff --git a/cmd/kubeadm/app/cmd/phases/init/etcd.go b/cmd/kubeadm/app/cmd/phases/init/etcd.go index 4abc41c2d1..854354a2fb 100644 --- a/cmd/kubeadm/app/cmd/phases/init/etcd.go +++ b/cmd/kubeadm/app/cmd/phases/init/etcd.go @@ -45,7 +45,7 @@ var ( func NewEtcdPhase() workflow.Phase { phase := workflow.Phase{ Name: "etcd", - Short: "Generates static Pod manifest file for local etcd.", + Short: "Generate static Pod manifest file for local etcd", Long: cmdutil.MacroCommandLongDescription, Phases: []workflow.Phase{ newEtcdLocalSubPhase(), @@ -57,7 +57,7 @@ func NewEtcdPhase() workflow.Phase { func newEtcdLocalSubPhase() workflow.Phase { phase := workflow.Phase{ Name: "local", - Short: "Generates the static Pod manifest file for a local, single-node local etcd instance.", + Short: "Generate the static Pod manifest file for a local, single-node local etcd instance", Example: etcdLocalExample, Run: runEtcdPhaseLocal(), InheritFlags: getEtcdPhaseFlags(), diff --git a/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go b/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go index a6c277c6f9..049becccaa 100644 --- a/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go +++ b/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go @@ -36,27 +36,27 @@ var ( }{ kubeadmconstants.AdminKubeConfigFileName: { name: "admin", - short: "Generates a kubeconfig file for the admin to use and for kubeadm itself", - long: "Generates the kubeconfig file for the admin and for kubeadm itself, and saves it to %s file.", + short: "Generate a kubeconfig file for the admin to use and for kubeadm itself", + long: "Generate the kubeconfig file for the admin and for kubeadm itself, and save it to %s file.", }, kubeadmconstants.KubeletKubeConfigFileName: { name: "kubelet", - short: "Generates a kubeconfig file for the kubelet to use *only* for cluster bootstrapping purposes", + short: "Generate a kubeconfig file for the kubelet to use *only* for cluster bootstrapping purposes", long: normalizer.LongDesc(` - Generates the kubeconfig file for the kubelet to use and saves it to %s file. + Generate the kubeconfig file for the kubelet to use and save it to %s file. Please note that this should *only* be used for cluster bootstrapping purposes. After your control plane is up, you should request all kubelet credentials from the CSR API.`), }, kubeadmconstants.ControllerManagerKubeConfigFileName: { name: "controller-manager", - short: "Generates a kubeconfig file for the controller manager to use", - long: "Generates the kubeconfig file for the controller manager to use and saves it to %s file", + short: "Generate a kubeconfig file for the controller manager to use", + long: "Generate the kubeconfig file for the controller manager to use and save it to %s file", }, kubeadmconstants.SchedulerKubeConfigFileName: { name: "scheduler", - short: "Generates a kubeconfig file for the scheduler to use", - long: "Generates the kubeconfig file for the scheduler to use and saves it to %s file.", + short: "Generate a kubeconfig file for the scheduler to use", + long: "Generate the kubeconfig file for the scheduler to use and save it to %s file.", }, } ) @@ -65,12 +65,12 @@ var ( func NewKubeConfigPhase() workflow.Phase { return workflow.Phase{ Name: "kubeconfig", - Short: "Generates all kubeconfig files necessary to establish the control plane and the admin kubeconfig file", + Short: "Generate all kubeconfig files necessary to establish the control plane and the admin kubeconfig file", Long: cmdutil.MacroCommandLongDescription, Phases: []workflow.Phase{ { Name: "all", - Short: "Generates all kubeconfig files", + Short: "Generate all kubeconfig files", InheritFlags: getKubeConfigPhaseFlags("all"), RunAllSiblings: true, }, diff --git a/cmd/kubeadm/app/cmd/phases/init/kubelet.go b/cmd/kubeadm/app/cmd/phases/init/kubelet.go index 1aaac8b346..a5a03008cc 100644 --- a/cmd/kubeadm/app/cmd/phases/init/kubelet.go +++ b/cmd/kubeadm/app/cmd/phases/init/kubelet.go @@ -36,8 +36,8 @@ var ( func NewKubeletStartPhase() workflow.Phase { return workflow.Phase{ Name: "kubelet-start", - Short: "Writes kubelet settings and (re)starts the kubelet", - Long: "Writes a file with KubeletConfiguration and an environment file with node specific kubelet settings, and then (re)starts kubelet.", + Short: "Write kubelet settings and (re)start the kubelet", + Long: "Write a file with KubeletConfiguration and an environment file with node specific kubelet settings, and then (re)start kubelet.", Example: kubeletStartPhaseExample, Run: runKubeletStart, InheritFlags: []string{ diff --git a/cmd/kubeadm/app/cmd/phases/init/uploadconfig.go b/cmd/kubeadm/app/cmd/phases/init/uploadconfig.go index 1691e10139..7845870a0e 100644 --- a/cmd/kubeadm/app/cmd/phases/init/uploadconfig.go +++ b/cmd/kubeadm/app/cmd/phases/init/uploadconfig.go @@ -36,24 +36,24 @@ import ( var ( uploadKubeadmConfigLongDesc = fmt.Sprintf(normalizer.LongDesc(` - Uploads the kubeadm ClusterConfiguration to a ConfigMap called %s in the %s namespace. + Upload the kubeadm ClusterConfiguration to a ConfigMap called %s in the %s namespace. This enables correct configuration of system components and a seamless user experience when upgrading. Alternatively, you can use kubeadm config. `), kubeadmconstants.KubeadmConfigConfigMap, metav1.NamespaceSystem) uploadKubeadmConfigExample = normalizer.Examples(` - # uploads the configuration of your cluster + # upload the configuration of your cluster kubeadm init phase upload-config --config=myConfig.yaml `) uploadKubeletConfigLongDesc = normalizer.LongDesc(` - Uploads kubelet configuration extracted from the kubeadm InitConfiguration object to a ConfigMap + Upload kubelet configuration extracted from the kubeadm InitConfiguration object to a ConfigMap of the form kubelet-config-1.X in the cluster, where X is the minor version of the current (API Server) Kubernetes version. `) uploadKubeletConfigExample = normalizer.Examples(` - # Uploads the kubelet configuration from the kubeadm Config file to a ConfigMap in the cluster. + # Upload the kubelet configuration from the kubeadm Config file to a ConfigMap in the cluster. kubeadm init phase upload-config kubelet --config kubeadm.yaml `) ) @@ -63,18 +63,18 @@ func NewUploadConfigPhase() workflow.Phase { return workflow.Phase{ Name: "upload-config", Aliases: []string{"uploadconfig"}, - Short: "Uploads the kubeadm and kubelet configuration to a ConfigMap", + Short: "Upload the kubeadm and kubelet configuration to a ConfigMap", Long: cmdutil.MacroCommandLongDescription, Phases: []workflow.Phase{ { Name: "all", - Short: "Uploads all configuration to a config map", + Short: "Upload all configuration to a config map", RunAllSiblings: true, InheritFlags: getUploadConfigPhaseFlags(), }, { Name: "kubeadm", - Short: "Uploads the kubeadm ClusterConfiguration to a ConfigMap", + Short: "Upload the kubeadm ClusterConfiguration to a ConfigMap", Long: uploadKubeadmConfigLongDesc, Example: uploadKubeadmConfigExample, Run: runUploadKubeadmConfig, @@ -82,7 +82,7 @@ func NewUploadConfigPhase() workflow.Phase { }, { Name: "kubelet", - Short: "Uploads the kubelet component config to a ConfigMap", + Short: "Upload the kubelet component config to a ConfigMap", Long: uploadKubeletConfigLongDesc, Example: uploadKubeletConfigExample, Run: runUploadKubeletConfig, diff --git a/cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go b/cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go index 56d4924f8c..b423698f87 100644 --- a/cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go +++ b/cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go @@ -50,12 +50,12 @@ func getControlPlaneJoinPhaseFlags(name string) []string { func NewControlPlaneJoinPhase() workflow.Phase { return workflow.Phase{ Name: "control-plane-join", - Short: "Joins a machine as a control plane instance", + Short: "Join a machine as a control plane instance", Example: controlPlaneJoinExample, Phases: []workflow.Phase{ { Name: "all", - Short: "Joins a machine as a control plane instance", + Short: "Join a machine as a control plane instance", InheritFlags: getControlPlaneJoinPhaseFlags("all"), RunAllSiblings: true, }, diff --git a/cmd/kubeadm/app/cmd/phases/join/controlplaneprepare.go b/cmd/kubeadm/app/cmd/phases/join/controlplaneprepare.go index 80dbfaddc2..58e7eebf49 100644 --- a/cmd/kubeadm/app/cmd/phases/join/controlplaneprepare.go +++ b/cmd/kubeadm/app/cmd/phases/join/controlplaneprepare.go @@ -43,12 +43,12 @@ var controlPlanePrepareExample = normalizer.Examples(` func NewControlPlanePreparePhase() workflow.Phase { return workflow.Phase{ Name: "control-plane-prepare", - Short: "Prepares the machine for serving a control plane.", + Short: "Prepare the machine for serving a control plane", Example: controlPlanePrepareExample, Phases: []workflow.Phase{ { Name: "all [api-server-endpoint]", - Short: "Prepares the machine for serving a control plane.", + Short: "Prepare the machine for serving a control plane", InheritFlags: getControlPlanePreparePhaseFlags("all"), RunAllSiblings: true, }, @@ -131,7 +131,7 @@ func getControlPlanePreparePhaseFlags(name string) []string { func newControlPlanePrepareDownloadCertsSubphase() workflow.Phase { return workflow.Phase{ Name: "download-certs [api-server-endpoint]", - Short: fmt.Sprintf("[EXPERIMENTAL] Downloads certificates shared among control-plane nodes from the %s Secret", kubeadmconstants.KubeadmCertsSecret), + Short: fmt.Sprintf("[EXPERIMENTAL] Download certificates shared among control-plane nodes from the %s Secret", kubeadmconstants.KubeadmCertsSecret), Run: runControlPlanePrepareDownloadCertsPhaseLocal, InheritFlags: getControlPlanePreparePhaseFlags("download-certs"), } @@ -140,7 +140,7 @@ func newControlPlanePrepareDownloadCertsSubphase() workflow.Phase { func newControlPlanePrepareCertsSubphase() workflow.Phase { return workflow.Phase{ Name: "certs [api-server-endpoint]", - Short: "Generates the certificates for the new control plane components", + Short: "Generate the certificates for the new control plane components", Run: runControlPlanePrepareCertsPhaseLocal, //NB. eventually in future we would like to break down this in sub phases for each cert or add the --csr option InheritFlags: getControlPlanePreparePhaseFlags("certs"), } @@ -149,7 +149,7 @@ func newControlPlanePrepareCertsSubphase() workflow.Phase { func newControlPlanePrepareKubeconfigSubphase() workflow.Phase { return workflow.Phase{ Name: "kubeconfig [api-server-endpoint]", - Short: "Generates the kubeconfig for the new control plane components", + Short: "Generate the kubeconfig for the new control plane components", Run: runControlPlanePrepareKubeconfigPhaseLocal, //NB. eventually in future we would like to break down this in sub phases for each kubeconfig InheritFlags: getControlPlanePreparePhaseFlags("kubeconfig"), } @@ -158,7 +158,7 @@ func newControlPlanePrepareKubeconfigSubphase() workflow.Phase { func newControlPlanePrepareControlPlaneSubphase() workflow.Phase { return workflow.Phase{ Name: "control-plane", - Short: "Generates the manifests for the new control plane components", + Short: "Generate the manifests for the new control plane components", Run: runControlPlanePrepareControlPlaneSubphase, //NB. eventually in future we would like to break down this in sub phases for each component InheritFlags: getControlPlanePreparePhaseFlags("control-plane"), } diff --git a/cmd/kubeadm/app/cmd/phases/join/kubelet.go b/cmd/kubeadm/app/cmd/phases/join/kubelet.go index 4bb709c7f9..4daed21d38 100644 --- a/cmd/kubeadm/app/cmd/phases/join/kubelet.go +++ b/cmd/kubeadm/app/cmd/phases/join/kubelet.go @@ -57,8 +57,8 @@ var ( func NewKubeletStartPhase() workflow.Phase { return workflow.Phase{ Name: "kubelet-start [api-server-endpoint]", - Short: "Writes kubelet settings, certificates and (re)starts the kubelet", - Long: "Writes a file with KubeletConfiguration and an environment file with node specific kubelet settings, and then (re)starts kubelet.", + Short: "Write kubelet settings, certificates and (re)start the kubelet", + Long: "Write a file with KubeletConfiguration and an environment file with node specific kubelet settings, and then (re)start kubelet.", Run: runKubeletStartJoinPhase, InheritFlags: []string{ options.CfgPath, diff --git a/cmd/kubeadm/app/cmd/phases/workflow/runner.go b/cmd/kubeadm/app/cmd/phases/workflow/runner.go index 7cfc90234b..5e9dc9a562 100644 --- a/cmd/kubeadm/app/cmd/phases/workflow/runner.go +++ b/cmd/kubeadm/app/cmd/phases/workflow/runner.go @@ -308,7 +308,7 @@ func (e *Runner) BindToCommand(cmd *cobra.Command) { // adds the phases subcommand phaseCommand := &cobra.Command{ Use: "phase", - Short: fmt.Sprintf("use this command to invoke single phase of the %s workflow", cmd.Name()), + Short: fmt.Sprintf("Use this command to invoke single phase of the %s workflow", cmd.Name()), } cmd.AddCommand(phaseCommand) diff --git a/cmd/kubeadm/app/cmd/reset.go b/cmd/kubeadm/app/cmd/reset.go index 98137284b3..50bfa1bb9f 100644 --- a/cmd/kubeadm/app/cmd/reset.go +++ b/cmd/kubeadm/app/cmd/reset.go @@ -59,7 +59,7 @@ func NewCmdReset(in io.Reader, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "reset", - Short: "Run this to revert any changes made to this host by 'kubeadm init' or 'kubeadm join'.", + Short: "Run this to revert any changes made to this host by 'kubeadm init' or 'kubeadm join'", Run: func(cmd *cobra.Command, args []string) { ignorePreflightErrorsSet, err := validation.ValidateIgnorePreflightErrors(ignorePreflightErrors) kubeadmutil.CheckErr(err) diff --git a/cmd/kubeadm/app/cmd/token.go b/cmd/kubeadm/app/cmd/token.go index 5e93aafcbd..bb8df8356c 100644 --- a/cmd/kubeadm/app/cmd/token.go +++ b/cmd/kubeadm/app/cmd/token.go @@ -55,7 +55,7 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command { var dryRun bool tokenCmd := &cobra.Command{ Use: "token", - Short: "Manage bootstrap tokens.", + Short: "Manage bootstrap tokens", Long: dedent.Dedent(` This command manages bootstrap tokens. It is optional and needed only for advanced use cases. @@ -99,7 +99,7 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command { createCmd := &cobra.Command{ Use: "create [token]", DisableFlagsInUseLine: true, - Short: "Create bootstrap tokens on the server.", + Short: "Create bootstrap tokens on the server", Long: dedent.Dedent(` This command will create a bootstrap token for you. You can specify the usages for this token, the "time to live" and an optional human friendly description. @@ -142,7 +142,7 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command { listCmd := &cobra.Command{ Use: "list", - Short: "List bootstrap tokens on the server.", + Short: "List bootstrap tokens on the server", Long: dedent.Dedent(` This command will list all bootstrap tokens for you. `), @@ -160,7 +160,7 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command { deleteCmd := &cobra.Command{ Use: "delete [token-value] ...", DisableFlagsInUseLine: true, - Short: "Delete bootstrap tokens on the server.", + Short: "Delete bootstrap tokens on the server", Long: dedent.Dedent(` This command will delete a list of bootstrap tokens for you. @@ -188,7 +188,7 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command { func NewCmdTokenGenerate(out io.Writer) *cobra.Command { return &cobra.Command{ Use: "generate", - Short: "Generate and print a bootstrap token, but do not create it on the server.", + Short: "Generate and print a bootstrap token, but do not create it on the server", Long: dedent.Dedent(` This command will print out a randomly-generated bootstrap token that can be used with the "init" and "join" commands. diff --git a/cmd/kubeadm/app/cmd/upgrade/apply.go b/cmd/kubeadm/app/cmd/upgrade/apply.go index 9a288aac98..a05d002f4c 100644 --- a/cmd/kubeadm/app/cmd/upgrade/apply.go +++ b/cmd/kubeadm/app/cmd/upgrade/apply.go @@ -73,7 +73,7 @@ func NewCmdApply(apf *applyPlanFlags) *cobra.Command { cmd := &cobra.Command{ Use: "apply [version]", DisableFlagsInUseLine: true, - Short: "Upgrade your Kubernetes cluster to the specified version.", + Short: "Upgrade your Kubernetes cluster to the specified version", Run: func(cmd *cobra.Command, args []string) { userVersion, err := getK8sVersionFromUserInput(flags.applyPlanFlags, args, true) kubeadmutil.CheckErr(err) diff --git a/cmd/kubeadm/app/cmd/upgrade/node.go b/cmd/kubeadm/app/cmd/upgrade/node.go index d9bc0933ff..08103863da 100644 --- a/cmd/kubeadm/app/cmd/upgrade/node.go +++ b/cmd/kubeadm/app/cmd/upgrade/node.go @@ -40,17 +40,17 @@ import ( var ( upgradeNodeConfigLongDesc = normalizer.LongDesc(` - Downloads the kubelet configuration from a ConfigMap of the form "kubelet-config-1.X" in the cluster, + Download the kubelet configuration from a ConfigMap of the form "kubelet-config-1.X" in the cluster, where X is the minor version of the kubelet. kubeadm uses the --kubelet-version parameter to determine what the _desired_ kubelet version is. Give `) upgradeNodeConfigExample = normalizer.Examples(fmt.Sprintf(` - # Downloads the kubelet configuration from the ConfigMap in the cluster. Uses a specific desired kubelet version. + # Download the kubelet configuration from the ConfigMap in the cluster. Use a specific desired kubelet version. kubeadm upgrade node config --kubelet-version %s - # Simulates the downloading of the kubelet configuration from the ConfigMap in the cluster with a specific desired - # version. Does not change any state locally on the node. + # Simulate the downloading of the kubelet configuration from the ConfigMap in the cluster with a specific desired + # version. Do not change any state locally on the node. kubeadm upgrade node config --kubelet-version %[1]s --dry-run `, constants.CurrentKubernetesVersion)) ) @@ -73,7 +73,7 @@ type controlplaneUpgradeFlags struct { func NewCmdNode() *cobra.Command { cmd := &cobra.Command{ Use: "node", - Short: "Upgrade commands for a node in the cluster. Currently only supports upgrading the configuration, not the kubelet itself.", + Short: "Upgrade commands for a node in the cluster. Currently only support upgrading the configuration, not the kubelet itself", RunE: cmdutil.SubCmdRunE("node"), } cmd.AddCommand(NewCmdUpgradeNodeConfig()) @@ -92,7 +92,7 @@ func NewCmdUpgradeNodeConfig() *cobra.Command { cmd := &cobra.Command{ Use: "config", - Short: "Downloads the kubelet configuration from the cluster ConfigMap kubelet-config-1.X, where X is the minor version of the kubelet.", + Short: "Download the kubelet configuration from the cluster ConfigMap kubelet-config-1.X, where X is the minor version of the kubelet", Long: upgradeNodeConfigLongDesc, Example: upgradeNodeConfigExample, Run: func(cmd *cobra.Command, args []string) { @@ -119,7 +119,7 @@ func NewCmdUpgradeControlPlane() *cobra.Command { cmd := &cobra.Command{ Use: "experimental-control-plane", - Short: "Upgrades the control plane instance deployed on this node. IMPORTANT. This command should be executed after executing `kubeadm upgrade apply` on another control plane instance", + Short: "Upgrade the control plane instance deployed on this node. IMPORTANT. This command should be executed after executing `kubeadm upgrade apply` on another control plane instance", Long: upgradeNodeConfigLongDesc, Example: upgradeNodeConfigExample, Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/kubeadm/app/cmd/upgrade/plan.go b/cmd/kubeadm/app/cmd/upgrade/plan.go index 4323a69cd9..bc0e384b92 100644 --- a/cmd/kubeadm/app/cmd/upgrade/plan.go +++ b/cmd/kubeadm/app/cmd/upgrade/plan.go @@ -46,7 +46,7 @@ func NewCmdPlan(apf *applyPlanFlags) *cobra.Command { cmd := &cobra.Command{ Use: "plan [version] [flags]", - Short: "Check which versions are available to upgrade to and validate whether your current cluster is upgradeable. To skip the internet check, pass in the optional [version] parameter.", + Short: "Check which versions are available to upgrade to and validate whether your current cluster is upgradeable. To skip the internet check, pass in the optional [version] parameter", Run: func(_ *cobra.Command, args []string) { userVersion, err := getK8sVersionFromUserInput(flags.applyPlanFlags, args, false) kubeadmutil.CheckErr(err) diff --git a/cmd/kubeadm/app/cmd/upgrade/upgrade.go b/cmd/kubeadm/app/cmd/upgrade/upgrade.go index 52e190e2e8..554ee1376c 100644 --- a/cmd/kubeadm/app/cmd/upgrade/upgrade.go +++ b/cmd/kubeadm/app/cmd/upgrade/upgrade.go @@ -53,7 +53,7 @@ func NewCmdUpgrade(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "upgrade", - Short: "Upgrade your cluster smoothly to a newer version with this command.", + Short: "Upgrade your cluster smoothly to a newer version with this command", RunE: cmdutil.SubCmdRunE("upgrade"), }