generated.proto 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*
  2. Copyright 2017 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.v1;
  16. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  17. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  18. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  19. import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
  20. import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto";
  21. import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
  22. // Package-wide variables from generator "generated".
  23. option go_package = "v1";
  24. // Job represents the configuration of a single job.
  25. message Job {
  26. // Standard object's metadata.
  27. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
  28. // +optional
  29. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  30. // Spec is a structure defining the expected behavior of a job.
  31. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
  32. // +optional
  33. optional JobSpec spec = 2;
  34. // Status is a structure describing current status of a job.
  35. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
  36. // +optional
  37. optional JobStatus status = 3;
  38. }
  39. // JobCondition describes current state of a job.
  40. message JobCondition {
  41. // Type of job condition, Complete or Failed.
  42. optional string type = 1;
  43. // Status of the condition, one of True, False, Unknown.
  44. optional string status = 2;
  45. // Last time the condition was checked.
  46. // +optional
  47. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
  48. // Last time the condition transit from one status to another.
  49. // +optional
  50. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
  51. // (brief) reason for the condition's last transition.
  52. // +optional
  53. optional string reason = 5;
  54. // Human readable message indicating details about last transition.
  55. // +optional
  56. optional string message = 6;
  57. }
  58. // JobList is a collection of jobs.
  59. message JobList {
  60. // Standard list metadata
  61. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
  62. // +optional
  63. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  64. // Items is the list of Job.
  65. repeated Job items = 2;
  66. }
  67. // JobSpec describes how the job execution will look like.
  68. message JobSpec {
  69. // Parallelism specifies the maximum desired number of pods the job should
  70. // run at any given time. The actual number of pods running in steady state will
  71. // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
  72. // i.e. when the work left to do is less than max parallelism.
  73. // More info: http://kubernetes.io/docs/user-guide/jobs
  74. // +optional
  75. optional int32 parallelism = 1;
  76. // Completions specifies the desired number of successfully finished pods the
  77. // job should be run with. Setting to nil means that the success of any
  78. // pod signals the success of all pods, and allows parallelism to have any positive
  79. // value. Setting to 1 means that parallelism is limited to 1 and the success of that
  80. // pod signals the success of the job.
  81. // More info: http://kubernetes.io/docs/user-guide/jobs
  82. // +optional
  83. optional int32 completions = 2;
  84. // Optional duration in seconds relative to the startTime that the job may be active
  85. // before the system tries to terminate it; value must be positive integer
  86. // +optional
  87. optional int64 activeDeadlineSeconds = 3;
  88. // Selector is a label query over pods that should match the pod count.
  89. // Normally, the system sets this field for you.
  90. // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
  91. // +optional
  92. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
  93. // ManualSelector controls generation of pod labels and pod selectors.
  94. // Leave `manualSelector` unset unless you are certain what you are doing.
  95. // When false or unset, the system pick labels unique to this job
  96. // and appends those labels to the pod template. When true,
  97. // the user is responsible for picking unique labels and specifying
  98. // the selector. Failure to pick a unique label may cause this
  99. // and other jobs to not function correctly. However, You may see
  100. // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
  101. // API.
  102. // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
  103. // +optional
  104. optional bool manualSelector = 5;
  105. // Template is the object that describes the pod that will be created when
  106. // executing a job.
  107. // More info: http://kubernetes.io/docs/user-guide/jobs
  108. optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6;
  109. }
  110. // JobStatus represents the current state of a Job.
  111. message JobStatus {
  112. // Conditions represent the latest available observations of an object's current state.
  113. // More info: http://kubernetes.io/docs/user-guide/jobs
  114. // +optional
  115. repeated JobCondition conditions = 1;
  116. // StartTime represents time when the job was acknowledged by the Job Manager.
  117. // It is not guaranteed to be set in happens-before order across separate operations.
  118. // It is represented in RFC3339 form and is in UTC.
  119. // +optional
  120. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2;
  121. // CompletionTime represents time when the job was completed. It is not guaranteed to
  122. // be set in happens-before order across separate operations.
  123. // It is represented in RFC3339 form and is in UTC.
  124. // +optional
  125. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3;
  126. // Active is the number of actively running pods.
  127. // +optional
  128. optional int32 active = 4;
  129. // Succeeded is the number of pods which reached Phase Succeeded.
  130. // +optional
  131. optional int32 succeeded = 5;
  132. // Failed is the number of pods which reached Phase Failed.
  133. // +optional
  134. optional int32 failed = 6;
  135. }