generated.proto 7.2 KB

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