Correction statefulset ; uninstall par modules

This commit is contained in:
ej
2024-09-26 19:01:49 +00:00
parent 1b9b79c67f
commit 009062c51a
8 changed files with 208 additions and 89 deletions

View File

@@ -2,19 +2,19 @@ package cmd
import (
"fmt"
// "strings"
// "github.com/spf13/cobra"
log "oc-deploy/log_wrapper"
// "oc-deploy/versionOc"
"oc-deploy/install"
)
func UninstallCmd(context string) error {
func UninstallCmd(context string, modules []string) error {
log.Log().Info().Msg("Uninstall >> ")
log.Log().Info().Msg(" << Contexte : " + context)
if len(modules) > 0 {
log.Log().Info().Msg(fmt.Sprintf(" << Modules : %s", modules))
}
workspace := fmt.Sprintf("workspace_%s", context)
obj := install.InstallClass{Workspace: workspace}
@@ -38,7 +38,7 @@ func UninstallCmd(context string) error {
log.Log().Fatal().Msg(" >> " + err.Error())
}
err = obj.UninstallCharts()
err = obj.UninstallCharts(modules)
if err != nil {
log.Log().Fatal().Msg(" >> " + err.Error())
}