kube-forge v2: embede python with ansible (kubespray) and cobra as cli building tool
This commit is contained in:
21
cmd/reset.go
Normal file
21
cmd/reset.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"kube-forge/internal/kubespray"
|
||||
"kube-forge/internal/templates"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(resetCmd)
|
||||
}
|
||||
|
||||
var resetCmd = &cobra.Command{
|
||||
Use: "reset",
|
||||
Short: "Reset cluster",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
templates.ApplyK8sTemplates()
|
||||
kubespray.ResetCluster()
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user