2 Copyright The Kubernetes Authors.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
18 // This file was autogenerated by go-to-protobuf. Do not edit it manually!
22 package k8s.io.api.apps.v1beta1;
24 import "k8s.io/api/core/v1/generated.proto";
25 import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
26 import "k8s.io/apimachinery/pkg/runtime/generated.proto";
27 import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
28 import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
30 // Package-wide variables from generator "generated".
31 option go_package = "v1beta1";
33 // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the
34 // release notes for more information.
35 // ControllerRevision implements an immutable snapshot of state data. Clients
36 // are responsible for serializing and deserializing the objects that contain
37 // their internal state.
38 // Once a ControllerRevision has been successfully created, it can not be updated.
39 // The API Server will fail validation of all requests that attempt to mutate
40 // the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
41 // the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
42 // it may be subject to name and representation changes in future releases, and clients should not
43 // depend on its stability. It is primarily for internal use by controllers.
44 message ControllerRevision {
45 // Standard object's metadata.
46 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
48 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
50 // Data is the serialized representation of the state.
51 optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2;
53 // Revision indicates the revision of the state represented by Data.
54 optional int64 revision = 3;
57 // ControllerRevisionList is a resource containing a list of ControllerRevision objects.
58 message ControllerRevisionList {
59 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
61 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
63 // Items is the list of ControllerRevisions
64 repeated ControllerRevision items = 2;
67 // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for
69 // Deployment enables declarative updates for Pods and ReplicaSets.
71 // Standard object metadata.
73 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
75 // Specification of the desired behavior of the Deployment.
77 optional DeploymentSpec spec = 2;
79 // Most recently observed status of the Deployment.
81 optional DeploymentStatus status = 3;
84 // DeploymentCondition describes the state of a deployment at a certain point.
85 message DeploymentCondition {
86 // Type of deployment condition.
87 optional string type = 1;
89 // Status of the condition, one of True, False, Unknown.
90 optional string status = 2;
92 // The last time this condition was updated.
93 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
95 // Last time the condition transitioned from one status to another.
96 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
98 // The reason for the condition's last transition.
99 optional string reason = 4;
101 // A human readable message indicating details about the transition.
102 optional string message = 5;
105 // DeploymentList is a list of Deployments.
106 message DeploymentList {
107 // Standard list metadata.
109 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
111 // Items is the list of Deployments.
112 repeated Deployment items = 2;
116 // DeploymentRollback stores the information required to rollback a deployment.
117 message DeploymentRollback {
118 // Required: This must match the Name of a deployment.
119 optional string name = 1;
121 // The annotations to be updated to a deployment
123 map<string, string> updatedAnnotations = 2;
125 // The config of this deployment rollback.
126 optional RollbackConfig rollbackTo = 3;
129 // DeploymentSpec is the specification of the desired behavior of the Deployment.
130 message DeploymentSpec {
131 // Number of desired pods. This is a pointer to distinguish between explicit
132 // zero and not specified. Defaults to 1.
134 optional int32 replicas = 1;
136 // Label selector for pods. Existing ReplicaSets whose pods are
137 // selected by this will be the ones affected by this deployment.
139 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
141 // Template describes the pods that will be created.
142 optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
144 // The deployment strategy to use to replace existing pods with new ones.
146 // +patchStrategy=retainKeys
147 optional DeploymentStrategy strategy = 4;
149 // Minimum number of seconds for which a newly created pod should be ready
150 // without any of its container crashing, for it to be considered available.
151 // Defaults to 0 (pod will be considered available as soon as it is ready)
153 optional int32 minReadySeconds = 5;
155 // The number of old ReplicaSets to retain to allow rollback.
156 // This is a pointer to distinguish between explicit zero and not specified.
159 optional int32 revisionHistoryLimit = 6;
161 // Indicates that the deployment is paused.
163 optional bool paused = 7;
166 // The config this deployment is rolling back to. Will be cleared after rollback is done.
168 optional RollbackConfig rollbackTo = 8;
170 // The maximum time in seconds for a deployment to make progress before it
171 // is considered to be failed. The deployment controller will continue to
172 // process failed deployments and a condition with a ProgressDeadlineExceeded
173 // reason will be surfaced in the deployment status. Note that progress will
174 // not be estimated during the time a deployment is paused. Defaults to 600s.
176 optional int32 progressDeadlineSeconds = 9;
179 // DeploymentStatus is the most recently observed status of the Deployment.
180 message DeploymentStatus {
181 // The generation observed by the deployment controller.
183 optional int64 observedGeneration = 1;
185 // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
187 optional int32 replicas = 2;
189 // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
191 optional int32 updatedReplicas = 3;
193 // Total number of ready pods targeted by this deployment.
195 optional int32 readyReplicas = 7;
197 // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
199 optional int32 availableReplicas = 4;
201 // Total number of unavailable pods targeted by this deployment. This is the total number of
202 // pods that are still required for the deployment to have 100% available capacity. They may
203 // either be pods that are running but not yet available or pods that still have not been created.
205 optional int32 unavailableReplicas = 5;
207 // Represents the latest available observations of a deployment's current state.
208 // +patchMergeKey=type
209 // +patchStrategy=merge
210 repeated DeploymentCondition conditions = 6;
212 // Count of hash collisions for the Deployment. The Deployment controller uses this
213 // field as a collision avoidance mechanism when it needs to create the name for the
214 // newest ReplicaSet.
216 optional int32 collisionCount = 8;
219 // DeploymentStrategy describes how to replace existing pods with new ones.
220 message DeploymentStrategy {
221 // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
223 optional string type = 1;
225 // Rolling update config params. Present only if DeploymentStrategyType =
228 // TODO: Update this to follow our convention for oneOf, whatever we decide it
231 optional RollingUpdateDeployment rollingUpdate = 2;
235 message RollbackConfig {
236 // The revision to rollback to. If set to 0, rollback to the last revision.
238 optional int64 revision = 1;
241 // Spec to control the desired behavior of rolling update.
242 message RollingUpdateDeployment {
243 // The maximum number of pods that can be unavailable during the update.
244 // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
245 // Absolute number is calculated from percentage by rounding down.
246 // This can not be 0 if MaxSurge is 0.
248 // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
249 // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
250 // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
251 // that the total number of pods available at all times during the update is at
252 // least 70% of desired pods.
254 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
256 // The maximum number of pods that can be scheduled above the desired number of
258 // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
259 // This can not be 0 if MaxUnavailable is 0.
260 // Absolute number is calculated from percentage by rounding up.
262 // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
263 // the rolling update starts, such that the total number of old and new pods do not exceed
264 // 130% of desired pods. Once old pods have been killed,
265 // new ReplicaSet can be scaled up further, ensuring that total number of pods running
266 // at any time during the update is atmost 130% of desired pods.
268 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
271 // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
272 message RollingUpdateStatefulSetStrategy {
273 // Partition indicates the ordinal at which the StatefulSet should be
275 optional int32 partition = 1;
278 // Scale represents a scaling request for a resource.
280 // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
282 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
284 // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
286 optional ScaleSpec spec = 2;
288 // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
290 optional ScaleStatus status = 3;
293 // ScaleSpec describes the attributes of a scale subresource
295 // desired number of instances for the scaled object.
297 optional int32 replicas = 1;
300 // ScaleStatus represents the current status of a scale subresource.
301 message ScaleStatus {
302 // actual number of observed instances of the scaled object.
303 optional int32 replicas = 1;
305 // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
307 map<string, string> selector = 2;
309 // label selector for pods that should match the replicas count. This is a serializated
310 // version of both map-based and more expressive set-based selectors. This is done to
311 // avoid introspection in the clients. The string will be in the same format as the
312 // query-param syntax. If the target type only supports map-based selectors, both this
313 // field and map-based selector field are populated.
314 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
316 optional string targetSelector = 3;
319 // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for
321 // StatefulSet represents a set of pods with consistent identities.
322 // Identities are defined as:
323 // - Network: A single stable DNS and hostname.
324 // - Storage: As many VolumeClaims as requested.
325 // The StatefulSet guarantees that a given network identity will always
326 // map to the same storage identity.
327 message StatefulSet {
329 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
331 // Spec defines the desired identities of pods in this set.
333 optional StatefulSetSpec spec = 2;
335 // Status is the current status of Pods in this StatefulSet. This data
336 // may be out of date by some window of time.
338 optional StatefulSetStatus status = 3;
341 // StatefulSetCondition describes the state of a statefulset at a certain point.
342 message StatefulSetCondition {
343 // Type of statefulset condition.
344 optional string type = 1;
346 // Status of the condition, one of True, False, Unknown.
347 optional string status = 2;
349 // Last time the condition transitioned from one status to another.
351 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
353 // The reason for the condition's last transition.
355 optional string reason = 4;
357 // A human readable message indicating details about the transition.
359 optional string message = 5;
362 // StatefulSetList is a collection of StatefulSets.
363 message StatefulSetList {
365 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
367 repeated StatefulSet items = 2;
370 // A StatefulSetSpec is the specification of a StatefulSet.
371 message StatefulSetSpec {
372 // replicas is the desired number of replicas of the given Template.
373 // These are replicas in the sense that they are instantiations of the
374 // same Template, but individual replicas also have a consistent identity.
375 // If unspecified, defaults to 1.
376 // TODO: Consider a rename of this field.
378 optional int32 replicas = 1;
380 // selector is a label query over pods that should match the replica count.
381 // If empty, defaulted to labels on the pod template.
382 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
384 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
386 // template is the object that describes the pod that will be created if
387 // insufficient replicas are detected. Each pod stamped out by the StatefulSet
388 // will fulfill this Template, but have a unique identity from the rest
389 // of the StatefulSet.
390 optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
392 // volumeClaimTemplates is a list of claims that pods are allowed to reference.
393 // The StatefulSet controller is responsible for mapping network identities to
394 // claims in a way that maintains the identity of a pod. Every claim in
395 // this list must have at least one matching (by name) volumeMount in one
396 // container in the template. A claim in this list takes precedence over
397 // any volumes in the template, with the same name.
398 // TODO: Define the behavior if a claim already exists with the same name.
400 repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
402 // serviceName is the name of the service that governs this StatefulSet.
403 // This service must exist before the StatefulSet, and is responsible for
404 // the network identity of the set. Pods get DNS/hostnames that follow the
405 // pattern: pod-specific-string.serviceName.default.svc.cluster.local
406 // where "pod-specific-string" is managed by the StatefulSet controller.
407 optional string serviceName = 5;
409 // podManagementPolicy controls how pods are created during initial scale up,
410 // when replacing pods on nodes, or when scaling down. The default policy is
411 // `OrderedReady`, where pods are created in increasing order (pod-0, then
412 // pod-1, etc) and the controller will wait until each pod is ready before
413 // continuing. When scaling down, the pods are removed in the opposite order.
414 // The alternative policy is `Parallel` which will create pods in parallel
415 // to match the desired scale without waiting, and on scale down will delete
418 optional string podManagementPolicy = 6;
420 // updateStrategy indicates the StatefulSetUpdateStrategy that will be
421 // employed to update Pods in the StatefulSet when a revision is made to
423 optional StatefulSetUpdateStrategy updateStrategy = 7;
425 // revisionHistoryLimit is the maximum number of revisions that will
426 // be maintained in the StatefulSet's revision history. The revision history
427 // consists of all revisions not represented by a currently applied
428 // StatefulSetSpec version. The default value is 10.
429 optional int32 revisionHistoryLimit = 8;
432 // StatefulSetStatus represents the current state of a StatefulSet.
433 message StatefulSetStatus {
434 // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
435 // StatefulSet's generation, which is updated on mutation by the API Server.
437 optional int64 observedGeneration = 1;
439 // replicas is the number of Pods created by the StatefulSet controller.
440 optional int32 replicas = 2;
442 // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
443 optional int32 readyReplicas = 3;
445 // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
446 // indicated by currentRevision.
447 optional int32 currentReplicas = 4;
449 // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
450 // indicated by updateRevision.
451 optional int32 updatedReplicas = 5;
453 // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
454 // sequence [0,currentReplicas).
455 optional string currentRevision = 6;
457 // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
458 // [replicas-updatedReplicas,replicas)
459 optional string updateRevision = 7;
461 // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
462 // uses this field as a collision avoidance mechanism when it needs to create the name for the
463 // newest ControllerRevision.
465 optional int32 collisionCount = 9;
467 // Represents the latest available observations of a statefulset's current state.
469 // +patchMergeKey=type
470 // +patchStrategy=merge
471 repeated StatefulSetCondition conditions = 10;
474 // StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
475 // controller will use to perform updates. It includes any additional parameters
476 // necessary to perform the update for the indicated strategy.
477 message StatefulSetUpdateStrategy {
478 // Type indicates the type of the StatefulSetUpdateStrategy.
479 optional string type = 1;
481 // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
482 optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;