Skip to content

Commit 4e4e5ce

Browse files
Allow resync in oc observe without --names
1 parent 27a725b commit 4e4e5ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: pkg/oc/cli/cmd/observe/observe.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func NewCmdObserve(fullName string, f *clientcmd.Factory, out, errOut io.Writer)
212212
// control observe program behavior
213213
cmd.Flags().BoolVar(&options.once, "once", false, "If true, exit with a status code 0 after all current objects have been processed.")
214214
cmd.Flags().DurationVar(&options.exitAfterPeriod, "exit-after", 0, "Exit with status code 0 after the provided duration, optional.")
215-
cmd.Flags().DurationVar(&options.resyncPeriod, "resync-period", 0, "When non-zero, periodically reprocess every item from the server as a Sync event. Use to ensure external systems are kept up to date. Requires --names")
215+
cmd.Flags().DurationVar(&options.resyncPeriod, "resync-period", 0, "When non-zero, periodically reprocess every item from the server as a Sync event. Use to ensure external systems are kept up to date.")
216216
cmd.Flags().BoolVar(&options.printMetricsOnExit, "print-metrics-on-exit", false, "If true, on exit write all metrics to stdout.")
217217
cmd.Flags().StringVar(&options.listenAddr, "listen-addr", options.listenAddr, "The name of an interface to listen on to expose metrics and health checking.")
218218

@@ -378,7 +378,7 @@ func (o *ObserveOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args
378378
return outputNames, nil
379379
}
380380
o.knownObjects = o.argumentStore
381-
case len(o.deleteCommand) > 0:
381+
case len(o.deleteCommand) > 0, o.resyncPeriod > 0:
382382
o.knownObjects = o.argumentStore
383383
}
384384

0 commit comments

Comments
 (0)