Skip to content

Commit

Permalink
Allow resync in oc observe without --names
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Oct 6, 2017
1 parent 27a725b commit 4e4e5ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/oc/cli/cmd/observe/observe.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func NewCmdObserve(fullName string, f *clientcmd.Factory, out, errOut io.Writer)
// control observe program behavior
cmd.Flags().BoolVar(&options.once, "once", false, "If true, exit with a status code 0 after all current objects have been processed.")
cmd.Flags().DurationVar(&options.exitAfterPeriod, "exit-after", 0, "Exit with status code 0 after the provided duration, optional.")
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")
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.")
cmd.Flags().BoolVar(&options.printMetricsOnExit, "print-metrics-on-exit", false, "If true, on exit write all metrics to stdout.")
cmd.Flags().StringVar(&options.listenAddr, "listen-addr", options.listenAddr, "The name of an interface to listen on to expose metrics and health checking.")

Expand Down Expand Up @@ -378,7 +378,7 @@ func (o *ObserveOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args
return outputNames, nil
}
o.knownObjects = o.argumentStore
case len(o.deleteCommand) > 0:
case len(o.deleteCommand) > 0, o.resyncPeriod > 0:
o.knownObjects = o.argumentStore
}

Expand Down

0 comments on commit 4e4e5ce

Please sign in to comment.