mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 09:32:52 +00:00
23 lines
550 B
Go
23 lines
550 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/kubesphere/kubekey/pkg/delete"
|
|
"github.com/kubesphere/kubekey/pkg/util"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var deleteClusterCmd = &cobra.Command{
|
|
Use: "cluster",
|
|
Short: "Delete a cluster",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
logger := util.InitLogger(opt.Verbose)
|
|
delete.ResetCluster(opt.ClusterCfgFile, logger, opt.Verbose)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
deleteCmd.AddCommand(deleteClusterCmd)
|
|
|
|
deleteClusterCmd.Flags().StringVarP(&opt.ClusterCfgFile, "filename", "f", "", "Path to a configuration file")
|
|
}
|