Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpk: change error in cluster health flag description #4703

Merged
merged 1 commit into from
May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/go/rpk/pkg/cli/cmd/cluster/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (

func NewHealthOverviewCommand(fs afero.Fs) *cobra.Command {
var (
wait bool
exit bool
watch bool
exit bool

adminURL string
adminEnableTLS bool
Expand Down Expand Up @@ -63,7 +63,7 @@ following conditions are met:
printHealthOverview(&ret)
}
lastOverview = ret
if !wait || exit && lastOverview.IsHealthy {
if !watch || exit && lastOverview.IsHealthy {
break
}
time.Sleep(2 * time.Second)
Expand All @@ -84,8 +84,8 @@ following conditions are met:
&adminCAFile,
)

cmd.Flags().BoolVarP(&wait, "watch", "w", false, "blocks and writes out all cluster health changes")
cmd.Flags().BoolVarP(&exit, "exit-when-healthy", "e", false, "when used with wait, exits after cluster is back in healthy state")
cmd.Flags().BoolVarP(&watch, "watch", "w", false, "blocks and writes out all cluster health changes")
cmd.Flags().BoolVarP(&exit, "exit-when-healthy", "e", false, "when used with watch, exits after cluster is back in healthy state")
return cmd
}

Expand Down