CreateJob uses c to create job in namespace ns. If the returned error is nil, the returned Job is valid and has been created.
GetJob uses c to get the Job in namespace ns named name. If the returned error is nil, the returned Job is valid.
GetJobPods returns a list of Pods belonging to a Job.
NewTestJob returns a Job which does one of several testing behaviors. notTerminate starts a Job that will run effectively forever. fail starts a Job that will fail immediately. succeed starts a Job that will succeed immediately. randomlySucceedOrFail starts a Job that will succeed or fail randomly. failOnce fails the Job the first time it is run and succeeds subsequently. name is the Name of the Job. RestartPolicy indicates the restart policy of the containers in which the Pod is running. Parallelism is the Job's parallelism, and completions is the Job's required number of completions.
NewTestJobOnNode is similar to NewTestJob but supports specifying a Node on which the Job's Pods will run. Empty nodeName means no node selection constraints.
WaitForAllJobPodsGone waits for all pods for the Job named jobName in namespace ns to be deleted.
WaitForAllJobPodsRunning wait for all pods for the Job named JobName in namespace ns to become Running. Only use when pods will run for a long time, or it will be racy.
WaitForJobComplete uses c to wait for completions to complete for the Job jobName in namespace ns.
WaitForJobFinish uses c to wait for the Job jobName in namespace ns to finish (either Failed or Complete).
WaitForJobGone uses c to wait for up to timeout for the Job named jobName in namespace ns to be removed.