Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrencyPolicy ¶
type ConcurrencyPolicy string
ConcurrencyPolicy describes how the job will be handled. Only one of the following concurrent policies may be specified. If none of the following policies is specified, the default one is AllowConcurrent. +kubebuilder:validation:Enum=Allow;Forbid;Replace
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" )
ISSUE: none of these docs (on the ConcurrencyPolicy constants) are exposed in any final product ISSUE: these can easily get out of sync with the validation on the type above
type CronJob ¶
type CronJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CronJobSpec `json:"spec,omitempty"` Status CronJobStatus `json:"status,omitempty"` }
CronJob is the Schema for the cronjobs API
type CronJobList ¶
type CronJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CronJob `json:"items"` }
CronJobList contains a list of CronJob
type CronJobSpec ¶
type CronJobSpec struct { // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. Schedule string `json:"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"` // 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"` // This flag tells the controller to suspend subsequent executions, it does // not apply to already started executions. // +optional // +default=false Suspend *bool `json:"suspend,omitempty"` // Specifies the job that will be created when executing a CronJob. JobTemplate batchv1beta1.JobTemplateSpec `json:"jobTemplate"` // The number of successful finished jobs to retain. // This is a pointer to distinguish between explicit zero and not specified. // +optional // +default=3 SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` // The number of failed finished jobs to retain. // This is a pointer to distinguish between explicit zero and not specified. // +optional // +default=1 FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` }
CronJobSpec defines the desired state of CronJob
type CronJobStatus ¶
type CronJobStatus struct { // A list of pointers to currently running jobs. // +optional Active []corev1.ObjectReference `json:"active,omitempty"` // Information when was the last time the job was successfully scheduled. // +optional LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` }
CronJobStatus defines the observed state of CronJob
Click to show internal directories.
Click to hide internal directories.