...

Text file src/k8s.io/api/apps/v1beta2/generated.proto

Documentation: k8s.io/api/apps/v1beta2

     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.v1beta2;
    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 = "k8s.io/api/apps/v1beta2";
    32
    33// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the
    34// release notes for more information.
    35// ControllerRevision implements an immutable snapshot of state data. Clients
    36// are responsible for serializing and deserializing the objects that contain
    37// their internal state.
    38// Once a ControllerRevision has been successfully created, it can not be updated.
    39// The API Server will fail validation of all requests that attempt to mutate
    40// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
    41// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
    42// it may be subject to name and representation changes in future releases, and clients should not
    43// depend on its stability. It is primarily for internal use by controllers.
    44message ControllerRevision {
    45  // Standard object's metadata.
    46  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    47  // +optional
    48  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
    49
    50  // Data is the serialized representation of the state.
    51  optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2;
    52
    53  // Revision indicates the revision of the state represented by Data.
    54  optional int64 revision = 3;
    55}
    56
    57// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
    58message ControllerRevisionList {
    59  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    60  // +optional
    61  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
    62
    63  // Items is the list of ControllerRevisions
    64  repeated ControllerRevision items = 2;
    65}
    66
    67// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for
    68// more information.
    69// DaemonSet represents the configuration of a daemon set.
    70message DaemonSet {
    71  // Standard object's metadata.
    72  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    73  // +optional
    74  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
    75
    76  // The desired behavior of this daemon set.
    77  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    78  // +optional
    79  optional DaemonSetSpec spec = 2;
    80
    81  // The current status of this daemon set. This data may be
    82  // out of date by some window of time.
    83  // Populated by the system.
    84  // Read-only.
    85  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    86  // +optional
    87  optional DaemonSetStatus status = 3;
    88}
    89
    90// DaemonSetCondition describes the state of a DaemonSet at a certain point.
    91message DaemonSetCondition {
    92  // Type of DaemonSet condition.
    93  optional string type = 1;
    94
    95  // Status of the condition, one of True, False, Unknown.
    96  optional string status = 2;
    97
    98  // Last time the condition transitioned from one status to another.
    99  // +optional
   100  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
   101
   102  // The reason for the condition's last transition.
   103  // +optional
   104  optional string reason = 4;
   105
   106  // A human readable message indicating details about the transition.
   107  // +optional
   108  optional string message = 5;
   109}
   110
   111// DaemonSetList is a collection of daemon sets.
   112message DaemonSetList {
   113  // Standard list metadata.
   114  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   115  // +optional
   116  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   117
   118  // A list of daemon sets.
   119  repeated DaemonSet items = 2;
   120}
   121
   122// DaemonSetSpec is the specification of a daemon set.
   123message DaemonSetSpec {
   124  // A label query over pods that are managed by the daemon set.
   125  // Must match in order to be controlled.
   126  // It must match the pod template's labels.
   127  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
   128  optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
   129
   130  // An object that describes the pod that will be created.
   131  // The DaemonSet will create exactly one copy of this pod on every node
   132  // that matches the template's node selector (or on every node if no node
   133  // selector is specified).
   134  // The only allowed template.spec.restartPolicy value is "Always".
   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  // Total number of nodes that should be running the daemon pod and have one
   174  // or more of the daemon pod running with a Ready Condition by passing the readinessProbe.
   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  // +listType=map
   208  // +listMapKey=type
   209  repeated DaemonSetCondition conditions = 10;
   210}
   211
   212// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
   213message DaemonSetUpdateStrategy {
   214  // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
   215  // +optional
   216  optional string type = 1;
   217
   218  // Rolling update config params. Present only if type = "RollingUpdate".
   219  // ---
   220  // TODO: Update this to follow our convention for oneOf, whatever we decide it
   221  // to be. Same as Deployment `strategy.rollingUpdate`.
   222  // See https://github.com/kubernetes/kubernetes/issues/35345
   223  // +optional
   224  optional RollingUpdateDaemonSet rollingUpdate = 2;
   225}
   226
   227// DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for
   228// more information.
   229// Deployment enables declarative updates for Pods and ReplicaSets.
   230message Deployment {
   231  // Standard object metadata.
   232  // +optional
   233  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   234
   235  // Specification of the desired behavior of the Deployment.
   236  // +optional
   237  optional DeploymentSpec spec = 2;
   238
   239  // Most recently observed status of the Deployment.
   240  // +optional
   241  optional DeploymentStatus status = 3;
   242}
   243
   244// DeploymentCondition describes the state of a deployment at a certain point.
   245message DeploymentCondition {
   246  // Type of deployment condition.
   247  optional string type = 1;
   248
   249  // Status of the condition, one of True, False, Unknown.
   250  optional string status = 2;
   251
   252  // The last time this condition was updated.
   253  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
   254
   255  // Last time the condition transitioned from one status to another.
   256  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
   257
   258  // The reason for the condition's last transition.
   259  optional string reason = 4;
   260
   261  // A human readable message indicating details about the transition.
   262  optional string message = 5;
   263}
   264
   265// DeploymentList is a list of Deployments.
   266message DeploymentList {
   267  // Standard list metadata.
   268  // +optional
   269  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   270
   271  // Items is the list of Deployments.
   272  repeated Deployment items = 2;
   273}
   274
   275// DeploymentSpec is the specification of the desired behavior of the Deployment.
   276message DeploymentSpec {
   277  // Number of desired pods. This is a pointer to distinguish between explicit
   278  // zero and not specified. Defaults to 1.
   279  // +optional
   280  optional int32 replicas = 1;
   281
   282  // Label selector for pods. Existing ReplicaSets whose pods are
   283  // selected by this will be the ones affected by this deployment.
   284  // It must match the pod template's labels.
   285  optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
   286
   287  // Template describes the pods that will be created.
   288  // The only allowed template.spec.restartPolicy value is "Always".
   289  optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
   290
   291  // The deployment strategy to use to replace existing pods with new ones.
   292  // +optional
   293  // +patchStrategy=retainKeys
   294  optional DeploymentStrategy strategy = 4;
   295
   296  // Minimum number of seconds for which a newly created pod should be ready
   297  // without any of its container crashing, for it to be considered available.
   298  // Defaults to 0 (pod will be considered available as soon as it is ready)
   299  // +optional
   300  optional int32 minReadySeconds = 5;
   301
   302  // The number of old ReplicaSets to retain to allow rollback.
   303  // This is a pointer to distinguish between explicit zero and not specified.
   304  // Defaults to 10.
   305  // +optional
   306  optional int32 revisionHistoryLimit = 6;
   307
   308  // Indicates that the deployment is paused.
   309  // +optional
   310  optional bool paused = 7;
   311
   312  // The maximum time in seconds for a deployment to make progress before it
   313  // is considered to be failed. The deployment controller will continue to
   314  // process failed deployments and a condition with a ProgressDeadlineExceeded
   315  // reason will be surfaced in the deployment status. Note that progress will
   316  // not be estimated during the time a deployment is paused. Defaults to 600s.
   317  optional int32 progressDeadlineSeconds = 9;
   318}
   319
   320// DeploymentStatus is the most recently observed status of the Deployment.
   321message DeploymentStatus {
   322  // The generation observed by the deployment controller.
   323  // +optional
   324  optional int64 observedGeneration = 1;
   325
   326  // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
   327  // +optional
   328  optional int32 replicas = 2;
   329
   330  // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
   331  // +optional
   332  optional int32 updatedReplicas = 3;
   333
   334  // readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.
   335  // +optional
   336  optional int32 readyReplicas = 7;
   337
   338  // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
   339  // +optional
   340  optional int32 availableReplicas = 4;
   341
   342  // Total number of unavailable pods targeted by this deployment. This is the total number of
   343  // pods that are still required for the deployment to have 100% available capacity. They may
   344  // either be pods that are running but not yet available or pods that still have not been created.
   345  // +optional
   346  optional int32 unavailableReplicas = 5;
   347
   348  // Represents the latest available observations of a deployment's current state.
   349  // +patchMergeKey=type
   350  // +patchStrategy=merge
   351  // +listType=map
   352  // +listMapKey=type
   353  repeated DeploymentCondition conditions = 6;
   354
   355  // Count of hash collisions for the Deployment. The Deployment controller uses this
   356  // field as a collision avoidance mechanism when it needs to create the name for the
   357  // newest ReplicaSet.
   358  // +optional
   359  optional int32 collisionCount = 8;
   360}
   361
   362// DeploymentStrategy describes how to replace existing pods with new ones.
   363message DeploymentStrategy {
   364  // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
   365  // +optional
   366  optional string type = 1;
   367
   368  // Rolling update config params. Present only if DeploymentStrategyType =
   369  // RollingUpdate.
   370  // ---
   371  // TODO: Update this to follow our convention for oneOf, whatever we decide it
   372  // to be.
   373  // +optional
   374  optional RollingUpdateDeployment rollingUpdate = 2;
   375}
   376
   377// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for
   378// more information.
   379// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
   380message ReplicaSet {
   381  // If the Labels of a ReplicaSet are empty, they are defaulted to
   382  // be the same as the Pod(s) that the ReplicaSet manages.
   383  // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   384  // +optional
   385  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   386
   387  // Spec defines the specification of the desired behavior of the ReplicaSet.
   388  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   389  // +optional
   390  optional ReplicaSetSpec spec = 2;
   391
   392  // Status is the most recently observed status of the ReplicaSet.
   393  // This data may be out of date by some window of time.
   394  // Populated by the system.
   395  // Read-only.
   396  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   397  // +optional
   398  optional ReplicaSetStatus status = 3;
   399}
   400
   401// ReplicaSetCondition describes the state of a replica set at a certain point.
   402message ReplicaSetCondition {
   403  // Type of replica set condition.
   404  optional string type = 1;
   405
   406  // Status of the condition, one of True, False, Unknown.
   407  optional string status = 2;
   408
   409  // The last time the condition transitioned from one status to another.
   410  // +optional
   411  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
   412
   413  // The reason for the condition's last transition.
   414  // +optional
   415  optional string reason = 4;
   416
   417  // A human readable message indicating details about the transition.
   418  // +optional
   419  optional string message = 5;
   420}
   421
   422// ReplicaSetList is a collection of ReplicaSets.
   423message ReplicaSetList {
   424  // Standard list metadata.
   425  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
   426  // +optional
   427  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   428
   429  // List of ReplicaSets.
   430  // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
   431  repeated ReplicaSet items = 2;
   432}
   433
   434// ReplicaSetSpec is the specification of a ReplicaSet.
   435message ReplicaSetSpec {
   436  // Replicas is the number of desired replicas.
   437  // This is a pointer to distinguish between explicit zero and unspecified.
   438  // Defaults to 1.
   439  // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
   440  // +optional
   441  optional int32 replicas = 1;
   442
   443  // Minimum number of seconds for which a newly created pod should be ready
   444  // without any of its container crashing, for it to be considered available.
   445  // Defaults to 0 (pod will be considered available as soon as it is ready)
   446  // +optional
   447  optional int32 minReadySeconds = 4;
   448
   449  // Selector is a label query over pods that should match the replica count.
   450  // Label keys and values that must match in order to be controlled by this replica set.
   451  // It must match the pod template's labels.
   452  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
   453  optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
   454
   455  // Template is the object that describes the pod that will be created if
   456  // insufficient replicas are detected.
   457  // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
   458  // +optional
   459  optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
   460}
   461
   462// ReplicaSetStatus represents the current status of a ReplicaSet.
   463message ReplicaSetStatus {
   464  // Replicas is the most recently observed number of replicas.
   465  // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
   466  optional int32 replicas = 1;
   467
   468  // The number of pods that have labels matching the labels of the pod template of the replicaset.
   469  // +optional
   470  optional int32 fullyLabeledReplicas = 2;
   471
   472  // readyReplicas is the number of pods targeted by this ReplicaSet controller with a Ready Condition.
   473  // +optional
   474  optional int32 readyReplicas = 4;
   475
   476  // The number of available replicas (ready for at least minReadySeconds) for this replica set.
   477  // +optional
   478  optional int32 availableReplicas = 5;
   479
   480  // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
   481  // +optional
   482  optional int64 observedGeneration = 3;
   483
   484  // Represents the latest available observations of a replica set's current state.
   485  // +optional
   486  // +patchMergeKey=type
   487  // +patchStrategy=merge
   488  // +listType=map
   489  // +listMapKey=type
   490  repeated ReplicaSetCondition conditions = 6;
   491}
   492
   493// Spec to control the desired behavior of daemon set rolling update.
   494message RollingUpdateDaemonSet {
   495  // The maximum number of DaemonSet pods that can be unavailable during the
   496  // update. Value can be an absolute number (ex: 5) or a percentage of total
   497  // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
   498  // number is calculated from percentage by rounding up.
   499  // This cannot be 0 if MaxSurge is 0
   500  // Default value is 1.
   501  // Example: when this is set to 30%, at most 30% of the total number of nodes
   502  // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
   503  // can have their pods stopped for an update at any given time. The update
   504  // starts by stopping at most 30% of those DaemonSet pods and then brings
   505  // up new DaemonSet pods in their place. Once the new pods are available,
   506  // it then proceeds onto other DaemonSet pods, thus ensuring that at least
   507  // 70% of original number of DaemonSet pods are available at all times during
   508  // the update.
   509  // +optional
   510  optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
   511
   512  // The maximum number of nodes with an existing available DaemonSet pod that
   513  // can have an updated DaemonSet pod during during an update.
   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 to a minimum of 1.
   517  // Default value is 0.
   518  // Example: when this is set to 30%, at most 30% of the total number of nodes
   519  // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
   520  // can have their a new pod created before the old pod is marked as deleted.
   521  // The update starts by launching new pods on 30% of nodes. Once an updated
   522  // pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
   523  // on that node is marked deleted. If the old pod becomes unavailable for any
   524  // reason (Ready transitions to false, is evicted, or is drained) an updated
   525  // pod is immediatedly created on that node without considering surge limits.
   526  // Allowing surge implies the possibility that the resources consumed by the
   527  // daemonset on any given node can double if the readiness check fails, and
   528  // so resource intensive daemonsets should take into account that they may
   529  // cause evictions during disruption.
   530  // +optional
   531  optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
   532}
   533
   534// Spec to control the desired behavior of rolling update.
   535message RollingUpdateDeployment {
   536  // The maximum number of pods that can be unavailable during the update.
   537  // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
   538  // Absolute number is calculated from percentage by rounding down.
   539  // This can not be 0 if MaxSurge is 0.
   540  // Defaults to 25%.
   541  // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
   542  // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
   543  // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
   544  // that the total number of pods available at all times during the update is at
   545  // least 70% of desired pods.
   546  // +optional
   547  optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
   548
   549  // The maximum number of pods that can be scheduled above the desired number of
   550  // pods.
   551  // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
   552  // This can not be 0 if MaxUnavailable is 0.
   553  // Absolute number is calculated from percentage by rounding up.
   554  // Defaults to 25%.
   555  // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
   556  // the rolling update starts, such that the total number of old and new pods do not exceed
   557  // 130% of desired pods. Once old pods have been killed,
   558  // new ReplicaSet can be scaled up further, ensuring that total number of pods running
   559  // at any time during the update is at most 130% of desired pods.
   560  // +optional
   561  optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
   562}
   563
   564// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
   565message RollingUpdateStatefulSetStrategy {
   566  // Partition indicates the ordinal at which the StatefulSet should be partitioned
   567  // for updates. During a rolling update, all pods from ordinal Replicas-1 to
   568  // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched.
   569  // This is helpful in being able to do a canary based deployment. The default value is 0.
   570  // +optional
   571  optional int32 partition = 1;
   572
   573  // The maximum number of pods that can be unavailable during the update.
   574  // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
   575  // Absolute number is calculated from percentage by rounding up. This can not be 0.
   576  // Defaults to 1. This field is alpha-level and is only honored by servers that enable the
   577  // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
   578  // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
   579  // will be counted towards MaxUnavailable.
   580  // +optional
   581  optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 2;
   582}
   583
   584// Scale represents a scaling request for a resource.
   585message Scale {
   586  // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
   587  // +optional
   588  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   589
   590  // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
   591  // +optional
   592  optional ScaleSpec spec = 2;
   593
   594  // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
   595  // +optional
   596  optional ScaleStatus status = 3;
   597}
   598
   599// ScaleSpec describes the attributes of a scale subresource
   600message ScaleSpec {
   601  // desired number of instances for the scaled object.
   602  // +optional
   603  optional int32 replicas = 1;
   604}
   605
   606// ScaleStatus represents the current status of a scale subresource.
   607message ScaleStatus {
   608  // actual number of observed instances of the scaled object.
   609  optional int32 replicas = 1;
   610
   611  // selector is a label query over pods that should match the replicas count. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
   612  // +optional
   613  // +mapType=atomic
   614  map<string, string> selector = 2;
   615
   616  // label selector for pods that should match the replicas count. This is a serializated
   617  // version of both map-based and more expressive set-based selectors. This is done to
   618  // avoid introspection in the clients. The string will be in the same format as the
   619  // query-param syntax. If the target type only supports map-based selectors, both this
   620  // field and map-based selector field are populated.
   621  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
   622  // +optional
   623  optional string targetSelector = 3;
   624}
   625
   626// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for
   627// more information.
   628// StatefulSet represents a set of pods with consistent identities.
   629// Identities are defined as:
   630//   - Network: A single stable DNS and hostname.
   631//   - Storage: As many VolumeClaims as requested.
   632//
   633// The StatefulSet guarantees that a given network identity will always
   634// map to the same storage identity.
   635message StatefulSet {
   636  // +optional
   637  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   638
   639  // Spec defines the desired identities of pods in this set.
   640  // +optional
   641  optional StatefulSetSpec spec = 2;
   642
   643  // Status is the current status of Pods in this StatefulSet. This data
   644  // may be out of date by some window of time.
   645  // +optional
   646  optional StatefulSetStatus status = 3;
   647}
   648
   649// StatefulSetCondition describes the state of a statefulset at a certain point.
   650message StatefulSetCondition {
   651  // Type of statefulset condition.
   652  optional string type = 1;
   653
   654  // Status of the condition, one of True, False, Unknown.
   655  optional string status = 2;
   656
   657  // Last time the condition transitioned from one status to another.
   658  // +optional
   659  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
   660
   661  // The reason for the condition's last transition.
   662  // +optional
   663  optional string reason = 4;
   664
   665  // A human readable message indicating details about the transition.
   666  // +optional
   667  optional string message = 5;
   668}
   669
   670// StatefulSetList is a collection of StatefulSets.
   671message StatefulSetList {
   672  // +optional
   673  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   674
   675  repeated StatefulSet items = 2;
   676}
   677
   678// StatefulSetOrdinals describes the policy used for replica ordinal assignment
   679// in this StatefulSet.
   680message StatefulSetOrdinals {
   681  // start is the number representing the first replica's index. It may be used
   682  // to number replicas from an alternate index (eg: 1-indexed) over the default
   683  // 0-indexed names, or to orchestrate progressive movement of replicas from
   684  // one StatefulSet to another.
   685  // If set, replica indices will be in the range:
   686  //   [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas).
   687  // If unset, defaults to 0. Replica indices will be in the range:
   688  //   [0, .spec.replicas).
   689  // +optional
   690  optional int32 start = 1;
   691}
   692
   693// StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs
   694// created from the StatefulSet VolumeClaimTemplates.
   695message StatefulSetPersistentVolumeClaimRetentionPolicy {
   696  // WhenDeleted specifies what happens to PVCs created from StatefulSet
   697  // VolumeClaimTemplates when the StatefulSet is deleted. The default policy
   698  // of `Retain` causes PVCs to not be affected by StatefulSet deletion. The
   699  // `Delete` policy causes those PVCs to be deleted.
   700  optional string whenDeleted = 1;
   701
   702  // WhenScaled specifies what happens to PVCs created from StatefulSet
   703  // VolumeClaimTemplates when the StatefulSet is scaled down. The default
   704  // policy of `Retain` causes PVCs to not be affected by a scaledown. The
   705  // `Delete` policy causes the associated PVCs for any excess pods above
   706  // the replica count to be deleted.
   707  optional string whenScaled = 2;
   708}
   709
   710// A StatefulSetSpec is the specification of a StatefulSet.
   711message StatefulSetSpec {
   712  // replicas is the desired number of replicas of the given Template.
   713  // These are replicas in the sense that they are instantiations of the
   714  // same Template, but individual replicas also have a consistent identity.
   715  // If unspecified, defaults to 1.
   716  // TODO: Consider a rename of this field.
   717  // +optional
   718  optional int32 replicas = 1;
   719
   720  // selector is a label query over pods that should match the replica count.
   721  // It must match the pod template's labels.
   722  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
   723  optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
   724
   725  // template is the object that describes the pod that will be created if
   726  // insufficient replicas are detected. Each pod stamped out by the StatefulSet
   727  // will fulfill this Template, but have a unique identity from the rest
   728  // of the StatefulSet. Each pod will be named with the format
   729  // <statefulsetname>-<podindex>. For example, a pod in a StatefulSet named
   730  // "web" with index number "3" would be named "web-3".
   731  // The only allowed template.spec.restartPolicy value is "Always".
   732  optional k8s.io.api.core.v1.PodTemplateSpec template = 3;
   733
   734  // volumeClaimTemplates is a list of claims that pods are allowed to reference.
   735  // The StatefulSet controller is responsible for mapping network identities to
   736  // claims in a way that maintains the identity of a pod. Every claim in
   737  // this list must have at least one matching (by name) volumeMount in one
   738  // container in the template. A claim in this list takes precedence over
   739  // any volumes in the template, with the same name.
   740  // TODO: Define the behavior if a claim already exists with the same name.
   741  // +optional
   742  // +listType=atomic
   743  repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
   744
   745  // serviceName is the name of the service that governs this StatefulSet.
   746  // This service must exist before the StatefulSet, and is responsible for
   747  // the network identity of the set. Pods get DNS/hostnames that follow the
   748  // pattern: pod-specific-string.serviceName.default.svc.cluster.local
   749  // where "pod-specific-string" is managed by the StatefulSet controller.
   750  optional string serviceName = 5;
   751
   752  // podManagementPolicy controls how pods are created during initial scale up,
   753  // when replacing pods on nodes, or when scaling down. The default policy is
   754  // `OrderedReady`, where pods are created in increasing order (pod-0, then
   755  // pod-1, etc) and the controller will wait until each pod is ready before
   756  // continuing. When scaling down, the pods are removed in the opposite order.
   757  // The alternative policy is `Parallel` which will create pods in parallel
   758  // to match the desired scale without waiting, and on scale down will delete
   759  // all pods at once.
   760  // +optional
   761  optional string podManagementPolicy = 6;
   762
   763  // updateStrategy indicates the StatefulSetUpdateStrategy that will be
   764  // employed to update Pods in the StatefulSet when a revision is made to
   765  // Template.
   766  optional StatefulSetUpdateStrategy updateStrategy = 7;
   767
   768  // revisionHistoryLimit is the maximum number of revisions that will
   769  // be maintained in the StatefulSet's revision history. The revision history
   770  // consists of all revisions not represented by a currently applied
   771  // StatefulSetSpec version. The default value is 10.
   772  optional int32 revisionHistoryLimit = 8;
   773
   774  // Minimum number of seconds for which a newly created pod should be ready
   775  // without any of its container crashing for it to be considered available.
   776  // Defaults to 0 (pod will be considered available as soon as it is ready)
   777  // +optional
   778  optional int32 minReadySeconds = 9;
   779
   780  // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from
   781  // the StatefulSet VolumeClaimTemplates. This requires the
   782  // StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.
   783  // +optional
   784  optional StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy = 10;
   785
   786  // ordinals controls the numbering of replica indices in a StatefulSet. The
   787  // default ordinals behavior assigns a "0" index to the first replica and
   788  // increments the index by one for each additional replica requested. Using
   789  // the ordinals field requires the StatefulSetStartOrdinal feature gate to be
   790  // enabled, which is beta.
   791  // +optional
   792  optional StatefulSetOrdinals ordinals = 11;
   793}
   794
   795// StatefulSetStatus represents the current state of a StatefulSet.
   796message StatefulSetStatus {
   797  // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
   798  // StatefulSet's generation, which is updated on mutation by the API Server.
   799  // +optional
   800  optional int64 observedGeneration = 1;
   801
   802  // replicas is the number of Pods created by the StatefulSet controller.
   803  optional int32 replicas = 2;
   804
   805  // readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition.
   806  optional int32 readyReplicas = 3;
   807
   808  // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
   809  // indicated by currentRevision.
   810  optional int32 currentReplicas = 4;
   811
   812  // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
   813  // indicated by updateRevision.
   814  optional int32 updatedReplicas = 5;
   815
   816  // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
   817  // sequence [0,currentReplicas).
   818  optional string currentRevision = 6;
   819
   820  // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
   821  // [replicas-updatedReplicas,replicas)
   822  optional string updateRevision = 7;
   823
   824  // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
   825  // uses this field as a collision avoidance mechanism when it needs to create the name for the
   826  // newest ControllerRevision.
   827  // +optional
   828  optional int32 collisionCount = 9;
   829
   830  // Represents the latest available observations of a statefulset's current state.
   831  // +optional
   832  // +patchMergeKey=type
   833  // +patchStrategy=merge
   834  // +listType=map
   835  // +listMapKey=type
   836  repeated StatefulSetCondition conditions = 10;
   837
   838  // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
   839  // +optional
   840  optional int32 availableReplicas = 11;
   841}
   842
   843// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
   844// controller will use to perform updates. It includes any additional parameters
   845// necessary to perform the update for the indicated strategy.
   846message StatefulSetUpdateStrategy {
   847  // Type indicates the type of the StatefulSetUpdateStrategy.
   848  // Default is RollingUpdate.
   849  // +optional
   850  optional string type = 1;
   851
   852  // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
   853  // +optional
   854  optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;
   855}
   856

View as plain text