generated.proto 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. /*
  2. Copyright 2016 The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // This file was autogenerated by go-to-protobuf. Do not edit it manually!
  14. syntax = 'proto2';
  15. package k8s.io.kubernetes.pkg.apis.batch.v2alpha1;
  16. import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
  17. import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
  18. import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
  19. import "k8s.io/kubernetes/pkg/runtime/generated.proto";
  20. import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
  21. // Package-wide variables from generator "generated".
  22. option go_package = "v2alpha1";
  23. // Job represents the configuration of a single job.
  24. message Job {
  25. // Standard object's metadata.
  26. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#metadata
  27. optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
  28. // Spec is a structure defining the expected behavior of a job.
  29. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#spec-and-status
  30. optional JobSpec spec = 2;
  31. // Status is a structure describing current status of a job.
  32. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#spec-and-status
  33. optional JobStatus status = 3;
  34. }
  35. // JobCondition describes current state of a job.
  36. message JobCondition {
  37. // Type of job condition, Complete or Failed.
  38. optional string type = 1;
  39. // Status of the condition, one of True, False, Unknown.
  40. optional string status = 2;
  41. // Last time the condition was checked.
  42. optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3;
  43. // Last time the condition transit from one status to another.
  44. optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
  45. // (brief) reason for the condition's last transition.
  46. optional string reason = 5;
  47. // Human readable message indicating details about last transition.
  48. optional string message = 6;
  49. }
  50. // JobList is a collection of jobs.
  51. message JobList {
  52. // Standard list metadata
  53. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#metadata
  54. optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
  55. // Items is the list of Job.
  56. repeated Job items = 2;
  57. }
  58. // JobSpec describes how the job execution will look like.
  59. message JobSpec {
  60. // Parallelism specifies the maximum desired number of pods the job should
  61. // run at any given time. The actual number of pods running in steady state will
  62. // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
  63. // i.e. when the work left to do is less than max parallelism.
  64. // More info: http://releases.k8s.io/release-1.4/docs/user-guide/jobs.md
  65. optional int32 parallelism = 1;
  66. // Completions specifies the desired number of successfully finished pods the
  67. // job should be run with. Setting to nil means that the success of any
  68. // pod signals the success of all pods, and allows parallelism to have any positive
  69. // value. Setting to 1 means that parallelism is limited to 1 and the success of that
  70. // pod signals the success of the job.
  71. // More info: http://releases.k8s.io/release-1.4/docs/user-guide/jobs.md
  72. optional int32 completions = 2;
  73. // Optional duration in seconds relative to the startTime that the job may be active
  74. // before the system tries to terminate it; value must be positive integer
  75. optional int64 activeDeadlineSeconds = 3;
  76. // Selector is a label query over pods that should match the pod count.
  77. // Normally, the system sets this field for you.
  78. // More info: http://releases.k8s.io/release-1.4/docs/user-guide/labels.md#label-selectors
  79. optional LabelSelector selector = 4;
  80. // ManualSelector controls generation of pod labels and pod selectors.
  81. // Leave `manualSelector` unset unless you are certain what you are doing.
  82. // When false or unset, the system pick labels unique to this job
  83. // and appends those labels to the pod template. When true,
  84. // the user is responsible for picking unique labels and specifying
  85. // the selector. Failure to pick a unique label may cause this
  86. // and other jobs to not function correctly. However, You may see
  87. // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
  88. // API.
  89. // More info: http://releases.k8s.io/release-1.4/docs/design/selector-generation.md
  90. optional bool manualSelector = 5;
  91. // Template is the object that describes the pod that will be created when
  92. // executing a job.
  93. // More info: http://releases.k8s.io/release-1.4/docs/user-guide/jobs.md
  94. optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6;
  95. }
  96. // JobStatus represents the current state of a Job.
  97. message JobStatus {
  98. // Conditions represent the latest available observations of an object's current state.
  99. // More info: http://releases.k8s.io/release-1.4/docs/user-guide/jobs.md
  100. repeated JobCondition conditions = 1;
  101. // StartTime represents time when the job was acknowledged by the Job Manager.
  102. // It is not guaranteed to be set in happens-before order across separate operations.
  103. // It is represented in RFC3339 form and is in UTC.
  104. optional k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 2;
  105. // CompletionTime represents time when the job was completed. It is not guaranteed to
  106. // be set in happens-before order across separate operations.
  107. // It is represented in RFC3339 form and is in UTC.
  108. optional k8s.io.kubernetes.pkg.api.unversioned.Time completionTime = 3;
  109. // Active is the number of actively running pods.
  110. optional int32 active = 4;
  111. // Succeeded is the number of pods which reached Phase Succeeded.
  112. optional int32 succeeded = 5;
  113. // Failed is the number of pods which reached Phase Failed.
  114. optional int32 failed = 6;
  115. }
  116. // JobTemplate describes a template for creating copies of a predefined pod.
  117. message JobTemplate {
  118. // Standard object's metadata.
  119. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#metadata
  120. optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
  121. // Template defines jobs that will be created from this template
  122. // http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#spec-and-status
  123. optional JobTemplateSpec template = 2;
  124. }
  125. // JobTemplateSpec describes the data a Job should have when created from a template
  126. message JobTemplateSpec {
  127. // Standard object's metadata of the jobs created from this template.
  128. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#metadata
  129. optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
  130. // Specification of the desired behavior of the job.
  131. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#spec-and-status
  132. optional JobSpec spec = 2;
  133. }
  134. // A label selector is a label query over a set of resources. The result of matchLabels and
  135. // matchExpressions are ANDed. An empty label selector matches all objects. A null
  136. // label selector matches no objects.
  137. message LabelSelector {
  138. // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  139. // map is equivalent to an element of matchExpressions, whose key field is "key", the
  140. // operator is "In", and the values array contains only "value". The requirements are ANDed.
  141. map<string, string> matchLabels = 1;
  142. // matchExpressions is a list of label selector requirements. The requirements are ANDed.
  143. repeated LabelSelectorRequirement matchExpressions = 2;
  144. }
  145. // A label selector requirement is a selector that contains values, a key, and an operator that
  146. // relates the key and values.
  147. message LabelSelectorRequirement {
  148. // key is the label key that the selector applies to.
  149. optional string key = 1;
  150. // operator represents a key's relationship to a set of values.
  151. // Valid operators ard In, NotIn, Exists and DoesNotExist.
  152. optional string operator = 2;
  153. // values is an array of string values. If the operator is In or NotIn,
  154. // the values array must be non-empty. If the operator is Exists or DoesNotExist,
  155. // the values array must be empty. This array is replaced during a strategic
  156. // merge patch.
  157. repeated string values = 3;
  158. }
  159. // ScheduledJob represents the configuration of a single scheduled job.
  160. message ScheduledJob {
  161. // Standard object's metadata.
  162. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#metadata
  163. optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
  164. // Spec is a structure defining the expected behavior of a job, including the schedule.
  165. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#spec-and-status
  166. optional ScheduledJobSpec spec = 2;
  167. // Status is a structure describing current status of a job.
  168. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#spec-and-status
  169. optional ScheduledJobStatus status = 3;
  170. }
  171. // ScheduledJobList is a collection of scheduled jobs.
  172. message ScheduledJobList {
  173. // Standard list metadata
  174. // More info: http://releases.k8s.io/release-1.4/docs/devel/api-conventions.md#metadata
  175. optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
  176. // Items is the list of ScheduledJob.
  177. repeated ScheduledJob items = 2;
  178. }
  179. // ScheduledJobSpec describes how the job execution will look like and when it will actually run.
  180. message ScheduledJobSpec {
  181. // Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
  182. optional string schedule = 1;
  183. // Optional deadline in seconds for starting the job if it misses scheduled
  184. // time for any reason. Missed jobs executions will be counted as failed ones.
  185. optional int64 startingDeadlineSeconds = 2;
  186. // ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
  187. optional string concurrencyPolicy = 3;
  188. // Suspend flag tells the controller to suspend subsequent executions, it does
  189. // not apply to already started executions. Defaults to false.
  190. optional bool suspend = 4;
  191. // JobTemplate is the object that describes the job that will be created when
  192. // executing a ScheduledJob.
  193. optional JobTemplateSpec jobTemplate = 5;
  194. }
  195. // ScheduledJobStatus represents the current state of a Job.
  196. message ScheduledJobStatus {
  197. // Active holds pointers to currently running jobs.
  198. repeated k8s.io.kubernetes.pkg.api.v1.ObjectReference active = 1;
  199. // LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
  200. optional k8s.io.kubernetes.pkg.api.unversioned.Time lastScheduleTime = 4;
  201. }