cronjob

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 MutateCronJob

func MutateCronJob(i Mutate, obj *batchv1beta1.CronJob) error

Types

type CronJob

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

+kubebuilder:object:generate=true

func (*CronJob) DeepCopy

func (in *CronJob) DeepCopy() *CronJob

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

func (*CronJob) DeepCopyInto

func (in *CronJob) DeepCopyInto(out *CronJob)

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

func (*CronJob) GetObject

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

func (*CronJob) GetObjectGroup

func (o *CronJob) GetObjectGroup() string

func (*CronJob) GetObjectKind

func (o *CronJob) GetObjectKind() string

func (*CronJob) Init

func (o *CronJob) Init()

func (*CronJob) Mutate

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

type CronJobSpec

type CronJobSpec struct {
	// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
	Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`

	// Optional deadline in seconds for starting the job if it misses scheduled
	// time for any reason.  Missed jobs executions will be counted as failed ones.
	// +optional
	StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`

	// Specifies how to treat concurrent executions of a Job.
	// Valid values are:
	// - "Allow" (default): allows CronJobs to run concurrently;
	// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
	// - "Replace": cancels currently running job and replaces it with a new one
	// +optional
	ConcurrencyPolicy batchv1beta1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`

	// This flag tells the controller to suspend subsequent executions, it does
	// not apply to already started executions.  Defaults to false.
	// +optional
	Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`

	// The number of successful finished jobs to retain.
	// This is a pointer to distinguish between explicit zero and not specified.
	// Defaults to 3.
	// +optional
	SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=successfulJobsHistoryLimit"`

	// The number of failed finished jobs to retain.
	// This is a pointer to distinguish between explicit zero and not specified.
	// Defaults to 1.
	// +optional
	FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,7,opt,name=failedJobsHistoryLimit"`
	// Job describes the pod that will be created.
	*job.Job `json:",inline"`
}

+kubebuilder:object:generate=true

func (*CronJobSpec) DeepCopy

func (in *CronJobSpec) DeepCopy() *CronJobSpec

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

func (*CronJobSpec) DeepCopyInto

func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec)

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

func (*CronJobSpec) GetConcurrencyPolicy

func (spec *CronJobSpec) GetConcurrencyPolicy() batchv1beta1.ConcurrencyPolicy

func (*CronJobSpec) GetFailedJobsHistoryLimit

func (spec *CronJobSpec) GetFailedJobsHistoryLimit() *int32

func (*CronJobSpec) GetSchedule

func (spec *CronJobSpec) GetSchedule() string

func (*CronJobSpec) GetStartingDeadlineSeconds

func (spec *CronJobSpec) GetStartingDeadlineSeconds() *int64

func (*CronJobSpec) GetSuccessfulJobsHistoryLimit

func (spec *CronJobSpec) GetSuccessfulJobsHistoryLimit() *int32

type Mutate

type Mutate interface {
	GetSuccessfulJobsHistoryLimit() *int32
	GetConcurrencyPolicy() batchv1beta1.ConcurrencyPolicy
	GetStartingDeadlineSeconds() *int64
	GetSchedule() string
	GetFailedJobsHistoryLimit() *int32
	job.Mutate
}

Jump to

Keyboard shortcuts

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