kubekey/cmd/delete_cluster.go
24sama c9773712a5 dev-v2.0.0: fix auth bug
Signed-off-by: 24sama <leo@kubesphere.io>
2021-11-01 18:15:33 +08:00

26 lines
585 B
Go

package cmd
import (
"github.com/kubesphere/kubekey/pkg/common"
"github.com/kubesphere/kubekey/pkg/pipelines"
"github.com/spf13/cobra"
)
var deleteClusterCmd = &cobra.Command{
Use: "cluster",
Short: "Delete a cluster",
RunE: func(cmd *cobra.Command, args []string) error {
arg := common.Argument{
FilePath: opt.ClusterCfgFile,
Debug: opt.Verbose,
}
return pipelines.DeleteCluster(arg)
},
}
func init() {
deleteCmd.AddCommand(deleteClusterCmd)
deleteClusterCmd.Flags().StringVarP(&opt.ClusterCfgFile, "filename", "f", "", "Path to a configuration file")
}