jobset

package
v0.6.0-devel Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 6 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) DeepCopy

func (j *JobSetWrapper) DeepCopy() *JobSetWrapper

Returns a DeepCopy of j.

func (*JobSetWrapper) JobsStatus

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

JobsStatus updates JobSet status.

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    int
	Parallelism int32
	Completions int32
}

Jump to

Keyboard shortcuts

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