feat(clustertool): move all talhelper references to talassist

This commit is contained in:
Kjeld Schouten
2024-11-06 01:20:29 +01:00
parent 66e079fb1c
commit 16c0e0c387
18 changed files with 137 additions and 267 deletions
+11 -1
View File
@@ -5,6 +5,9 @@ import (
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/gencmd"
"github.com/truecharts/public/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/initfiles"
"github.com/truecharts/public/clustertool/pkg/talassist"
)
var advBootstrapLongHelp = strings.TrimSpace(`
@@ -20,7 +23,14 @@ var bootstrap = &cobra.Command{
}
func bootstrapfunc(cmd *cobra.Command, args []string) {
gencmd.RunBootstrap(args)
if helper.GetYesOrNo("Do you want to also run the complete ClusterTool Bootstrap, besides just talos? (yes/no) [y/n]: ") {
initfiles.LoadTalEnv(false)
talassist.LoadTalConfig()
gencmd.RunBootstrap(args)
} else {
bootstrapcmds := gencmd.GenPlain("bootstrap", talassist.TalConfig.Nodes[0].IPAddress, []string{})
gencmd.ExecCmd(bootstrapcmds[0])
}
}
func init() {