testing

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobWrapper

type JobWrapper struct{ batchv1.Job }

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) Obj

func (j *JobWrapper) Obj() *batchv1.Job

Obj returns the inner 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL