blob: 7327c3369bbc933fda3827f7b70354a1474aca44 [file] [log] [blame]
Matthias Andreas Benkard832a54e2019-01-29 09:27:38 +01001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17
18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20syntax = 'proto2';
21
22package k8s.io.api.apps.v1beta2;
23
24import "k8s.io/api/core/v1/generated.proto";
25import "k8s.io/api/policy/v1beta1/generated.proto";
26import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
27import "k8s.io/apimachinery/pkg/runtime/generated.proto";
28import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
29import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
30
31// Package-wide variables from generator "generated".
32option go_package = "v1beta2";
33
34// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the
35// release notes for more information.
36// ControllerRevision implements an immutable snapshot of state data. Clients
37// are responsible for serializing and deserializing the objects that contain
38// their internal state.
39// Once a ControllerRevision has been successfully created, it can not be updated.
40// The API Server will fail validation of all requests that attempt to mutate
41// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
42// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
43// it may be subject to name and representation changes in future releases, and clients should not
44// depend on its stability. It is primarily for internal use by controllers.
45message ControllerRevision {
46 // Standard object's metadata.
47 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
48 // +optional
49 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
50
51 // Data is the serialized representation of the state.
52 optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2;
53
54 // Revision indicates the revision of the state represented by Data.
55 optional int64 revision = 3;
56}
57
58// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
59message ControllerRevisionList {
60 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
61 // +optional
62 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
63
64 // Items is the list of ControllerRevisions
65 repeated ControllerRevision items = 2;
66}
67
68// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for
69// more information.
70// DaemonSet represents the configuration of a daemon set.
71message DaemonSet {
72 // Standard object's metadata.
73 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
74 // +optional
75 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
76
77 // The desired behavior of this daemon set.
78 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
79 // +optional
80 optional DaemonSetSpec spec = 2;
81
82 // The current status of this daemon set. This data may be
83 // out of date by some window of time.
84 // Populated by the system.
85 // Read-only.
86 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
87 // +optional
88 optional DaemonSetStatus status = 3;
89}
90
91// DaemonSetCondition describes the state of a DaemonSet at a certain point.
92message DaemonSetCondition {
93 // Type of DaemonSet condition.
94 optional string type = 1;
95
96 // Status of the condition, one of True, False, Unknown.
97 optional string status = 2;
98
99 // Last time the condition transitioned from one status to another.
100 // +optional
101 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
102
103 // The reason for the condition's last transition.
104 // +optional
105 optional string reason = 4;
106
107 // A human readable message indicating details about the transition.
108 // +optional
109 optional string message = 5;
110}
111
112// DaemonSetList is a collection of daemon sets.
113message DaemonSetList {
114 // Standard list metadata.
115 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
116 // +optional
117 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
118
119 // A list of daemon sets.
120 repeated DaemonSet items = 2;
121}
122
123// DaemonSetSpec is the specification of a daemon set.
124message DaemonSetSpec {
125 // A label query over pods that are managed by the daemon set.
126 // Must match in order to be controlled.
127 // It must match the pod template's labels.
128 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
129 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
130
131 // An object that describes the pod that will be created.
132 // The DaemonSet will create exactly one copy of this pod on every node
133 // that matches the template's node selector (or on every node if no node
134 // selector is specified).
135 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
136 optional k8s.io.api.core.v1.PodTemplateSpec template = 2;
137
138 // An update strategy to replace existing DaemonSet pods with new pods.
139 // +optional
140 optional DaemonSetUpdateStrategy updateStrategy = 3;
141
142 // The minimum number of seconds for which a newly created DaemonSet pod should
143 // be ready without any of its container crashing, for it to be considered
144 // available. Defaults to 0 (pod will be considered available as soon as it
145 // is ready).
146 // +optional
147 optional int32 minReadySeconds = 4;
148
149 // The number of old history to retain to allow rollback.
150 // This is a pointer to distinguish between explicit zero and not specified.
151 // Defaults to 10.
152 // +optional
153 optional int32 revisionHistoryLimit = 6;
154}
155
156// DaemonSetStatus represents the current status of a daemon set.
157message DaemonSetStatus {
158 // The number of nodes that are running at least 1
159 // daemon pod and are supposed to run the daemon pod.
160 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
161 optional int32 currentNumberScheduled = 1;
162
163 // The number of nodes that are running the daemon pod, but are
164 // not supposed to run the daemon pod.
165 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
166 optional int32 numberMisscheduled = 2;
167
168 // The total number of nodes that should be running the daemon
169 // pod (including nodes correctly running the daemon pod).
170 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
171 optional int32 desiredNumberScheduled = 3;
172
173 // The number of nodes that should be running the daemon pod and have one
174 // or more of the daemon pod running and ready.
175 optional int32 numberReady = 4;
176
177 // The most recent generation observed by the daemon set controller.
178 // +optional
179 optional int64 observedGeneration = 5;
180
181 // The total number of nodes that are running updated daemon pod
182 // +optional
183 optional int32 updatedNumberScheduled = 6;
184
185 // The number of nodes that should be running the
186 // daemon pod and have one or more of the daemon pod running and
187 // available (ready for at least spec.minReadySeconds)
188 // +optional
189 optional int32 numberAvailable = 7;
190
191 // The number of nodes that should be running the
192 // daemon pod and have none of the daemon pod running and available
193 // (ready for at least spec.minReadySeconds)
194 // +optional
195 optional int32 numberUnavailable = 8;
196
197 // Count of hash collisions for the DaemonSet. The DaemonSet controller
198 // uses this field as a collision avoidance mechanism when it needs to
199 // create the name for the newest ControllerRevision.
200 // +optional
201 optional int32 collisionCount = 9;
202
203 // Represents the latest available observations of a DaemonSet's current state.
204 // +optional
205 // +patchMergeKey=type
206 // +patchStrategy=merge
207 repeated DaemonSetCondition conditions = 10;
208}
209
210// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
211message DaemonSetUpdateStrategy {
212 // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
213 // +optional
214 optional string type = 1;
215
216 // Rolling update config params. Present only if type = "RollingUpdate".
217 // ---
218 // TODO: Update this to follow our convention for oneOf, whatever we decide it
219 // to be. Same as Deployment `strategy.rollingUpdate`.
220 // See https://github.com/kubernetes/kubernetes/issues/35345
221 // +optional
222 optional RollingUpdateDaemonSet rollingUpdate = 2;
223}
224
225// DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for
226// more information.
227// Deployment enables declarative updates for Pods and ReplicaSets.
228message Deployment {
229 // Standard object metadata.
230 // +optional
231 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
232
233 // Specification of the desired behavior of the Deployment.
234 // +optional
235 optional DeploymentSpec spec = 2;
236
237 // Most recently observed status of the Deployment.
238 // +optional
239 optional DeploymentStatus status = 3;
240}
241
242// DeploymentCondition describes the state of a deployment at a certain point.
243message DeploymentCondition {
244 // Type of deployment condition.
245 optional string type = 1;
246
247 // Status of the condition, one of True, False, Unknown.
248 optional string status = 2;
249
250 // The last time this condition was updated.
251 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
252
253 // Last time the condition transitioned from one status to another.
254 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
255
256 // The reason for the condition's last transition.
257 optional string reason = 4;
258
259 // A human readable message indicating details about the transition.
260 optional string message = 5;
261}
262
263// DeploymentList is a list of Deployments.
264message DeploymentList {
265 // Standard list metadata.
266 // +optional
267 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
268
269 // Items is the list of Deployments.
270 repeated Deployment items = 2;
271}
272
273// DeploymentSpec is the specification of the desired behavior of the Deployment.
274message DeploymentSpec {
275 // Number of desired pods. This is a pointer to distinguish between explicit
276 // zero and not specified. Defaults to 1.
277 // +optional
278 optional int32 replicas = 1;
279
280 // Label selector for pods. Existing ReplicaSets whose pods are
281 // selected by this will be the ones affected by this deployment.
282 // It must match the pod template's labels.
283 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
284
285 // Template describes the pods that will be created.
286 optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
287
288 // The deployment strategy to use to replace existing pods with new ones.
289 // +optional
290 optional DeploymentStrategy strategy = 4;
291
292 // Minimum number of seconds for which a newly created pod should be ready
293 // without any of its container crashing, for it to be considered available.
294 // Defaults to 0 (pod will be considered available as soon as it is ready)
295 // +optional
296 optional int32 minReadySeconds = 5;
297
298 // The number of old ReplicaSets to retain to allow rollback.
299 // This is a pointer to distinguish between explicit zero and not specified.
300 // Defaults to 10.
301 // +optional
302 optional int32 revisionHistoryLimit = 6;
303
304 // Indicates that the deployment is paused.
305 // +optional
306 optional bool paused = 7;
307
308 // The maximum time in seconds for a deployment to make progress before it
309 // is considered to be failed. The deployment controller will continue to
310 // process failed deployments and a condition with a ProgressDeadlineExceeded
311 // reason will be surfaced in the deployment status. Note that progress will
312 // not be estimated during the time a deployment is paused. Defaults to 600s.
313 optional int32 progressDeadlineSeconds = 9;
314}
315
316// DeploymentStatus is the most recently observed status of the Deployment.
317message DeploymentStatus {
318 // The generation observed by the deployment controller.
319 // +optional
320 optional int64 observedGeneration = 1;
321
322 // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
323 // +optional
324 optional int32 replicas = 2;
325
326 // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
327 // +optional
328 optional int32 updatedReplicas = 3;
329
330 // Total number of ready pods targeted by this deployment.
331 // +optional
332 optional int32 readyReplicas = 7;
333
334 // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
335 // +optional
336 optional int32 availableReplicas = 4;
337
338 // Total number of unavailable pods targeted by this deployment. This is the total number of
339 // pods that are still required for the deployment to have 100% available capacity. They may
340 // either be pods that are running but not yet available or pods that still have not been created.
341 // +optional
342 optional int32 unavailableReplicas = 5;
343
344 // Represents the latest available observations of a deployment's current state.
345 // +patchMergeKey=type
346 // +patchStrategy=merge
347 repeated DeploymentCondition conditions = 6;
348
349 // Count of hash collisions for the Deployment. The Deployment controller uses this
350 // field as a collision avoidance mechanism when it needs to create the name for the
351 // newest ReplicaSet.
352 // +optional
353 optional int32 collisionCount = 8;
354}
355
356// DeploymentStrategy describes how to replace existing pods with new ones.
357message DeploymentStrategy {
358 // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
359 // +optional
360 optional string type = 1;
361
362 // Rolling update config params. Present only if DeploymentStrategyType =
363 // RollingUpdate.
364 // ---
365 // TODO: Update this to follow our convention for oneOf, whatever we decide it
366 // to be.
367 // +optional
368 optional RollingUpdateDeployment rollingUpdate = 2;
369}
370
371// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for
372// more information.
373// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
374message ReplicaSet {
375 // If the Labels of a ReplicaSet are empty, they are defaulted to
376 // be the same as the Pod(s) that the ReplicaSet manages.
377 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
378 // +optional
379 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
380
381 // Spec defines the specification of the desired behavior of the ReplicaSet.
382 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
383 // +optional
384 optional ReplicaSetSpec spec = 2;
385
386 // Status is the most recently observed status of the ReplicaSet.
387 // This data may be out of date by some window of time.
388 // Populated by the system.
389 // Read-only.
390 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
391 // +optional
392 optional ReplicaSetStatus status = 3;
393}
394
395// ReplicaSetCondition describes the state of a replica set at a certain point.
396message ReplicaSetCondition {
397 // Type of replica set condition.
398 optional string type = 1;
399
400 // Status of the condition, one of True, False, Unknown.
401 optional string status = 2;
402
403 // The last time the condition transitioned from one status to another.
404 // +optional
405 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
406
407 // The reason for the condition's last transition.
408 // +optional
409 optional string reason = 4;
410
411 // A human readable message indicating details about the transition.
412 // +optional
413 optional string message = 5;
414}
415
416// ReplicaSetList is a collection of ReplicaSets.
417message ReplicaSetList {
418 // Standard list metadata.
419 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
420 // +optional
421 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
422
423 // List of ReplicaSets.
424 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
425 repeated ReplicaSet items = 2;
426}
427
428// ReplicaSetSpec is the specification of a ReplicaSet.
429message ReplicaSetSpec {
430 // Replicas is the number of desired replicas.
431 // This is a pointer to distinguish between explicit zero and unspecified.
432 // Defaults to 1.
433 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
434 // +optional
435 optional int32 replicas = 1;
436
437 // Minimum number of seconds for which a newly created pod should be ready
438 // without any of its container crashing, for it to be considered available.
439 // Defaults to 0 (pod will be considered available as soon as it is ready)
440 // +optional
441 optional int32 minReadySeconds = 4;
442
443 // Selector is a label query over pods that should match the replica count.
444 // Label keys and values that must match in order to be controlled by this replica set.
445 // It must match the pod template's labels.
446 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
447 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
448
449 // Template is the object that describes the pod that will be created if
450 // insufficient replicas are detected.
451 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
452 // +optional
453 optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
454}
455
456// ReplicaSetStatus represents the current status of a ReplicaSet.
457message ReplicaSetStatus {
458 // Replicas is the most recently oberved number of replicas.
459 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
460 optional int32 replicas = 1;
461
462 // The number of pods that have labels matching the labels of the pod template of the replicaset.
463 // +optional
464 optional int32 fullyLabeledReplicas = 2;
465
466 // The number of ready replicas for this replica set.
467 // +optional
468 optional int32 readyReplicas = 4;
469
470 // The number of available replicas (ready for at least minReadySeconds) for this replica set.
471 // +optional
472 optional int32 availableReplicas = 5;
473
474 // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
475 // +optional
476 optional int64 observedGeneration = 3;
477
478 // Represents the latest available observations of a replica set's current state.
479 // +optional
480 // +patchMergeKey=type
481 // +patchStrategy=merge
482 repeated ReplicaSetCondition conditions = 6;
483}
484
485// Spec to control the desired behavior of daemon set rolling update.
486message RollingUpdateDaemonSet {
487 // The maximum number of DaemonSet pods that can be unavailable during the
488 // update. Value can be an absolute number (ex: 5) or a percentage of total
489 // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
490 // number is calculated from percentage by rounding up.
491 // This cannot be 0.
492 // Default value is 1.
493 // Example: when this is set to 30%, at most 30% of the total number of nodes
494 // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
495 // can have their pods stopped for an update at any given
496 // time. The update starts by stopping at most 30% of those DaemonSet pods
497 // and then brings up new DaemonSet pods in their place. Once the new pods
498 // are available, it then proceeds onto other DaemonSet pods, thus ensuring
499 // that at least 70% of original number of DaemonSet pods are available at
500 // all times during the update.
501 // +optional
502 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
503}
504
505// Spec to control the desired behavior of rolling update.
506message RollingUpdateDeployment {
507 // The maximum number of pods that can be unavailable during the update.
508 // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
509 // Absolute number is calculated from percentage by rounding down.
510 // This can not be 0 if MaxSurge is 0.
511 // Defaults to 25%.
512 // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
513 // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
514 // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
515 // that the total number of pods available at all times during the update is at
516 // least 70% of desired pods.
517 // +optional
518 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
519
520 // The maximum number of pods that can be scheduled above the desired number of
521 // pods.
522 // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
523 // This can not be 0 if MaxUnavailable is 0.
524 // Absolute number is calculated from percentage by rounding up.
525 // Defaults to 25%.
526 // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
527 // the rolling update starts, such that the total number of old and new pods do not exceed
528 // 130% of desired pods. Once old pods have been killed,
529 // new ReplicaSet can be scaled up further, ensuring that total number of pods running
530 // at any time during the update is atmost 130% of desired pods.
531 // +optional
532 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
533}
534
535// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
536message RollingUpdateStatefulSetStrategy {
537 // Partition indicates the ordinal at which the StatefulSet should be
538 // partitioned.
539 // Default value is 0.
540 // +optional
541 optional int32 partition = 1;
542}
543
544// Scale represents a scaling request for a resource.
545message Scale {
546 // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
547 // +optional
548 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
549
550 // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
551 // +optional
552 optional ScaleSpec spec = 2;
553
554 // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
555 // +optional
556 optional ScaleStatus status = 3;
557}
558
559// ScaleSpec describes the attributes of a scale subresource
560message ScaleSpec {
561 // desired number of instances for the scaled object.
562 // +optional
563 optional int32 replicas = 1;
564}
565
566// ScaleStatus represents the current status of a scale subresource.
567message ScaleStatus {
568 // actual number of observed instances of the scaled object.
569 optional int32 replicas = 1;
570
571 // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
572 // +optional
573 map<string, string> selector = 2;
574
575 // label selector for pods that should match the replicas count. This is a serializated
576 // version of both map-based and more expressive set-based selectors. This is done to
577 // avoid introspection in the clients. The string will be in the same format as the
578 // query-param syntax. If the target type only supports map-based selectors, both this
579 // field and map-based selector field are populated.
580 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
581 // +optional
582 optional string targetSelector = 3;
583}
584
585// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for
586// more information.
587// StatefulSet represents a set of pods with consistent identities.
588// Identities are defined as:
589// - Network: A single stable DNS and hostname.
590// - Storage: As many VolumeClaims as requested.
591// The StatefulSet guarantees that a given network identity will always
592// map to the same storage identity.
593message StatefulSet {
594 // +optional
595 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
596
597 // Spec defines the desired identities of pods in this set.
598 // +optional
599 optional StatefulSetSpec spec = 2;
600
601 // Status is the current status of Pods in this StatefulSet. This data
602 // may be out of date by some window of time.
603 // +optional
604 optional StatefulSetStatus status = 3;
605}
606
607// StatefulSetCondition describes the state of a statefulset at a certain point.
608message StatefulSetCondition {
609 // Type of statefulset condition.
610 optional string type = 1;
611
612 // Status of the condition, one of True, False, Unknown.
613 optional string status = 2;
614
615 // Last time the condition transitioned from one status to another.
616 // +optional
617 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
618
619 // The reason for the condition's last transition.
620 // +optional
621 optional string reason = 4;
622
623 // A human readable message indicating details about the transition.
624 // +optional
625 optional string message = 5;
626}
627
628// StatefulSetList is a collection of StatefulSets.
629message StatefulSetList {
630 // +optional
631 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
632
633 repeated StatefulSet items = 2;
634}
635
636// A StatefulSetSpec is the specification of a StatefulSet.
637message StatefulSetSpec {
638 // replicas is the desired number of replicas of the given Template.
639 // These are replicas in the sense that they are instantiations of the
640 // same Template, but individual replicas also have a consistent identity.
641 // If unspecified, defaults to 1.
642 // TODO: Consider a rename of this field.
643 // +optional
644 optional int32 replicas = 1;
645
646 // selector is a label query over pods that should match the replica count.
647 // It must match the pod template's labels.
648 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
649 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
650
651 // template is the object that describes the pod that will be created if
652 // insufficient replicas are detected. Each pod stamped out by the StatefulSet
653 // will fulfill this Template, but have a unique identity from the rest
654 // of the StatefulSet.
655 optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
656
657 // volumeClaimTemplates is a list of claims that pods are allowed to reference.
658 // The StatefulSet controller is responsible for mapping network identities to
659 // claims in a way that maintains the identity of a pod. Every claim in
660 // this list must have at least one matching (by name) volumeMount in one
661 // container in the template. A claim in this list takes precedence over
662 // any volumes in the template, with the same name.
663 // TODO: Define the behavior if a claim already exists with the same name.
664 // +optional
665 repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
666
667 // serviceName is the name of the service that governs this StatefulSet.
668 // This service must exist before the StatefulSet, and is responsible for
669 // the network identity of the set. Pods get DNS/hostnames that follow the
670 // pattern: pod-specific-string.serviceName.default.svc.cluster.local
671 // where "pod-specific-string" is managed by the StatefulSet controller.
672 optional string serviceName = 5;
673
674 // podManagementPolicy controls how pods are created during initial scale up,
675 // when replacing pods on nodes, or when scaling down. The default policy is
676 // `OrderedReady`, where pods are created in increasing order (pod-0, then
677 // pod-1, etc) and the controller will wait until each pod is ready before
678 // continuing. When scaling down, the pods are removed in the opposite order.
679 // The alternative policy is `Parallel` which will create pods in parallel
680 // to match the desired scale without waiting, and on scale down will delete
681 // all pods at once.
682 // +optional
683 optional string podManagementPolicy = 6;
684
685 // updateStrategy indicates the StatefulSetUpdateStrategy that will be
686 // employed to update Pods in the StatefulSet when a revision is made to
687 // Template.
688 optional StatefulSetUpdateStrategy updateStrategy = 7;
689
690 // revisionHistoryLimit is the maximum number of revisions that will
691 // be maintained in the StatefulSet's revision history. The revision history
692 // consists of all revisions not represented by a currently applied
693 // StatefulSetSpec version. The default value is 10.
694 optional int32 revisionHistoryLimit = 8;
695}
696
697// StatefulSetStatus represents the current state of a StatefulSet.
698message StatefulSetStatus {
699 // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
700 // StatefulSet's generation, which is updated on mutation by the API Server.
701 // +optional
702 optional int64 observedGeneration = 1;
703
704 // replicas is the number of Pods created by the StatefulSet controller.
705 optional int32 replicas = 2;
706
707 // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
708 optional int32 readyReplicas = 3;
709
710 // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
711 // indicated by currentRevision.
712 optional int32 currentReplicas = 4;
713
714 // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
715 // indicated by updateRevision.
716 optional int32 updatedReplicas = 5;
717
718 // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
719 // sequence [0,currentReplicas).
720 optional string currentRevision = 6;
721
722 // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
723 // [replicas-updatedReplicas,replicas)
724 optional string updateRevision = 7;
725
726 // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
727 // uses this field as a collision avoidance mechanism when it needs to create the name for the
728 // newest ControllerRevision.
729 // +optional
730 optional int32 collisionCount = 9;
731
732 // Represents the latest available observations of a statefulset's current state.
733 // +optional
734 // +patchMergeKey=type
735 // +patchStrategy=merge
736 repeated StatefulSetCondition conditions = 10;
737}
738
739// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
740// controller will use to perform updates. It includes any additional parameters
741// necessary to perform the update for the indicated strategy.
742message StatefulSetUpdateStrategy {
743 // Type indicates the type of the StatefulSetUpdateStrategy.
744 // Default is RollingUpdate.
745 // +optional
746 optional string type = 1;
747
748 // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
749 // +optional
750 optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;
751}
752