blob: 043b3551b08b9a50f32adfdad174d07fd3b951d0 [file] [log] [blame]
Zack Williamse940c7a2019-08-21 14:25:39 -07001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17
18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20syntax = 'proto2';
21
22package k8s.io.api.batch.v1beta1;
23
24import "k8s.io/api/batch/v1/generated.proto";
25import "k8s.io/api/core/v1/generated.proto";
26import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
27import "k8s.io/apimachinery/pkg/runtime/generated.proto";
28import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
29
30// Package-wide variables from generator "generated".
31option go_package = "v1beta1";
32
33// CronJob represents the configuration of a single cron job.
34message CronJob {
35 // Standard object's metadata.
36 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
37 // +optional
38 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
39
40 // Specification of the desired behavior of a cron job, including the schedule.
41 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
42 // +optional
43 optional CronJobSpec spec = 2;
44
45 // Current status of a cron job.
46 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
47 // +optional
48 optional CronJobStatus status = 3;
49}
50
51// CronJobList is a collection of cron jobs.
52message CronJobList {
53 // Standard list metadata.
54 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
55 // +optional
56 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
57
58 // items is the list of CronJobs.
59 repeated CronJob items = 2;
60}
61
62// CronJobSpec describes how the job execution will look like and when it will actually run.
63message CronJobSpec {
64 // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
65 optional string schedule = 1;
66
67 // Optional deadline in seconds for starting the job if it misses scheduled
68 // time for any reason. Missed jobs executions will be counted as failed ones.
69 // +optional
70 optional int64 startingDeadlineSeconds = 2;
71
72 // Specifies how to treat concurrent executions of a Job.
73 // Valid values are:
74 // - "Allow" (default): allows CronJobs to run concurrently;
75 // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
76 // - "Replace": cancels currently running job and replaces it with a new one
77 // +optional
78 optional string concurrencyPolicy = 3;
79
80 // This flag tells the controller to suspend subsequent executions, it does
81 // not apply to already started executions. Defaults to false.
82 // +optional
83 optional bool suspend = 4;
84
85 // Specifies the job that will be created when executing a CronJob.
86 optional JobTemplateSpec jobTemplate = 5;
87
88 // The number of successful finished jobs to retain.
89 // This is a pointer to distinguish between explicit zero and not specified.
90 // Defaults to 3.
91 // +optional
92 optional int32 successfulJobsHistoryLimit = 6;
93
94 // The number of failed finished jobs to retain.
95 // This is a pointer to distinguish between explicit zero and not specified.
96 // Defaults to 1.
97 // +optional
98 optional int32 failedJobsHistoryLimit = 7;
99}
100
101// CronJobStatus represents the current state of a cron job.
102message CronJobStatus {
103 // A list of pointers to currently running jobs.
104 // +optional
105 repeated k8s.io.api.core.v1.ObjectReference active = 1;
106
107 // Information when was the last time the job was successfully scheduled.
108 // +optional
109 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
110}
111
112// JobTemplate describes a template for creating copies of a predefined pod.
113message JobTemplate {
114 // Standard object's metadata.
115 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
116 // +optional
117 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
118
119 // Defines jobs that will be created from this template.
120 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
121 // +optional
122 optional JobTemplateSpec template = 2;
123}
124
125// JobTemplateSpec describes the data a Job should have when created from a template
126message JobTemplateSpec {
127 // Standard object's metadata of the jobs created from this template.
128 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
129 // +optional
130 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
131
132 // Specification of the desired behavior of the job.
133 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
134 // +optional
135 optional k8s.io.api.batch.v1.JobSpec spec = 2;
136}
137