client/pkg/wait
Roland Huß a7d1bc9dc0 feat(service create): Wait for a service to be ready when its created (#156)
* feat(service create): Added --no-wait and --wait-timeout

By default, `kn service create` blocks until the service is either
created or an error occured during service creation.

With the option --no-wait the behaviour can be switched to an
async mode so that that kn returns immediately after the service is
created without waiting for a successful Ready status condition.

The timeout for how long to wait can be configured with --wait-timeout
If a timeout occur, that doesn't mean that the service is not created,
but the wait just returns. The default value is 60 seconds.

In wait mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.

Fixes #54

* chore(service create): Tolerate if obeservedGeneration has not been set yet during startup

* chore(service create): Refactored based on review comments

* Introduced an --async flag (replacing --wait and --no-wait)
* Added proper retry handling on the list watch
* Updated help message

* chore(service wait): Added a new test for sync behaviour
2019-06-28 05:57:06 -07:00
..
test_wait_helper.go feat(service create): Wait for a service to be ready when its created (#156) 2019-06-28 05:57:06 -07:00
wait_for_ready.go feat(service create): Wait for a service to be ready when its created (#156) 2019-06-28 05:57:06 -07:00
wait_for_ready_test.go feat(service create): Wait for a service to be ready when its created (#156) 2019-06-28 05:57:06 -07:00