Documentation ¶
Index ¶
- func SetContainerDefaults(c *corev1.Container)
- type JobWrapper
- func (j *JobWrapper) Active(c int32) *JobWrapper
- func (j *JobWrapper) BackoffLimit(limit int32) *JobWrapper
- func (j *JobWrapper) Clone() *JobWrapper
- func (j *JobWrapper) Completions(p int32) *JobWrapper
- func (j *JobWrapper) Condition(c batchv1.JobCondition) *JobWrapper
- func (j *JobWrapper) Containers(containers ...corev1.Container) *JobWrapper
- func (j *JobWrapper) Generation(g int64) *JobWrapper
- func (j *JobWrapper) Image(image string, args []string) *JobWrapper
- func (j *JobWrapper) Indexed(indexed bool) *JobWrapper
- func (j *JobWrapper) Label(key, value string) *JobWrapper
- func (j *JobWrapper) NodeSelector(k, v string) *JobWrapper
- func (j *JobWrapper) Obj() *batchv1.Job
- func (j *JobWrapper) OwnerReference(ownerName string, ownerGVK schema.GroupVersionKind) *JobWrapper
- func (j *JobWrapper) Parallelism(p int32) *JobWrapper
- func (j *JobWrapper) PodAnnotation(k, v string) *JobWrapper
- func (j *JobWrapper) PodLabel(k, v string) *JobWrapper
- func (j *JobWrapper) PriorityClass(pc string) *JobWrapper
- func (j *JobWrapper) Queue(queue string) *JobWrapper
- func (j *JobWrapper) QueueNameAnnotation(queue string) *JobWrapper
- func (j *JobWrapper) Request(r corev1.ResourceName, v string) *JobWrapper
- func (j *JobWrapper) SetAnnotation(key, content string) *JobWrapper
- func (j *JobWrapper) StartTime(t time.Time) *JobWrapper
- func (j *JobWrapper) Suspend(s bool) *JobWrapper
- func (j *JobWrapper) TerminationGracePeriod(seconds int64) *JobWrapper
- func (j *JobWrapper) Toleration(t corev1.Toleration) *JobWrapper
- func (j *JobWrapper) UID(uid string) *JobWrapper
- func (j *JobWrapper) WorkloadPriorityClass(wpc string) *JobWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetContainerDefaults ¶ added in v0.6.0
Types ¶
type JobWrapper ¶
JobWrapper wraps a Job.
func MakeJob ¶
func MakeJob(name, ns string) *JobWrapper
MakeJob creates a wrapper for a suspended job with a single container and parallelism=1.
func (*JobWrapper) Active ¶ added in v0.5.0
func (j *JobWrapper) Active(c int32) *JobWrapper
Active sets the .status.active
func (*JobWrapper) BackoffLimit ¶ added in v0.6.0
func (j *JobWrapper) BackoffLimit(limit int32) *JobWrapper
func (*JobWrapper) Clone ¶ added in v0.5.0
func (j *JobWrapper) Clone() *JobWrapper
Clone returns deep copy of the Job.
func (*JobWrapper) Completions ¶ added in v0.4.0
func (j *JobWrapper) Completions(p int32) *JobWrapper
Completions updates job completions.
func (*JobWrapper) Condition ¶ added in v0.5.0
func (j *JobWrapper) Condition(c batchv1.JobCondition) *JobWrapper
Condition adds a condition
func (*JobWrapper) Containers ¶ added in v0.6.0
func (j *JobWrapper) Containers(containers ...corev1.Container) *JobWrapper
func (*JobWrapper) Generation ¶ added in v0.7.0
func (j *JobWrapper) Generation(g int64) *JobWrapper
Generation sets the generation
func (*JobWrapper) Image ¶
func (j *JobWrapper) Image(image string, args []string) *JobWrapper
func (*JobWrapper) Indexed ¶ added in v0.5.0
func (j *JobWrapper) Indexed(indexed bool) *JobWrapper
Indexed sets the job's completion to Indexed of NonIndexed
func (*JobWrapper) Label ¶ added in v0.5.0
func (j *JobWrapper) Label(key, value string) *JobWrapper
Label sets the label key and value
func (*JobWrapper) NodeSelector ¶
func (j *JobWrapper) NodeSelector(k, v string) *JobWrapper
NodeSelector adds a node selector to the job.
func (*JobWrapper) OwnerReference ¶ added in v0.3.1
func (j *JobWrapper) OwnerReference(ownerName string, ownerGVK schema.GroupVersionKind) *JobWrapper
OwnerReference adds a ownerReference to the default container.
func (*JobWrapper) Parallelism ¶
func (j *JobWrapper) Parallelism(p int32) *JobWrapper
Parallelism updates job parallelism.
func (*JobWrapper) PodAnnotation ¶ added in v0.5.0
func (j *JobWrapper) PodAnnotation(k, v string) *JobWrapper
PodAnnotation sets annotation at the pod template level
func (*JobWrapper) PodLabel ¶ added in v0.5.0
func (j *JobWrapper) PodLabel(k, v string) *JobWrapper
PodLabel sets label at the pod template level
func (*JobWrapper) PriorityClass ¶
func (j *JobWrapper) PriorityClass(pc string) *JobWrapper
PriorityClass updates job priorityclass.
func (*JobWrapper) Queue ¶
func (j *JobWrapper) Queue(queue string) *JobWrapper
Queue updates the queue name of the job
func (*JobWrapper) QueueNameAnnotation ¶
func (j *JobWrapper) QueueNameAnnotation(queue string) *JobWrapper
QueueNameAnnotation updates the queue name of the job by annotation (deprecated)
func (*JobWrapper) Request ¶
func (j *JobWrapper) Request(r corev1.ResourceName, v string) *JobWrapper
Request adds a resource request to the default container.
func (*JobWrapper) SetAnnotation ¶ added in v0.4.0
func (j *JobWrapper) SetAnnotation(key, content string) *JobWrapper
func (*JobWrapper) StartTime ¶ added in v0.5.0
func (j *JobWrapper) StartTime(t time.Time) *JobWrapper
StartTime sets the .status.startTime
func (*JobWrapper) Suspend ¶
func (j *JobWrapper) Suspend(s bool) *JobWrapper
Suspend updates the suspend status of the job
func (*JobWrapper) TerminationGracePeriod ¶ added in v0.6.0
func (j *JobWrapper) TerminationGracePeriod(seconds int64) *JobWrapper
func (*JobWrapper) Toleration ¶
func (j *JobWrapper) Toleration(t corev1.Toleration) *JobWrapper
Toleration adds a toleration to the job.
func (*JobWrapper) UID ¶ added in v0.3.2
func (j *JobWrapper) UID(uid string) *JobWrapper
UID updates the uid of the job.
func (*JobWrapper) WorkloadPriorityClass ¶ added in v0.5.0
func (j *JobWrapper) WorkloadPriorityClass(wpc string) *JobWrapper
WorkloadPriorityClass updates job workloadpriorityclass.