diff --git a/go.mod b/go.mod index 7a99e1db..799b85a7 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/hashicorp/go-version v1.6.0 github.com/operator-framework/api v0.22.0 github.com/operator-framework/operator-lifecycle-manager v0.26.0 - github.com/percona/everest-operator v0.6.0-dev1.0.20240214112044-8f2dea595284 + github.com/percona/everest-operator v0.6.0-dev1.0.20240216145455-647ba87146d4 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index cfd94bf4..96a7ee38 100644 --- a/go.sum +++ b/go.sum @@ -525,8 +525,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= -github.com/percona/everest-operator v0.6.0-dev1.0.20240214112044-8f2dea595284 h1:5LKWEvGtaimDPVI3Rj9tFxO+g/zAjUJq0yFIzznQGfc= -github.com/percona/everest-operator v0.6.0-dev1.0.20240214112044-8f2dea595284/go.mod h1:45pGpvWrPy495qiQqxNuOJor4wif+vTTTJP4Qee8qZk= +github.com/percona/everest-operator v0.6.0-dev1.0.20240216145455-647ba87146d4 h1:nc8t3swfbQAIQeZhOhtDlGrAoP50I7wcJ1VIpK8DJLw= +github.com/percona/everest-operator v0.6.0-dev1.0.20240216145455-647ba87146d4/go.mod h1:45pGpvWrPy495qiQqxNuOJor4wif+vTTTJP4Qee8qZk= github.com/percona/percona-backup-mongodb v1.8.1-0.20230920143330-3b1c2e263901 h1:BDgsZRCjEuxl2/z4yWBqB0s8d20shuIDks7/RVdZiLs= github.com/percona/percona-backup-mongodb v1.8.1-0.20230920143330-3b1c2e263901/go.mod h1:fZRCMpUqkWlLVdRKqqaj001LoVP2eo6F0ZhoMPeXDng= github.com/percona/percona-postgresql-operator v0.0.0-20231220140959-ad5eef722609 h1:+UOK4gcHrRgqjo4smgfwT7/0apF6PhAJdQIdAV4ub/M= diff --git a/pkg/install/install.go b/pkg/install/install.go index c2a48b25..1b0125df 100644 --- a/pkg/install/install.go +++ b/pkg/install/install.go @@ -356,6 +356,7 @@ func (o *Install) runEverestWizard() error { if err != nil { return err } + o.config.Namespaces = namespaces o.config.NamespacesList = list return nil diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go index 3cbd1d28..2a9f3b21 100644 --- a/pkg/upgrade/upgrade.go +++ b/pkg/upgrade/upgrade.go @@ -22,6 +22,7 @@ import ( "fmt" "net/url" "os" + "strings" "github.com/AlecAivazis/survey/v2" goversion "github.com/hashicorp/go-version" @@ -117,13 +118,16 @@ func (u *Upgrade) runEverestWizard(ctx context.Context) error { Message: "Please select namespaces", Options: namespaces, } + + var input []string if err := survey.AskOne( pNamespace, - &u.config.Namespaces, + &input, survey.WithValidator(survey.MinItems(1)), ); err != nil { return err } + u.config.Namespaces = strings.Join(input, ",") } return nil