testing

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetContainerDefaults added in v0.6.0

func SetContainerDefaults(c *corev1.Container)

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

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

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

func (j *JobWrapper) ParentWorkload(parentWorkload string) *JobWrapper

ParentWorkload sets the parent-workload annotation

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.

Jump to

Keyboard shortcuts

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