generated.proto 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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.scheduling.v1alpha1;
  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 = "k8s.io/api/scheduling/v1alpha1";
  22. // BasicSchedulingPolicy indicates that standard Kubernetes
  23. // scheduling behavior should be used.
  24. message BasicSchedulingPolicy {
  25. }
  26. // GangSchedulingPolicy defines the parameters for gang scheduling.
  27. message GangSchedulingPolicy {
  28. // MinCount is the minimum number of pods that must be schedulable or scheduled
  29. // at the same time for the scheduler to admit the entire group.
  30. // It must be a positive integer.
  31. //
  32. // +required
  33. optional int32 minCount = 1;
  34. }
  35. // PodGroup represents a set of pods with a common scheduling policy.
  36. message PodGroup {
  37. // Name is a unique identifier for the PodGroup within the Workload.
  38. // It must be a DNS label. This field is immutable.
  39. //
  40. // +required
  41. optional string name = 1;
  42. // Policy defines the scheduling policy for this PodGroup.
  43. //
  44. // +required
  45. optional PodGroupPolicy policy = 3;
  46. }
  47. // PodGroupPolicy defines the scheduling configuration for a PodGroup.
  48. message PodGroupPolicy {
  49. // Basic specifies that the pods in this group should be scheduled using
  50. // standard Kubernetes scheduling behavior.
  51. //
  52. // +optional
  53. // +oneOf=PolicySelection
  54. optional BasicSchedulingPolicy basic = 2;
  55. // Gang specifies that the pods in this group should be scheduled using
  56. // all-or-nothing semantics.
  57. //
  58. // +optional
  59. // +oneOf=PolicySelection
  60. optional GangSchedulingPolicy gang = 3;
  61. }
  62. // DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass.
  63. // PriorityClass defines mapping from a priority class name to the priority
  64. // integer value. The value can be any valid integer.
  65. message PriorityClass {
  66. // Standard object's metadata.
  67. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  68. // +optional
  69. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  70. // value represents the integer value of this priority class. This is the actual priority that pods
  71. // receive when they have the name of this class in their pod spec.
  72. optional int32 value = 2;
  73. // globalDefault specifies whether this PriorityClass should be considered as
  74. // the default priority for pods that do not have any priority class.
  75. // Only one PriorityClass can be marked as `globalDefault`. However, if more than
  76. // one PriorityClasses exists with their `globalDefault` field set to true,
  77. // the smallest value of such global default PriorityClasses will be used as the default priority.
  78. // +optional
  79. optional bool globalDefault = 3;
  80. // description is an arbitrary string that usually provides guidelines on
  81. // when this priority class should be used.
  82. // +optional
  83. optional string description = 4;
  84. // preemptionPolicy is the Policy for preempting pods with lower priority.
  85. // One of Never, PreemptLowerPriority.
  86. // Defaults to PreemptLowerPriority if unset.
  87. // +optional
  88. optional string preemptionPolicy = 5;
  89. }
  90. // PriorityClassList is a collection of priority classes.
  91. message PriorityClassList {
  92. // Standard list metadata
  93. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  94. // +optional
  95. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  96. // items is the list of PriorityClasses
  97. repeated PriorityClass items = 2;
  98. }
  99. // TypedLocalObjectReference allows to reference typed object inside the same namespace.
  100. message TypedLocalObjectReference {
  101. // APIGroup is the group for the resource being referenced.
  102. // If APIGroup is empty, the specified Kind must be in the core API group.
  103. // For any other third-party types, setting APIGroup is required.
  104. // It must be a DNS subdomain.
  105. //
  106. // +optional
  107. optional string apiGroup = 1;
  108. // Kind is the type of resource being referenced.
  109. // It must be a path segment name.
  110. //
  111. // +required
  112. optional string kind = 2;
  113. // Name is the name of resource being referenced.
  114. // It must be a path segment name.
  115. //
  116. // +required
  117. optional string name = 3;
  118. }
  119. // Workload allows for expressing scheduling constraints that should be used
  120. // when managing lifecycle of workloads from scheduling perspective,
  121. // including scheduling, preemption, eviction and other phases.
  122. message Workload {
  123. // Standard object's metadata.
  124. // Name must be a DNS subdomain.
  125. //
  126. // +optional
  127. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  128. // Spec defines the desired behavior of a Workload.
  129. //
  130. // +required
  131. optional WorkloadSpec spec = 2;
  132. }
  133. // WorkloadList contains a list of Workload resources.
  134. message WorkloadList {
  135. // Standard list metadata.
  136. //
  137. // +optional
  138. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  139. // Items is the list of Workloads.
  140. repeated Workload items = 2;
  141. }
  142. // WorkloadSpec defines the desired state of a Workload.
  143. message WorkloadSpec {
  144. // ControllerRef is an optional reference to the controlling object, such as a
  145. // Deployment or Job. This field is intended for use by tools like CLIs
  146. // to provide a link back to the original workload definition.
  147. // When set, it cannot be changed.
  148. //
  149. // +optional
  150. optional TypedLocalObjectReference controllerRef = 1;
  151. // PodGroups is the list of pod groups that make up the Workload.
  152. // The maximum number of pod groups is 8. This field is immutable.
  153. //
  154. // +required
  155. // +listType=map
  156. // +listMapKey=name
  157. repeated PodGroup podGroups = 2;
  158. }