Documentation ¶
Index ¶
- Variables
- type JobSetWrapper
- func (j *JobSetWrapper) EnableDNSHostnames(val bool) *JobSetWrapper
- func (j *JobSetWrapper) FailurePolicy(policy *jobset.FailurePolicy) *JobSetWrapper
- func (j *JobSetWrapper) NetworkSubdomain(val string) *JobSetWrapper
- func (j *JobSetWrapper) Obj() *jobset.JobSet
- func (j *JobSetWrapper) ReplicatedJob(job jobset.ReplicatedJob) *JobSetWrapper
- func (j *JobSetWrapper) SetAnnotations(annotations map[string]string) *JobSetWrapper
- func (j *JobSetWrapper) SuccessPolicy(policy *jobset.SuccessPolicy) *JobSetWrapper
- func (j *JobSetWrapper) Suspend(suspend bool) *JobSetWrapper
- type JobTemplateWrapper
- type JobWrapper
- func (j *JobWrapper) Active(active int32) *JobWrapper
- func (j *JobWrapper) Affinity(affinity *corev1.Affinity) *JobWrapper
- func (j *JobWrapper) Completions(completions int32) *JobWrapper
- func (j *JobWrapper) JobAnnotations(annotations map[string]string) *JobWrapper
- func (j *JobWrapper) JobLabels(labels map[string]string) *JobWrapper
- func (j *JobWrapper) Obj() *batchv1.Job
- func (j *JobWrapper) Parallelism(parallelism int32) *JobWrapper
- func (j *JobWrapper) PodAnnotations(annotations map[string]string) *JobWrapper
- func (j *JobWrapper) PodLabels(labels map[string]string) *JobWrapper
- func (j *JobWrapper) PodSpec(podSpec corev1.PodSpec) *JobWrapper
- func (j *JobWrapper) Ready(ready int32) *JobWrapper
- func (j *JobWrapper) Subdomain(subdomain string) *JobWrapper
- func (j *JobWrapper) Succeeded(succeeded int32) *JobWrapper
- func (j *JobWrapper) Suspend(suspend bool) *JobWrapper
- type ReplicatedJobWrapper
Constants ¶
This section is empty.
Variables ¶
var TestPodSpec = corev1.PodSpec{ RestartPolicy: "Never", 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 ¶
JobSetWrapper wraps a JobSet.
func MakeJobSet ¶
func MakeJobSet(name, ns string) *JobSetWrapper
MakeJobSet creates a wrapper for a JobSet.
func (*JobSetWrapper) EnableDNSHostnames ¶ added in v0.2.0
func (j *JobSetWrapper) EnableDNSHostnames(val bool) *JobSetWrapper
EnableDNSHostnames sets the value of ReplicatedJob.Network.EnableDNSHostnames.
func (*JobSetWrapper) FailurePolicy ¶
func (j *JobSetWrapper) FailurePolicy(policy *jobset.FailurePolicy) *JobSetWrapper
FailurePolicy sets the value of jobSet.spec.failurePolicy
func (*JobSetWrapper) NetworkSubdomain ¶ added in v0.2.0
func (j *JobSetWrapper) NetworkSubdomain(val string) *JobSetWrapper
NetworkSubdomain sets the value of JobSet.Network.Subdomain
func (*JobSetWrapper) Obj ¶
func (j *JobSetWrapper) Obj() *jobset.JobSet
Obj returns the inner JobSet.
func (*JobSetWrapper) ReplicatedJob ¶
func (j *JobSetWrapper) ReplicatedJob(job jobset.ReplicatedJob) *JobSetWrapper
ReplicatedJob adds a single ReplicatedJob to the JobSet.
func (*JobSetWrapper) SetAnnotations ¶
func (j *JobSetWrapper) SetAnnotations(annotations map[string]string) *JobSetWrapper
SetAnnotations sets the value of the jobSet.metadata.annotations.
func (*JobSetWrapper) SuccessPolicy ¶ added in v0.2.0
func (j *JobSetWrapper) SuccessPolicy(policy *jobset.SuccessPolicy) *JobSetWrapper
SuccessPolicy sets the value of jobSet.spec.successPolicy
func (*JobSetWrapper) Suspend ¶
func (j *JobSetWrapper) Suspend(suspend bool) *JobSetWrapper
Suspend adds a suspend flag to JobSet
type JobTemplateWrapper ¶
type JobTemplateWrapper struct {
batchv1.JobTemplateSpec
}
JobTemplateWrapper wraps a JobTemplateSpec.
func MakeJobTemplate ¶
func MakeJobTemplate(name, ns string) *JobTemplateWrapper
MakeJobTemplate creates a wrapper for a JobTemplateSpec.
func (*JobTemplateWrapper) CompletionMode ¶
func (j *JobTemplateWrapper) CompletionMode(mode batchv1.CompletionMode) *JobTemplateWrapper
CompletionMode sets the value of job.spec.completionMode
func (*JobTemplateWrapper) Obj ¶
func (j *JobTemplateWrapper) Obj() batchv1.JobTemplateSpec
Obj returns the inner batchv1.JobTemplateSpec
func (*JobTemplateWrapper) PodSpec ¶
func (j *JobTemplateWrapper) PodSpec(podSpec corev1.PodSpec) *JobTemplateWrapper
Containers sets the pod template spec containers.
type JobWrapper ¶
JobWrapper wraps a Job.
func MakeJob ¶
func MakeJob(jobName, ns string) *JobWrapper
MakeJobWrapper creates a wrapper for a Job.
func (*JobWrapper) Active ¶ added in v0.2.0
func (j *JobWrapper) Active(active int32) *JobWrapper
Active sets the job status active.
func (*JobWrapper) Affinity ¶
func (j *JobWrapper) Affinity(affinity *corev1.Affinity) *JobWrapper
Affinity sets the pod affinities/anti-affinities for the pod template spec.
func (*JobWrapper) Completions ¶ added in v0.2.0
func (j *JobWrapper) Completions(completions int32) *JobWrapper
Completions sets the job spec completions.
func (*JobWrapper) JobAnnotations ¶
func (j *JobWrapper) JobAnnotations(annotations map[string]string) *JobWrapper
JobAnnotations sets the Job annotations.
func (*JobWrapper) JobLabels ¶
func (j *JobWrapper) JobLabels(labels map[string]string) *JobWrapper
JobLabels sets the Job labels.
func (*JobWrapper) Parallelism ¶ added in v0.2.0
func (j *JobWrapper) Parallelism(parallelism int32) *JobWrapper
Parallelism sets the job spec parallelism.
func (*JobWrapper) PodAnnotations ¶
func (j *JobWrapper) PodAnnotations(annotations map[string]string) *JobWrapper
PodAnnotations sets the pod template spec annotations.
func (*JobWrapper) PodLabels ¶
func (j *JobWrapper) PodLabels(labels map[string]string) *JobWrapper
PodLabels sets the pod template spec labels.
func (*JobWrapper) PodSpec ¶
func (j *JobWrapper) PodSpec(podSpec corev1.PodSpec) *JobWrapper
PodSpec sets the pod template spec.
func (*JobWrapper) Ready ¶ added in v0.2.0
func (j *JobWrapper) Ready(ready int32) *JobWrapper
Ready sets the job status ready.
func (*JobWrapper) Subdomain ¶
func (j *JobWrapper) Subdomain(subdomain string) *JobWrapper
Subdomain sets the pod template spec subdomain.
func (*JobWrapper) Succeeded ¶ added in v0.2.0
func (j *JobWrapper) Succeeded(succeeded int32) *JobWrapper
Succeeded sets the job status succeeded.
func (*JobWrapper) Suspend ¶
func (j *JobWrapper) Suspend(suspend bool) *JobWrapper
Suspend sets suspend in the job spec.
type ReplicatedJobWrapper ¶
type ReplicatedJobWrapper struct {
jobset.ReplicatedJob
}
ReplicatedJobWrapper wraps a ReplicatedJob.
func MakeReplicatedJob ¶
func MakeReplicatedJob(name string) *ReplicatedJobWrapper
MakeReplicatedJob creates a wrapper for a ReplicatedJob.
func (*ReplicatedJobWrapper) Job ¶
func (r *ReplicatedJobWrapper) Job(jobSpec batchv1.JobTemplateSpec) *ReplicatedJobWrapper
Job sets the Job spec for the ReplicatedJob template.
func (*ReplicatedJobWrapper) Obj ¶
func (r *ReplicatedJobWrapper) Obj() jobset.ReplicatedJob
Obj returns the inner ReplicatedJob.
func (*ReplicatedJobWrapper) Replicas ¶
func (r *ReplicatedJobWrapper) Replicas(val int) *ReplicatedJobWrapper
Replicas sets the value of the ReplicatedJob.Replicas.
func (*ReplicatedJobWrapper) Subdomain ¶ added in v0.2.0
func (r *ReplicatedJobWrapper) Subdomain(subdomain string) *ReplicatedJobWrapper
Subdomain sets the subdomain on the PodSpec We artificially do this because the webhook does not work in testing