1/* 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/apimachinery/pkg/apis/meta/v1/generated.proto"; 26import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 27import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 28import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; 29 30// Package-wide variables from generator "generated". 31option go_package = "v1"; 32 33// ControllerRevision implements an immutable snapshot of state data. Clients 34// are responsible for serializing and deserializing the objects that contain 35// their internal state. 36// Once a ControllerRevision has been successfully created, it can not be updated. 37// The API Server will fail validation of all requests that attempt to mutate 38// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both 39// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, 40// it may be subject to name and representation changes in future releases, and clients should not 41// depend on its stability. It is primarily for internal use by controllers. 42message ControllerRevision { 43 // Standard object's metadata. 44 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 45 // +optional 46 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 47 48 // Data is the serialized representation of the state. 49 optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2; 50 51 // Revision indicates the revision of the state represented by Data. 52 optional int64 revision = 3; 53} 54 55// ControllerRevisionList is a resource containing a list of ControllerRevision objects. 56message ControllerRevisionList { 57 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 58 // +optional 59 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 60 61 // Items is the list of ControllerRevisions 62 repeated ControllerRevision items = 2; 63} 64 65// DaemonSet represents the configuration of a daemon set. 66message DaemonSet { 67 // Standard object's metadata. 68 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 69 // +optional 70 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 71 72 // The desired behavior of this daemon set. 73 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status 74 // +optional 75 optional DaemonSetSpec spec = 2; 76 77 // The current status of this daemon set. This data may be 78 // out of date by some window of time. 79 // Populated by the system. 80 // Read-only. 81 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status 82 // +optional 83 optional DaemonSetStatus status = 3; 84} 85 86// DaemonSetCondition describes the state of a DaemonSet at a certain point. 87message DaemonSetCondition { 88 // Type of DaemonSet condition. 89 optional string type = 1; 90 91 // Status of the condition, one of True, False, Unknown. 92 optional string status = 2; 93 94 // Last time the condition transitioned from one status to another. 95 // +optional 96 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; 97 98 // The reason for the condition's last transition. 99 // +optional 100 optional string reason = 4; 101 102 // A human readable message indicating details about the transition. 103 // +optional 104 optional string message = 5; 105} 106 107// DaemonSetList is a collection of daemon sets. 108message DaemonSetList { 109 // Standard list metadata. 110 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata 111 // +optional 112 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 113 114 // A list of daemon sets. 115 repeated DaemonSet items = 2; 116} 117 118// DaemonSetSpec is the specification of a daemon set. 119message DaemonSetSpec { 120 // A label query over pods that are managed by the daemon set. 121 // Must match in order to be controlled. 122 // It must match the pod template's labels. 123 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors 124 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; 125 126 // An object that describes the pod that will be created. 127 // The DaemonSet will create exactly one copy of this pod on every node 128 // that matches the template's node selector (or on every node if no node 129 // selector is specified). 130 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template 131 optional k8s.io.api.core.v1.PodTemplateSpec template = 2; 132 133 // An update strategy to replace existing DaemonSet pods with new pods. 134 // +optional 135 optional DaemonSetUpdateStrategy updateStrategy = 3; 136 137 // The minimum number of seconds for which a newly created DaemonSet pod should 138 // be ready without any of its container crashing, for it to be considered 139 // available. Defaults to 0 (pod will be considered available as soon as it 140 // is ready). 141 // +optional 142 optional int32 minReadySeconds = 4; 143 144 // The number of old history to retain to allow rollback. 145 // This is a pointer to distinguish between explicit zero and not specified. 146 // Defaults to 10. 147 // +optional 148 optional int32 revisionHistoryLimit = 6; 149} 150 151// DaemonSetStatus represents the current status of a daemon set. 152message DaemonSetStatus { 153 // The number of nodes that are running at least 1 154 // daemon pod and are supposed to run the daemon pod. 155 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ 156 optional int32 currentNumberScheduled = 1; 157 158 // The number of nodes that are running the daemon pod, but are 159 // not supposed to run the daemon pod. 160 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ 161 optional int32 numberMisscheduled = 2; 162 163 // The total number of nodes that should be running the daemon 164 // pod (including nodes correctly running the daemon pod). 165 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ 166 optional int32 desiredNumberScheduled = 3; 167 168 // The number of nodes that should be running the daemon pod and have one 169 // or more of the daemon pod running and ready. 170 optional int32 numberReady = 4; 171 172 // The most recent generation observed by the daemon set controller. 173 // +optional 174 optional int64 observedGeneration = 5; 175 176 // The total number of nodes that are running updated daemon pod 177 // +optional 178 optional int32 updatedNumberScheduled = 6; 179 180 // The number of nodes that should be running the 181 // daemon pod and have one or more of the daemon pod running and 182 // available (ready for at least spec.minReadySeconds) 183 // +optional 184 optional int32 numberAvailable = 7; 185 186 // The number of nodes that should be running the 187 // daemon pod and have none of the daemon pod running and available 188 // (ready for at least spec.minReadySeconds) 189 // +optional 190 optional int32 numberUnavailable = 8; 191 192 // Count of hash collisions for the DaemonSet. The DaemonSet controller 193 // uses this field as a collision avoidance mechanism when it needs to 194 // create the name for the newest ControllerRevision. 195 // +optional 196 optional int32 collisionCount = 9; 197 198 // Represents the latest available observations of a DaemonSet's current state. 199 // +optional 200 // +patchMergeKey=type 201 // +patchStrategy=merge 202 repeated DaemonSetCondition conditions = 10; 203} 204 205// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. 206message DaemonSetUpdateStrategy { 207 // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. 208 // +optional 209 optional string type = 1; 210 211 // Rolling update config params. Present only if type = "RollingUpdate". 212 // --- 213 // TODO: Update this to follow our convention for oneOf, whatever we decide it 214 // to be. Same as Deployment `strategy.rollingUpdate`. 215 // See https://github.com/kubernetes/kubernetes/issues/35345 216 // +optional 217 optional RollingUpdateDaemonSet rollingUpdate = 2; 218} 219 220// Deployment enables declarative updates for Pods and ReplicaSets. 221message Deployment { 222 // Standard object metadata. 223 // +optional 224 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 225 226 // Specification of the desired behavior of the Deployment. 227 // +optional 228 optional DeploymentSpec spec = 2; 229 230 // Most recently observed status of the Deployment. 231 // +optional 232 optional DeploymentStatus status = 3; 233} 234 235// DeploymentCondition describes the state of a deployment at a certain point. 236message DeploymentCondition { 237 // Type of deployment condition. 238 optional string type = 1; 239 240 // Status of the condition, one of True, False, Unknown. 241 optional string status = 2; 242 243 // The last time this condition was updated. 244 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; 245 246 // Last time the condition transitioned from one status to another. 247 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7; 248 249 // The reason for the condition's last transition. 250 optional string reason = 4; 251 252 // A human readable message indicating details about the transition. 253 optional string message = 5; 254} 255 256// DeploymentList is a list of Deployments. 257message DeploymentList { 258 // Standard list metadata. 259 // +optional 260 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 261 262 // Items is the list of Deployments. 263 repeated Deployment items = 2; 264} 265 266// DeploymentSpec is the specification of the desired behavior of the Deployment. 267message DeploymentSpec { 268 // Number of desired pods. This is a pointer to distinguish between explicit 269 // zero and not specified. Defaults to 1. 270 // +optional 271 optional int32 replicas = 1; 272 273 // Label selector for pods. Existing ReplicaSets whose pods are 274 // selected by this will be the ones affected by this deployment. 275 // It must match the pod template's labels. 276 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; 277 278 // Template describes the pods that will be created. 279 optional k8s.io.api.core.v1.PodTemplateSpec template = 3; 280 281 // The deployment strategy to use to replace existing pods with new ones. 282 // +optional 283 // +patchStrategy=retainKeys 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 702