diff --git a/clustertool/cmd/adv_testcmd.go b/clustertool/cmd/adv_testcmd.go index 6ca96110a78e..422c76ebe6a2 100644 --- a/clustertool/cmd/adv_testcmd.go +++ b/clustertool/cmd/adv_testcmd.go @@ -3,9 +3,7 @@ package cmd import ( "strings" - "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "github.com/truecharts/public/clustertool/pkg/gencmd" "github.com/truecharts/public/clustertool/pkg/initfiles" "github.com/truecharts/public/clustertool/pkg/talassist" ) @@ -25,8 +23,7 @@ var testcmd = &cobra.Command{ // if err != nil { // log.Info().Msg("Error:", err) // } - cmds := gencmd.GenApply("", []string{}) - log.Info().Msgf("%s", cmds[0]) + RunApply(false, "", []string{}) }, } diff --git a/clustertool/pkg/gencmd/apply.go b/clustertool/pkg/gencmd/apply.go index a183732770de..378e3c32ffc6 100644 --- a/clustertool/pkg/gencmd/apply.go +++ b/clustertool/pkg/gencmd/apply.go @@ -19,7 +19,7 @@ func GenApply(node string, extraArgs []string) []string { for _, noderef := range talassist.TalConfig.Nodes { filename := talassist.TalConfig.ClusterName + "-" + noderef.Hostname + ".yaml" - cmd := talosPath + " " + "apply-config" + " --talosconfig " + helper.TalosConfigFile + " -n " + noderef.IPAddress + " -f " + filepath.Join(helper.TalosGenerated, filename) // + " " + strings.Join(extraArgs, " ") + cmd := talosPath + " " + "apply machineconfig" + " -f " + filepath.Join(helper.TalosGenerated, filename) + " --talosconfig " + helper.TalosConfigFile + " -n " + noderef.IPAddress // + " " + strings.Join(extraArgs, " ") commands = append(commands, cmd) } } else { @@ -35,7 +35,7 @@ func GenApply(node string, extraArgs []string) []string { } filename := talassist.TalConfig.ClusterName + "-" + nodename + ".yaml" - cmd := talosPath + " " + "apply-config" + " --talosconfig " + helper.TalosConfigFile + " -n " + node + " -f " + filepath.Join(helper.TalosGenerated, filename) // + " " + strings.Join(extraArgs, " ") + cmd := talosPath + " " + "apply machineconfig" + " -f " + filepath.Join(helper.TalosGenerated, filename) + " --talosconfig " + helper.TalosConfigFile + " -n " + node // + " " + strings.Join(extraArgs, " ") commands = append(commands, cmd) } log.Debug().Msgf("Apply Commands rendered: %s", commands) diff --git a/clustertool/pkg/gencmd/execcmd.go b/clustertool/pkg/gencmd/execcmd.go index 6db24125eeb0..67f53a07c1f6 100644 --- a/clustertool/pkg/gencmd/execcmd.go +++ b/clustertool/pkg/gencmd/execcmd.go @@ -12,7 +12,7 @@ import ( func ExecCmd(cmd string) { argslice := strings.Split(cmd, " ") - // log.Info().Msgf("Running: %s\n", argslice[0:]) + log.Trace().Msgf("command", argslice[:]) // log.Info().Msg("test", strings.Join(argslice, " ")) out, err := helper.RunCommand(argslice, false)