// Wait for job to reach completions. func waitForJobFinish(c *client.Client, ns, jobName string, completions int) error { return wait.Poll(poll, jobTimeout, func() (bool, error) { curr, err := c.Experimental().Jobs(ns).Get(jobName) if err != nil { return false, err } return curr.Status.Successful == completions, nil }) }
func deleteJob(c *client.Client, ns, name string) error { return c.Experimental().Jobs(ns).Delete(name, api.NewDeleteOptions(0)) }
func createJob(c *client.Client, ns string, job *experimental.Job) (*experimental.Job, error) { return c.Experimental().Jobs(ns).Create(job) }