blob: 1fe17ff21ab87c027e91b46c9a38d3ec6bb388bb [file] [log] [blame]
Matthias Andreas Benkard832a54e2019-01-29 09:27:38 +01001/*
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.v2alpha1;
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";
29import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
30
31// Package-wide variables from generator "generated".
32option go_package = "v2alpha1";
33
34// CronJob represents the configuration of a single cron job.
35message CronJob {
36 // Standard object's metadata.
37 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
38 // +optional
39 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
40
41 // Specification of the desired behavior of a cron job, including the schedule.
42 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
43 // +optional
44 optional CronJobSpec spec = 2;
45
46 // Current status of a cron job.
47 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
48 // +optional
49 optional CronJobStatus status = 3;
50}
51
52// CronJobList is a collection of cron jobs.
53message CronJobList {
54 // Standard list metadata.
55 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
56 // +optional
57 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
58
59 // items is the list of CronJobs.
60 repeated CronJob items = 2;
61}
62
63// CronJobSpec describes how the job execution will look like and when it will actually run.
64message CronJobSpec {
65 // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
66 optional string schedule = 1;
67
68 // Optional deadline in seconds for starting the job if it misses scheduled
69 // time for any reason. Missed jobs executions will be counted as failed ones.
70 // +optional
71 optional int64 startingDeadlineSeconds = 2;
72
73 // Specifies how to treat concurrent executions of a Job.
74 // Valid values are:
75 // - "Allow" (default): allows CronJobs to run concurrently;
76 // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
77 // - "Replace": cancels currently running job and replaces it with a new one
78 // +optional
79 optional string concurrencyPolicy = 3;
80
81 // This flag tells the controller to suspend subsequent executions, it does
82 // not apply to already started executions. Defaults to false.
83 // +optional
84 optional bool suspend = 4;
85
86 // Specifies the job that will be created when executing a CronJob.
87 optional JobTemplateSpec jobTemplate = 5;
88
89 // The number of successful finished jobs to retain.
90 // This is a pointer to distinguish between explicit zero and not specified.
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 // +optional
97 optional int32 failedJobsHistoryLimit = 7;
98}
99
100// CronJobStatus represents the current state of a cron job.
101message CronJobStatus {
102 // A list of pointers to currently running jobs.
103 // +optional
104 repeated k8s.io.api.core.v1.ObjectReference active = 1;
105
106 // Information when was the last time the job was successfully scheduled.
107 // +optional
108 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
109}
110
111// JobTemplate describes a template for creating copies of a predefined pod.
112message JobTemplate {
113 // Standard object's metadata.
114 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
115 // +optional
116 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
117
118 // Defines jobs that will be created from this template.
119 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
120 // +optional
121 optional JobTemplateSpec template = 2;
122}
123
124// JobTemplateSpec describes the data a Job should have when created from a template
125message JobTemplateSpec {
126 // Standard object's metadata of the jobs created from this template.
127 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
128 // +optional
129 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
130
131 // Specification of the desired behavior of the job.
132 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
133 // +optional
134 optional k8s.io.api.batch.v1.JobSpec spec = 2;
135}
136