job

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MutateJob

func MutateJob(i Mutate, obj *batchv1.JobSpec) error

Types

type Job

type Job struct {
	// Standard object metadata.
	// +optional
	*meta.ObjectMeta `json:"meta,omitempty"`
	// Specification of the desired behavior of the Job.
	// +optional
	*JobSpec `json:",inline"`
}

+kubebuilder:object:generate=true

func (*Job) DeepCopy

func (in *Job) DeepCopy() *Job

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Job.

func (*Job) DeepCopyInto

func (in *Job) DeepCopyInto(out *Job)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Job) GetActiveDeadlineSeconds

func (spec *Job) GetActiveDeadlineSeconds() *int64

func (*Job) GetBackoffLimit

func (spec *Job) GetBackoffLimit() *int32

func (*Job) GetCompletions

func (spec *Job) GetCompletions() *int32

func (*Job) GetObject

func (o *Job) GetObject() interfaces.Object

func (*Job) GetObjectGroup

func (o *Job) GetObjectGroup() string

func (*Job) GetObjectKind

func (o *Job) GetObjectKind() string

func (*Job) GetParallelism

func (spec *Job) GetParallelism() *int32

func (*Job) GetTTLSecondsAfterFinished

func (spec *Job) GetTTLSecondsAfterFinished() *int32

func (*Job) Init

func (o *Job) Init()

func (*Job) Mutate

func (o *Job) Mutate(obj interfaces.Object) error

type JobSpec

type JobSpec struct {
	// Standard object metadata.
	// +optional
	*meta.ObjectMeta `json:"meta,omitempty"`
	// Specifies the maximum desired number of pods the job should
	// run at any given time. The actual number of pods running in steady state will
	// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
	// i.e. when the work left to do is less than max parallelism.
	// +optional
	Parallelism *int32 `json:"parallelism,omitempty"`
	// Specifies the desired number of successfully finished pods the
	// job should be run with.  Setting to nil means that the success of any
	// pod signals the success of all pods, and allows parallelism to have any positive
	// value.  Setting to 1 means that parallelism is limited to 1 and the success of that
	// pod signals the success of the job.
	// +optional
	Completions *int32 `json:"completions,omitempty"`

	// Optional duration in seconds relative to the startTime that the job may be active
	// before the system tries to terminate it; value must be positive integer
	// +optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`

	// Optional number of retries before marking this job failed.
	// Defaults to 6
	// +optional
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`

	// ttlSecondsAfterFinished limits the lifetime of a Job that has finished
	// execution (either Complete or Failed). If this field is set,
	// ttlSecondsAfterFinished after the Job finishes, it is eligible to be
	// automatically deleted. When the Job is being deleted, its lifecycle
	// guarantees (e.g. finalizers) will be honored. If this field is unset,
	// the Job won't be automatically deleted. If this field is set to zero,
	// the Job becomes eligible to be deleted immediately after it finishes.
	// This field is alpha-level and is only honored by servers that enable the
	// TTLAfterFinished feature.
	// +optional
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
	// PodSpec describes the pods that will be created.
	*pod.Pod `json:",inline"`
}

+kubebuilder:object:generate=true

func (*JobSpec) DeepCopy

func (in *JobSpec) DeepCopy() *JobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobSpec.

func (*JobSpec) DeepCopyInto

func (in *JobSpec) DeepCopyInto(out *JobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Mutate

type Mutate interface {
	GetParallelism() *int32
	GetCompletions() *int32
	GetActiveDeadlineSeconds() *int64
	GetBackoffLimit() *int32
	GetTTLSecondsAfterFinished() *int32
	pod.Mutate
}

Jump to

Keyboard shortcuts

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