Skip to content

Commit

Permalink
Rebase with main, update migrate code
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok committed Jul 11, 2023
1 parent 3e5b875 commit 9ce9fcd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion cmd/cli/cmd/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ func NewMigrate() *cobra.Command {
flags.StringVar(&opts.ConfigExporter.Tag, "cfg-exporter-image-tag", DefaultImageTag, "Config Exporter job image tag")
flags.DurationVar(&opts.ConfigExporter.PollPeriod, "cfg-exporter-poll-period", 1*time.Second, "Config Exporter job poll period")
flags.DurationVar(&opts.ConfigExporter.Timeout, "cfg-exporter-timeout", 1*time.Minute, "Config Exporter job timeout")
flags.BoolVarP(&opts.Debug, "debug", "d", false, "Turn on debug logging")

return login
}
Expand Down
1 change: 0 additions & 1 deletion cmd/cli/docs/botkube_migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ botkube migrate [OPTIONS] [flags]
--cfg-exporter-timeout duration Config Exporter job timeout (default 1m0s)
--cloud-api-url string Botkube Cloud API URL (default "https://api.botkube.io/graphql")
--cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io")
-d, --debug Turn on debug logging
-h, --help help for migrate
--instance-name string Botkube Cloud Instance name that will be created
-l, --label string Label of Botkube pod (default "app=botkube")
Expand Down
8 changes: 7 additions & 1 deletion cmd/cli/docs/botkube_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ botkube version -o=short
-o, --output string Output format. One of: json | pretty | short | yaml (default "pretty")
```

### Options inherited from parent commands

```
-v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable)
```

### SEE ALSO

* [botkube](botkube.md) - Botkube Cloud CLI
* [botkube](botkube.md) - Botkube CLI

3 changes: 2 additions & 1 deletion internal/cli/migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"k8s.io/client-go/tools/clientcmd"

cliconfig "github.com/kubeshop/botkube/cmd/cli/cmd/config"
"github.com/kubeshop/botkube/internal/cli"
"github.com/kubeshop/botkube/internal/cli/printer"
"github.com/kubeshop/botkube/internal/ptr"
gqlModel "github.com/kubeshop/botkube/internal/remote/graphql"
Expand Down Expand Up @@ -297,7 +298,7 @@ func waitForMigrationJob(ctx context.Context, k8sCli *kubernetes.Clientset, opts

errMsg := fmt.Sprintf("migration job failed: %s", context.Canceled.Error())

if opts.Debug && job != nil {
if cli.VerboseMode.IsEnabled() && job != nil {
errMsg = fmt.Sprintf("%s\n\nDEBUG:\njob:\n\n%s", errMsg, job.String())
}

Expand Down
1 change: 0 additions & 1 deletion internal/cli/migrate/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import "time"

// Options holds migrate possible configuration options.
type Options struct {
Debug bool
Token string
InstanceName string `survey:"instanceName"`
CloudDashboardURL string
Expand Down

0 comments on commit 9ce9fcd

Please sign in to comment.