Documentation ¶
Index ¶
- type JobWrapper
- func (j *JobWrapper) Image(name string, image string, args []string) *JobWrapper
- func (j *JobWrapper) NodeSelector(k, v string) *JobWrapper
- func (j *JobWrapper) Obj() *batchv1.Job
- func (j *JobWrapper) OriginalNodeSelectorsAnnotation(content string) *JobWrapper
- func (j *JobWrapper) OwnerReference(ownerName string, ownerGVK schema.GroupVersionKind) *JobWrapper
- func (j *JobWrapper) Parallelism(p int32) *JobWrapper
- func (j *JobWrapper) ParentWorkload(parentWorkload 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) Suspend(s bool) *JobWrapper
- func (j *JobWrapper) Toleration(t corev1.Toleration) *JobWrapper
- func (j *JobWrapper) UID(uid string) *JobWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) Image ¶
func (j *JobWrapper) Image(name string, image string, args []string) *JobWrapper
func (*JobWrapper) NodeSelector ¶
func (j *JobWrapper) NodeSelector(k, v string) *JobWrapper
NodeSelector adds a node selector to the job.
func (*JobWrapper) OriginalNodeSelectorsAnnotation ¶
func (j *JobWrapper) OriginalNodeSelectorsAnnotation(content string) *JobWrapper
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) ParentWorkload ¶
func (j *JobWrapper) ParentWorkload(parentWorkload string) *JobWrapper
ParentWorkload sets the parent-workload annotation
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) Suspend ¶
func (j *JobWrapper) Suspend(s bool) *JobWrapper
Suspend updates the suspend status of the job
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.