Avoid confusion between `--wait` (watcher) and no --wait (hookOnly)

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
pull/31421/head
Benoit Tigeot 2 months ago
parent 1836f37f4d
commit 8535e9f4ab
No known key found for this signature in database
GPG Key ID: 8E6D4FC8AEBDA62C

@ -57,9 +57,9 @@ func addValueOptionsFlags(f *pflag.FlagSet, v *values.Options) {
func AddWaitFlag(cmd *cobra.Command, wait *kube.WaitStrategy) {
cmd.Flags().Var(
newWaitValue(kube.HookOnlyStrategy, wait),
newWaitValue(kube.StatusWatcherStrategy, wait),
"wait",
"wait until resources are ready (up to --timeout). Values: 'watcher' (default), 'legacy', and 'hookOnly'",
"wait until resources are ready (up to --timeout). Values: 'watcher' (default), 'hookOnly', and 'legacy'",
)
// Sets the strategy to use the watcher strategy if `--wait` is used without an argument
cmd.Flags().Lookup("wait").NoOptDefVal = string(kube.StatusWatcherStrategy)

Loading…
Cancel
Save