|
|
|
@ -127,7 +127,7 @@ func (c *Client) Create(resources ResourceList) (*Result, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Wait up to the given timeout for the specified resources to be ready
|
|
|
|
|
func (c *Client) Wait(resources ResourceList, timeout time.Duration, waitForJobsEnabled bool) error {
|
|
|
|
|
func (c *Client) Wait(resources ResourceList, timeout time.Duration) error {
|
|
|
|
|
cs, err := c.getKubeClient()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
@ -137,7 +137,21 @@ func (c *Client) Wait(resources ResourceList, timeout time.Duration, waitForJobs
|
|
|
|
|
log: c.Log,
|
|
|
|
|
timeout: timeout,
|
|
|
|
|
}
|
|
|
|
|
return w.waitForResources(resources, waitForJobsEnabled)
|
|
|
|
|
return w.waitForResources(resources, false)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WaitWithJobs wait up to the given timeout for the specified resources to be ready, including jobs.
|
|
|
|
|
func (c *Client) WaitWithJobs(resources ResourceList, timeout time.Duration) error {
|
|
|
|
|
cs, err := c.getKubeClient()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
w := waiter{
|
|
|
|
|
c: cs,
|
|
|
|
|
log: c.Log,
|
|
|
|
|
timeout: timeout,
|
|
|
|
|
}
|
|
|
|
|
return w.waitForResources(resources, true)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) namespace() string {
|
|
|
|
|