feat(clustertool): introduce tracing of command-slice and dont process extraArgs for now

This commit is contained in:
Kjeld Schouten
2024-11-07 11:27:57 +01:00
parent d903946de3
commit 7c3ecc54a4
3 changed files with 10 additions and 10 deletions
+2 -5
View File
@@ -1,8 +1,6 @@
package gencmd
import (
"strings"
"github.com/rs/zerolog/log"
"github.com/truecharts/public/clustertool/embed"
"github.com/truecharts/public/clustertool/pkg/helper"
@@ -17,12 +15,11 @@ func GenPlain(command string, node string, extraArgs []string) []string {
if node == "" {
for _, noderef := range talassist.TalConfig.Nodes {
// TODO add extraFlags
cmd := talosPath + " " + command + " --talosconfig " + helper.TalosConfigFile + " -n " + noderef.IPAddress + " " + strings.Join(extraArgs, " ")
cmd := talosPath + " " + command + " --talosconfig " + helper.TalosConfigFile + " -n " + noderef.IPAddress // + " " + strings.Join(extraArgs, " ")
commands = append(commands, cmd)
}
} else {
cmd := talosPath + " " + command + " --talosconfig " + helper.TalosConfigFile + " -n " + node + " " + strings.Join(extraArgs, " ")
cmd := talosPath + " " + command + " --talosconfig " + helper.TalosConfigFile + " -n " + node // + " " + strings.Join(extraArgs, " ")
commands = append(commands, cmd)
}
log.Debug().Msgf("%s Command rendered: %s", command, commands)