kube-forge v2: embede python with ansible (kubespray) and cobra as cli building tool
This commit is contained in:
21
cmd/upgrade.go
Normal file
21
cmd/upgrade.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(upgradeCmd)
|
||||
}
|
||||
|
||||
var upgradeCmd = &cobra.Command{
|
||||
Use: "upgrade",
|
||||
Short: "Upgrade cluster. Use when changing version of K8s",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
templates.ApplyK8sTemplates()
|
||||
kubespray.UpgradeCluster("")
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user