generated.proto 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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.v1;
  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 = "v1";
  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. // A label selector is a label query over a set of resources. The result of matchLabels and
  117. // matchExpressions are ANDed. An empty label selector matches all objects. A null
  118. // label selector matches no objects.
  119. message LabelSelector {
  120. // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  121. // map is equivalent to an element of matchExpressions, whose key field is "key", the
  122. // operator is "In", and the values array contains only "value". The requirements are ANDed.
  123. map<string, string> matchLabels = 1;
  124. // matchExpressions is a list of label selector requirements. The requirements are ANDed.
  125. repeated LabelSelectorRequirement matchExpressions = 2;
  126. }
  127. // A label selector requirement is a selector that contains values, a key, and an operator that
  128. // relates the key and values.
  129. message LabelSelectorRequirement {
  130. // key is the label key that the selector applies to.
  131. optional string key = 1;
  132. // operator represents a key's relationship to a set of values.
  133. // Valid operators ard In, NotIn, Exists and DoesNotExist.
  134. optional string operator = 2;
  135. // values is an array of string values. If the operator is In or NotIn,
  136. // the values array must be non-empty. If the operator is Exists or DoesNotExist,
  137. // the values array must be empty. This array is replaced during a strategic
  138. // merge patch.
  139. repeated string values = 3;
  140. }