Documentation
¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeBuilder initializes a scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: drcronjob.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ConcurrencyPolicy ¶
type ConcurrencyPolicy string
const ( // AllowConcurrent allows CronJobs to run concurrently. AllowConcurrent ConcurrencyPolicy = "Allow" // ForbidConcurrent forbids concurrent runs, skipping next run if previous // hasn't finished yet. ForbidConcurrent ConcurrencyPolicy = "Forbid" // ReplaceConcurrent cancels currently running job and replaces it with a new one. ReplaceConcurrent ConcurrencyPolicy = "Replace" )
type DRCronJob ¶
type DRCronJob struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DRCronJobSpec `json:"spec,omitempty"`
Status DRCronJobStatus `json:"status,omitempty"`
}
DRCronJob is the Schema for the drcronjobs API.
func (*DRCronJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRCronJob.
func (*DRCronJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DRCronJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DRCronJobList ¶
type DRCronJobList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DRCronJob `json:"items"`
}
DRCronJobList contains a list of DRCronJob.
func (*DRCronJobList) DeepCopy ¶
func (in *DRCronJobList) DeepCopy() *DRCronJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRCronJobList.
func (*DRCronJobList) DeepCopyInto ¶
func (in *DRCronJobList) DeepCopyInto(out *DRCronJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DRCronJobList) DeepCopyObject ¶
func (in *DRCronJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DRCronJobSpec ¶
type DRCronJobSpec struct {
// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
// The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
// If not specified, this will default to the time zone of the kube-controller-manager process.
// The set of valid time zone names and the time zone offset is loaded from the system-wide time zone
// database by the API server during CronJob validation and the controller manager during execution.
// If no system-wide time zone database can be found a bundled version of the database is used instead.
// If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host
// configuration, the controller will stop creating new new Jobs and will create a system event with the
// reason UnknownTimeZone.
// More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
// +optional
TimeZone *string `json:"timeZone,omitempty" protobuf:"bytes,8,opt,name=timeZone"`
// 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 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"`
// Specifies the job that will be created when executing a CronJob.
JobTemplate batchv1.JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
// The number of successful finished jobs to retain. Value must be non-negative integer.
// Defaults to 3.
// +optional
SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=successfulJobsHistoryLimit"`
// The number of failed finished jobs to retain. Value must be non-negative integer.
// Defaults to 1.
// +optional
FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,7,opt,name=failedJobsHistoryLimit"`
}
DRCronJobSpec defines the desired state of DRCronJob.
func (*DRCronJobSpec) DeepCopy ¶
func (in *DRCronJobSpec) DeepCopy() *DRCronJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRCronJobSpec.
func (*DRCronJobSpec) DeepCopyInto ¶
func (in *DRCronJobSpec) DeepCopyInto(out *DRCronJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DRCronJobStatus ¶
type DRCronJobStatus struct {
// A list of pointers to currently running jobs.
// +optional
// +listType=atomic
Active []corev1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
// Information when was the last time the job was successfully scheduled.
// +optional
LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
// Information when was the last time the job successfully completed.
// +optional
LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty" protobuf:"bytes,5,opt,name=lastSuccessfulTime"`
}
DRCronJobStatus defines the observed state of DRCronJob.
func (*DRCronJobStatus) DeepCopy ¶
func (in *DRCronJobStatus) DeepCopy() *DRCronJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRCronJobStatus.
func (*DRCronJobStatus) DeepCopyInto ¶
func (in *DRCronJobStatus) DeepCopyInto(out *DRCronJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.