blob: 039149daba2b6dddf9c6302484414362d315c0f3 [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.v1;
23
24import "k8s.io/api/core/v1/generated.proto";
25import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
26import "k8s.io/apimachinery/pkg/runtime/generated.proto";
27import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
28
29// Package-wide variables from generator "generated".
30option go_package = "v1";
31
32// Job represents the configuration of a single job.
33message Job {
34 // Standard object's metadata.
35 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
36 // +optional
37 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
38
39 // Specification of the desired behavior of a job.
40 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
41 // +optional
42 optional JobSpec spec = 2;
43
44 // Current status of a job.
45 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
46 // +optional
47 optional JobStatus status = 3;
48}
49
50// JobCondition describes current state of a job.
51message JobCondition {
52 // Type of job condition, Complete or Failed.
53 optional string type = 1;
54
55 // Status of the condition, one of True, False, Unknown.
56 optional string status = 2;
57
58 // Last time the condition was checked.
59 // +optional
60 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
61
62 // Last time the condition transit from one status to another.
63 // +optional
64 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
65
66 // (brief) reason for the condition's last transition.
67 // +optional
68 optional string reason = 5;
69
70 // Human readable message indicating details about last transition.
71 // +optional
72 optional string message = 6;
73}
74
75// JobList is a collection of jobs.
76message JobList {
77 // Standard list metadata.
78 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
79 // +optional
80 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
81
82 // items is the list of Jobs.
83 repeated Job items = 2;
84}
85
86// JobSpec describes how the job execution will look like.
87message JobSpec {
88 // Specifies the maximum desired number of pods the job should
89 // run at any given time. The actual number of pods running in steady state will
90 // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
91 // i.e. when the work left to do is less than max parallelism.
92 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
93 // +optional
94 optional int32 parallelism = 1;
95
96 // Specifies the desired number of successfully finished pods the
97 // job should be run with. Setting to nil means that the success of any
98 // pod signals the success of all pods, and allows parallelism to have any positive
99 // value. Setting to 1 means that parallelism is limited to 1 and the success of that
100 // pod signals the success of the job.
101 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
102 // +optional
103 optional int32 completions = 2;
104
105 // Specifies the duration in seconds relative to the startTime that the job may be active
106 // before the system tries to terminate it; value must be positive integer
107 // +optional
108 optional int64 activeDeadlineSeconds = 3;
109
110 // Specifies the number of retries before marking this job failed.
111 // Defaults to 6
112 // +optional
113 optional int32 backoffLimit = 7;
114
115 // A label query over pods that should match the pod count.
116 // Normally, the system sets this field for you.
117 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
118 // +optional
119 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
120
121 // manualSelector controls generation of pod labels and pod selectors.
122 // Leave `manualSelector` unset unless you are certain what you are doing.
123 // When false or unset, the system pick labels unique to this job
124 // and appends those labels to the pod template. When true,
125 // the user is responsible for picking unique labels and specifying
126 // the selector. Failure to pick a unique label may cause this
127 // and other jobs to not function correctly. However, You may see
128 // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
129 // API.
130 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector
131 // +optional
132 optional bool manualSelector = 5;
133
134 // Describes the pod that will be created when executing a job.
135 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
136 optional k8s.io.api.core.v1.PodTemplateSpec template = 6;
137
138 // ttlSecondsAfterFinished limits the lifetime of a Job that has finished
139 // execution (either Complete or Failed). If this field is set,
140 // ttlSecondsAfterFinished after the Job finishes, it is eligible to be
141 // automatically deleted. When the Job is being deleted, its lifecycle
142 // guarantees (e.g. finalizers) will be honored. If this field is unset,
143 // the Job won't be automatically deleted. If this field is set to zero,
144 // the Job becomes eligible to be deleted immediately after it finishes.
145 // This field is alpha-level and is only honored by servers that enable the
146 // TTLAfterFinished feature.
147 // +optional
148 optional int32 ttlSecondsAfterFinished = 8;
149}
150
151// JobStatus represents the current state of a Job.
152message JobStatus {
153 // The latest available observations of an object's current state.
154 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
155 // +optional
156 // +patchMergeKey=type
157 // +patchStrategy=merge
158 repeated JobCondition conditions = 1;
159
160 // Represents time when the job was acknowledged by the job controller.
161 // It is not guaranteed to be set in happens-before order across separate operations.
162 // It is represented in RFC3339 form and is in UTC.
163 // +optional
164 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2;
165
166 // Represents time when the job was completed. It is not guaranteed to
167 // be set in happens-before order across separate operations.
168 // It is represented in RFC3339 form and is in UTC.
169 // +optional
170 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3;
171
172 // The number of actively running pods.
173 // +optional
174 optional int32 active = 4;
175
176 // The number of pods which reached phase Succeeded.
177 // +optional
178 optional int32 succeeded = 5;
179
180 // The number of pods which reached phase Failed.
181 // +optional
182 optional int32 failed = 6;
183}
184