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