batch_v2alpha1
CronJob
class
lightkube.models.batch_v2alpha1.CronJob
(apiVersion=None, kind=None, metadata=None, spec=None, status=None)CronJob represents the configuration of a single cron job.
parameters
- apiVersion
str
- (optional) APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info - kind
str
- (optional) Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info - metadata
meta_v1.ObjectMeta
- (optional) Standard object's metadata. More info - spec
CronJobSpec
- (optional) Specification of the desired behavior of a cron job, including the schedule. More info - status
CronJobStatus
- (optional) Current status of a cron job. More info
CronJobList
class
lightkube.models.batch_v2alpha1.CronJobList
(items, apiVersion=None, kind=None, metadata=None)CronJobList is a collection of cron jobs.
parameters
- items
CronJob
- items is the list of CronJobs. - apiVersion
str
- (optional) APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info - kind
str
- (optional) Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info - metadata
meta_v1.ListMeta
- (optional) Standard list metadata. More info
CronJobSpec
class
lightkube.models.batch_v2alpha1.CronJobSpec
(jobTemplate, schedule, concurrencyPolicy=None, failedJobsHistoryLimit=None, startingDeadlineSeconds=None, successfulJobsHistoryLimit=None, suspend=None)CronJobSpec describes how the job execution will look like and when it will actually run.
parameters
- jobTemplate
JobTemplateSpec
- Specifies the job that will be created when executing a CronJob. - schedule
str
- The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - concurrencyPolicy
str
- (optional) 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 - failedJobsHistoryLimit
int
- (optional) The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - startingDeadlineSeconds
int
- (optional) 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. - successfulJobsHistoryLimit
int
- (optional) The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - suspend
bool
- (optional) This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.
CronJobStatus
class
lightkube.models.batch_v2alpha1.CronJobStatus
(active=None, lastScheduleTime=None)CronJobStatus represents the current state of a cron job.
parameters
- active
core_v1.ObjectReference
- (optional) A list of pointers to currently running jobs. - lastScheduleTime
meta_v1.Time
- (optional) Information when was the last time the job was successfully scheduled.
JobTemplateSpec
class
lightkube.models.batch_v2alpha1.JobTemplateSpec
(metadata=None, spec=None)JobTemplateSpec describes the data a Job should have when created from a template
parameters
- metadata
meta_v1.ObjectMeta
- (optional) Standard object's metadata of the jobs created from this template. More info - spec
batch_v1.JobSpec
- (optional) Specification of the desired behavior of the job. More info