mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
[Federation] Kubefed doc fix
This commit is contained in:
parent
7477e184aa
commit
8a7709de9b
@ -26,10 +26,20 @@ import (
|
||||
kubectl "k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
"k8s.io/kubernetes/pkg/util/i18n"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
kubefedVersionExample = templates.Examples(i18n.T(`
|
||||
# Print the client and server versions for the current context
|
||||
kubefed version`))
|
||||
kubefedOptionsExample = templates.Examples(i18n.T(`
|
||||
# Print flags inherited by all commands
|
||||
kubefed options`))
|
||||
)
|
||||
|
||||
// NewKubeFedCommand creates the `kubefed` command and its nested children.
|
||||
func NewKubeFedCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer, defaultServerImage, defaultEtcdImage string) *cobra.Command {
|
||||
// Parent command to which all subcommands are added.
|
||||
@ -66,8 +76,12 @@ func NewKubeFedCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer, defa
|
||||
}
|
||||
templates.ActsAsRootCommand(cmds, filters, groups...)
|
||||
|
||||
cmds.AddCommand(kubectl.NewCmdVersion(f, out))
|
||||
cmds.AddCommand(kubectl.NewCmdOptions(out))
|
||||
cmdVersion := kubectl.NewCmdVersion(f, out)
|
||||
cmdVersion.Example = kubefedVersionExample
|
||||
cmds.AddCommand(cmdVersion)
|
||||
cmdOptions := kubectl.NewCmdOptions(out)
|
||||
cmdOptions.Example = kubefedOptionsExample
|
||||
cmds.AddCommand(cmdOptions)
|
||||
|
||||
return cmds
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user