kubekey/cmd/delete_node.go
“Forest-L 5e52c083fe add node delete
Signed-off-by: “Forest-L <lilin@yunify.com>
2020-08-18 09:51:20 +08:00

23 lines
552 B
Go

package cmd
import (
"github.com/kubesphere/kubekey/pkg/delete"
"github.com/kubesphere/kubekey/pkg/util"
"github.com/spf13/cobra"
"strings"
)
var deleteNodeCmd = &cobra.Command{
Use: "node",
Short: "delete a node",
Run: func(cmd *cobra.Command, args []string) {
logger := util.InitLogger(opt.Verbose)
delete.ResetNode(opt.ClusterCfgFile, logger, opt.Verbose, strings.Join(args, ""))
},
}
func init() {
deleteCmd.AddCommand(deleteNodeCmd)
deleteNodeCmd.Flags().StringVarP(&opt.ClusterCfgFile, "config", "f", "", "Path to a config")
}