INNER CODE UNIT · Go
NewYurtadmCommand
openyurtio/openyurt · pkg/yurtadm/cmd/cmd.go:39
func NewYurtadmCommand() *cobra.Command {
version := fmt.Sprintf("%#v", projectinfo.Get())
cmds := &cobra.Command{
Use: "yurtadm",
Short: "yurtadm administers the yurt cluster",
Version: version,
}
setVersion(cmds)
// add kubeconfig to persistent flags
cmds.PersistentFlags().String("kubeconfig", "", "The path to the kubeconfig file")
cmds.AddCommand(join.NewCmdJoin(os.Stdin, os.Stdout, os.Stderr))
cmds.AddCommand(reset.NewCmdReset(os.Stdin, os.Stdout, os.Stderr))
cmds.AddCommand(token.NewCmdToken(os.Stdin, os.Stdout, os.Stderr))
cmds.AddCommand(docs.NewDocsCmd(cmds))
cmds.AddCommand(renew.NewCmdRenew(os.Stdin, os.Stdout, os.Stderr))
cmds.AddCommand(staticpods.NewCmdStaticPods(os.Stdin, os.Stdout, os.Stderr))
cmds.AddCommand(config.NewCmdConfig(os.Stdin, os.Stdout, os.Stderr))