Golang Client.Experimental Examples

Golang Client.Experimental - 3 examples found. These are the top rated real world Golang examples of k8s/io/kubernetes/pkg/client/unversioned.Client.Experimental extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
// 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
	})
}
Example #2
0
func deleteJob(c *client.Client, ns, name string) error {
	return c.Experimental().Jobs(ns).Delete(name, api.NewDeleteOptions(0))
}
Example #3
0
func createJob(c *client.Client, ns string, job *experimental.Job) (*experimental.Job, error) {
	return c.Experimental().Jobs(ns).Create(job)
}