jobset

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestPodSpec = corev1.PodSpec{
	RestartPolicy: corev1.RestartPolicyNever,
	Containers: []corev1.Container{
		{
			Name:  "test-container",
			Image: "busybox:latest",
		},
	},
}

TestPodSpec is the default pod spec used for testing.

Functions

This section is empty.

Types

type JobSetWrapper

type JobSetWrapper struct{ jobsetapi.JobSet }

JobSetWrapper wraps a JobSet.

func MakeJobSet

func MakeJobSet(name, ns string) *JobSetWrapper

MakeJobSet creates a wrapper for a suspended JobSet

func (*JobSetWrapper) Annotations added in v0.7.0

func (j *JobSetWrapper) Annotations(annotations map[string]string) *JobSetWrapper

Annotations sets annotations to the JobSet.

func (*JobSetWrapper) Condition added in v0.6.0

func (j *JobSetWrapper) Condition(c metav1.Condition) *JobSetWrapper

Condition adds a condition

func (*JobSetWrapper) DeepCopy

func (j *JobSetWrapper) DeepCopy() *JobSetWrapper

DeepCopy returns a DeepCopy of j.

func (*JobSetWrapper) JobsStatus

func (j *JobSetWrapper) JobsStatus(statuses ...jobsetapi.ReplicatedJobStatus) *JobSetWrapper

JobsStatus updates JobSet status.

func (*JobSetWrapper) Label added in v0.6.0

func (j *JobSetWrapper) Label(k, v string) *JobSetWrapper

Label sets a label to the JobSet.

func (*JobSetWrapper) ManagedBy added in v0.7.0

func (j *JobSetWrapper) ManagedBy(c string) *JobSetWrapper

ManagedBy adds a managedby.

func (*JobSetWrapper) Obj

func (j *JobSetWrapper) Obj() *jobsetapi.JobSet

Obj returns the inner JobSet.

func (*JobSetWrapper) PriorityClass

func (j *JobSetWrapper) PriorityClass(pc string) *JobSetWrapper

PriorityClass updates JobSet priorityclass.

func (*JobSetWrapper) Queue

func (j *JobSetWrapper) Queue(queue string) *JobSetWrapper

Queue updates the queue name of the JobSet.

func (*JobSetWrapper) ReplicatedJobs

func (j *JobSetWrapper) ReplicatedJobs(replicatedJobs ...ReplicatedJobRequirements) *JobSetWrapper

ReplicatedJobs sets a new set of ReplicatedJobs in the inner JobSet.

func (*JobSetWrapper) Request

func (j *JobSetWrapper) Request(replicatedJobName string, r corev1.ResourceName, v string) *JobSetWrapper

Request adds a resource request to the first container of the target replicatedJob.

func (*JobSetWrapper) Suspend

func (j *JobSetWrapper) Suspend(s bool) *JobSetWrapper

Suspend updates the suspend status of the JobSet.

func (*JobSetWrapper) WorkloadPriorityClass added in v0.5.0

func (j *JobSetWrapper) WorkloadPriorityClass(wpc string) *JobSetWrapper

WorkloadPriorityClass updates JobSet workloadpriorityclass.

type ReplicatedJobRequirements

type ReplicatedJobRequirements struct {
	Name           string
	Replicas       int32
	Parallelism    int32
	Completions    int32
	Annotations    map[string]string
	PodAnnotations map[string]string
	Image          string
	Args           []string
}

Jump to

Keyboard shortcuts

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