22 lines
397 B
Go
22 lines
397 B
Go
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("")
|
|
},
|
|
}
|