Support burst in stateful set scale up and down

The alpha field podManagementPolicy defines how pods are created,
deleted, and replaced. The new `Parallel` policy will replace pods
as fast as possible, not waiting for the pod to be `Ready` or providing
an order. This allows for advanced clustered software to take advantage
of rapid changes in scale.
This commit is contained in:
Clayton Coleman 2017-04-25 00:39:32 -04:00
parent 95ce463e95
commit 2861ae5eb9
No known key found for this signature in database
GPG Key ID: 3D16906B4F1C5CB3
30 changed files with 889 additions and 416 deletions

View File

@ -47442,25 +47442,29 @@
"serviceName" "serviceName"
], ],
"properties": { "properties": {
"podManagementPolicy": {
"description": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
"type": "string"
},
"replicas": { "replicas": {
"description": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", "description": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
"type": "integer", "type": "integer",
"format": "int32" "format": "int32"
}, },
"selector": { "selector": {
"description": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", "description": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
}, },
"serviceName": { "serviceName": {
"description": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", "description": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
"type": "string" "type": "string"
}, },
"template": { "template": {
"description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", "description": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.PodTemplateSpec" "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.PodTemplateSpec"
}, },
"volumeClaimTemplates": { "volumeClaimTemplates": {
"description": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", "description": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaim" "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaim"
@ -47475,12 +47479,12 @@
], ],
"properties": { "properties": {
"observedGeneration": { "observedGeneration": {
"description": "most recent generation observed by this StatefulSet.", "description": "observedGeneration is the most recent generation observed by this StatefulSet.",
"type": "integer", "type": "integer",
"format": "int64" "format": "int64"
}, },
"replicas": { "replicas": {
"description": "Replicas is the number of actual replicas.", "description": "replicas is the number of actual replicas.",
"type": "integer", "type": "integer",
"format": "int32" "format": "int32"
} }

View File

@ -4955,26 +4955,30 @@
"replicas": { "replicas": {
"type": "integer", "type": "integer",
"format": "int32", "format": "int32",
"description": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1." "description": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1."
}, },
"selector": { "selector": {
"$ref": "v1.LabelSelector", "$ref": "v1.LabelSelector",
"description": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" "description": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors"
}, },
"template": { "template": {
"$ref": "v1.PodTemplateSpec", "$ref": "v1.PodTemplateSpec",
"description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet." "description": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet."
}, },
"volumeClaimTemplates": { "volumeClaimTemplates": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "v1.PersistentVolumeClaim" "$ref": "v1.PersistentVolumeClaim"
}, },
"description": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name." "description": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name."
}, },
"serviceName": { "serviceName": {
"type": "string", "type": "string",
"description": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller." "description": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller."
},
"podManagementPolicy": {
"type": "string",
"description": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once."
} }
} }
}, },
@ -5068,12 +5072,12 @@
"observedGeneration": { "observedGeneration": {
"type": "integer", "type": "integer",
"format": "int64", "format": "int64",
"description": "most recent generation observed by this StatefulSet." "description": "observedGeneration is the most recent generation observed by this StatefulSet."
}, },
"replicas": { "replicas": {
"type": "integer", "type": "integer",
"format": "int32", "format": "int32",
"description": "Replicas is the number of actual replicas." "description": "replicas is the number of actual replicas."
} }
} }
}, },

View File

@ -1511,39 +1511,46 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<tbody> <tbody>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">replicas</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">replicas</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">selector</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">selector</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_labelselector">v1.LabelSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">template</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">template</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_podtemplatespec">v1.PodTemplateSpec</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_podtemplatespec">v1.PodTemplateSpec</a></p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeClaimTemplates</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">volumeClaimTemplates</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_persistentvolumeclaim">v1.PersistentVolumeClaim</a> array</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_persistentvolumeclaim">v1.PersistentVolumeClaim</a> array</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">serviceName</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">serviceName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">podManagementPolicy</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is <code>OrderedReady</code>, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is <code>Parallel</code> which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
@ -4914,14 +4921,14 @@ Examples:<br>
<tbody> <tbody>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">observedGeneration</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">observedGeneration</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">most recent generation observed by this StatefulSet.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">observedGeneration is the most recent generation observed by this StatefulSet.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int64)</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">integer (int64)</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">replicas</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">replicas</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Replicas is the number of actual replicas.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">replicas is the number of actual replicas.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
@ -6449,7 +6456,7 @@ Examples:<br>
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Last updated 2017-05-18 19:28:33 UTC Last updated 2017-05-19 16:32:56 UTC
</div> </div>
</div> </div>
</body> </body>

View File

@ -20,6 +20,7 @@ go_library(
"//pkg/api:go_default_library", "//pkg/api:go_default_library",
"//pkg/api/testapi:go_default_library", "//pkg/api/testapi:go_default_library",
"//pkg/api/v1:go_default_library", "//pkg/api/v1:go_default_library",
"//pkg/apis/apps:go_default_library",
"//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling:go_default_library",
"//pkg/apis/batch:go_default_library", "//pkg/apis/batch:go_default_library",
"//pkg/apis/certificates:go_default_library", "//pkg/apis/certificates:go_default_library",

View File

@ -36,6 +36,7 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/apis/apps"
"k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling"
"k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/batch"
"k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/certificates"
@ -707,6 +708,18 @@ func rbacFuncs(t apitesting.TestingCommon) []interface{} {
} }
} }
func appsFuncs(t apitesting.TestingCommon) []interface{} {
return []interface{}{
func(s *apps.StatefulSet, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
// match defaulter
if len(s.Spec.PodManagementPolicy) == 0 {
s.Spec.PodManagementPolicy = apps.OrderedReadyPodManagement
}
},
}
}
func policyFuncs(t apitesting.TestingCommon) []interface{} { func policyFuncs(t apitesting.TestingCommon) []interface{} {
return []interface{}{ return []interface{}{
func(s *policy.PodDisruptionBudgetStatus, c fuzz.Continue) { func(s *policy.PodDisruptionBudgetStatus, c fuzz.Continue) {
@ -731,6 +744,7 @@ func FuzzerFuncs(t apitesting.TestingCommon, codecs runtimeserializer.CodecFacto
overrideGenericFuncs(t, codecs), overrideGenericFuncs(t, codecs),
coreFuncs(t), coreFuncs(t),
extensionFuncs(t), extensionFuncs(t),
appsFuncs(t),
batchFuncs(t), batchFuncs(t),
autoscalingFuncs(t), autoscalingFuncs(t),
rbacFuncs(t), rbacFuncs(t),

View File

@ -44,6 +44,21 @@ type StatefulSet struct {
Status StatefulSetStatus Status StatefulSetStatus
} }
// PodManagementPolicyType defines the policy for creating pods under a stateful set.
type PodManagementPolicyType string
const (
// OrderedReadyPodManagement will create pods in strictly increasing order on
// scale up and strictly decreasing order on scale down, progressing only when
// the previous pod is ready or terminated. At most one pod will be changed
// at any time.
OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
// ParallelPodManagement will create and delete pods as soon as the stateful set
// replica count is changed, and will not wait for pods to be ready or complete
// termination.
ParallelPodManagement = "Parallel"
)
// A StatefulSetSpec is the specification of a StatefulSet. // A StatefulSetSpec is the specification of a StatefulSet.
type StatefulSetSpec struct { type StatefulSetSpec struct {
// Replicas is the desired number of replicas of the given Template. // Replicas is the desired number of replicas of the given Template.
@ -82,6 +97,17 @@ type StatefulSetSpec struct {
// pattern: pod-specific-string.serviceName.default.svc.cluster.local // pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller. // where "pod-specific-string" is managed by the StatefulSet controller.
ServiceName string ServiceName string
// PodManagementPolicy controls how pods are created during initial scale up,
// when replacing pods on nodes, or when scaling down. The default policy is
// `OrderedReady`, where pods are created in increasing order (pod-0, then
// pod-1, etc) and the controller will wait until each pod is ready before
// continuing. When scaling down, the pods are removed in the opposite order.
// The alternative policy is `Parallel` which will create pods in parallel
// to match the desired scale without waiting, and on scale down will delete
// all pods at once.
// +optional
PodManagementPolicy PodManagementPolicyType
} }
// StatefulSetStatus represents the current state of a StatefulSet. // StatefulSetStatus represents the current state of a StatefulSet.

View File

@ -110,6 +110,7 @@ func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec
out.VolumeClaimTemplates = nil out.VolumeClaimTemplates = nil
} }
out.ServiceName = in.ServiceName out.ServiceName = in.ServiceName
out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy)
return nil return nil
} }
@ -140,6 +141,7 @@ func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSe
out.VolumeClaimTemplates = nil out.VolumeClaimTemplates = nil
} }
out.ServiceName = in.ServiceName out.ServiceName = in.ServiceName
out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy)
return nil return nil
} }

View File

@ -27,6 +27,9 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
} }
func SetDefaults_StatefulSet(obj *StatefulSet) { func SetDefaults_StatefulSet(obj *StatefulSet) {
if len(obj.Spec.PodManagementPolicy) == 0 {
obj.Spec.PodManagementPolicy = OrderedReadyPodManagement
}
labels := obj.Spec.Template.Labels labels := obj.Spec.Template.Labels
if labels != nil { if labels != nil {
if obj.Spec.Selector == nil { if obj.Spec.Selector == nil {

View File

@ -788,6 +788,10 @@ func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) {
i++ i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName))) i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
i += copy(dAtA[i:], m.ServiceName) i += copy(dAtA[i:], m.ServiceName)
dAtA[i] = 0x32
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodManagementPolicy)))
i += copy(dAtA[i:], m.PodManagementPolicy)
return i, nil return i, nil
} }
@ -1068,6 +1072,8 @@ func (m *StatefulSetSpec) Size() (n int) {
} }
l = len(m.ServiceName) l = len(m.ServiceName)
n += 1 + l + sovGenerated(uint64(l)) n += 1 + l + sovGenerated(uint64(l))
l = len(m.PodManagementPolicy)
n += 1 + l + sovGenerated(uint64(l))
return n return n
} }
@ -1297,6 +1303,7 @@ func (this *StatefulSetSpec) String() string {
`Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
`VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`, `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
`ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
`PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -3635,6 +3642,35 @@ func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error {
} }
m.ServiceName = string(dAtA[iNdEx:postIndex]) m.ServiceName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PodManagementPolicy", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PodManagementPolicy = PodManagementPolicyType(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:]) skippy, err := skipGenerated(dAtA[iNdEx:])
@ -3855,101 +3891,103 @@ func init() {
} }
var fileDescriptorGenerated = []byte{ var fileDescriptorGenerated = []byte{
// 1525 bytes of a gzipped FileDescriptorProto // 1563 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x5b, 0xc5, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x1b, 0x37,
0x17, 0xce, 0x4d, 0xec, 0xc4, 0x99, 0x34, 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69, 0xff, 0x1b, 0x29, 0xe2, 0xd2, 0xc1, 0xfc, 0xf6, 0x30, 0xe4, 0x92, 0xa0, 0x56, 0x54, 0xf4, 0xe3, 0xfe, 0x37, 0x52, 0xc4, 0x95, 0x83,
0x14, 0x58, 0x8a, 0x8c, 0x6f, 0x3b, 0x76, 0x93, 0x72, 0xea, 0xd8, 0x70, 0x03, 0x64, 0x78, 0xd7, 0x31, 0x30, 0x17, 0x29, 0xdf, 0x73, 0xec, 0x16, 0xe5, 0xd4, 0xb1, 0xe1, 0x0a, 0xc8, 0xf1, 0xae,
0x25, 0x72, 0xcf, 0x66, 0x2b, 0xe7, 0x82, 0xe0, 0x6a, 0x5d, 0x97, 0xbc, 0xde, 0x5f, 0x5b, 0x19, 0x4b, 0xe4, 0x99, 0x4d, 0xd6, 0x2e, 0x04, 0xce, 0x6d, 0x76, 0x5d, 0xf2, 0x66, 0x7f, 0x69, 0x21,
0x00, 0x11, 0x53, 0x48, 0x82, 0xe0, 0xa3, 0x30, 0xee, 0x49, 0x09, 0xbf, 0x95, 0x74, 0xfe, 0x7a, 0x03, 0x22, 0x44, 0x48, 0x82, 0xe0, 0x93, 0xd0, 0xef, 0x51, 0x09, 0xbf, 0x9b, 0x34, 0xfe, 0x66,
0x7f, 0xed, 0x50, 0x49, 0xe8, 0x21, 0x67, 0x32, 0x58, 0x78, 0x16, 0x4c, 0x7b, 0x04, 0x33, 0xc7, 0x7f, 0xe9, 0xc8, 0x90, 0xd0, 0x43, 0xce, 0xa4, 0xb3, 0xf0, 0x3c, 0x18, 0xf7, 0x08, 0x66, 0x8e,
0x2e, 0x64, 0x24, 0x6f, 0xb8, 0x28, 0x24, 0x47, 0x91, 0x9a, 0x85, 0x17, 0xc0, 0x8c, 0x45, 0x18, 0x5d, 0xca, 0x49, 0xde, 0x70, 0x53, 0x48, 0xae, 0x22, 0x25, 0x85, 0x97, 0xc0, 0x84, 0x45, 0x18,
0xc3, 0x06, 0x29, 0x64, 0xa5, 0xe1, 0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xbd, 0x43, 0x16, 0x65, 0xe5, 0x6b, 0x0d, 0xcc, 0xa6, 0xb2, 0x03, 0x7e, 0x78,
0xaa, 0x38, 0xf1, 0x64, 0x46, 0x29, 0xf2, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xb9, 0xde, 0x44, 0xdf, 0x7a, 0xe6, 0x9f, 0xea, 0x59, 0x6b, 0x97, 0xf6, 0x0e, 0xca, 0x23, 0xaf, 0x0e, 0xca,
0x1a, 0x56, 0x15, 0x00, 0x00, 0x23, 0xbf, 0x1f, 0x94, 0x47, 0xbe, 0x3c, 0x2c, 0x6b, 0x7b, 0x87, 0x65, 0xed, 0xd5, 0x61, 0x59,
0xfb, 0xf3, 0xb0, 0xac, 0x7d, 0xfb, 0xba, 0x3c, 0xf2, 0x6c, 0x42, 0xc5, 0xfe, 0x5f, 0x01, 0x00,
0x00, 0xff, 0xff, 0xdf, 0x80, 0xf3, 0x34, 0xc0, 0x15, 0x00, 0x00,
} }

View File

@ -294,7 +294,7 @@ message StatefulSetList {
// A StatefulSetSpec is the specification of a StatefulSet. // A StatefulSetSpec is the specification of a StatefulSet.
message StatefulSetSpec { message StatefulSetSpec {
// Replicas is the desired number of replicas of the given Template. // replicas is the desired number of replicas of the given Template.
// These are replicas in the sense that they are instantiations of the // These are replicas in the sense that they are instantiations of the
// same Template, but individual replicas also have a consistent identity. // same Template, but individual replicas also have a consistent identity.
// If unspecified, defaults to 1. // If unspecified, defaults to 1.
@ -302,19 +302,19 @@ message StatefulSetSpec {
// +optional // +optional
optional int32 replicas = 1; optional int32 replicas = 1;
// Selector is a label query over pods that should match the replica count. // selector is a label query over pods that should match the replica count.
// If empty, defaulted to labels on the pod template. // If empty, defaulted to labels on the pod template.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
// Template is the object that describes the pod that will be created if // template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the StatefulSet // insufficient replicas are detected. Each pod stamped out by the StatefulSet
// will fulfill this Template, but have a unique identity from the rest // will fulfill this Template, but have a unique identity from the rest
// of the StatefulSet. // of the StatefulSet.
optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
// VolumeClaimTemplates is a list of claims that pods are allowed to reference. // volumeClaimTemplates is a list of claims that pods are allowed to reference.
// The StatefulSet controller is responsible for mapping network identities to // The StatefulSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pod. Every claim in // claims in a way that maintains the identity of a pod. Every claim in
// this list must have at least one matching (by name) volumeMount in one // this list must have at least one matching (by name) volumeMount in one
@ -324,21 +324,32 @@ message StatefulSetSpec {
// +optional // +optional
repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4; repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
// ServiceName is the name of the service that governs this StatefulSet. // serviceName is the name of the service that governs this StatefulSet.
// This service must exist before the StatefulSet, and is responsible for // This service must exist before the StatefulSet, and is responsible for
// the network identity of the set. Pods get DNS/hostnames that follow the // the network identity of the set. Pods get DNS/hostnames that follow the
// pattern: pod-specific-string.serviceName.default.svc.cluster.local // pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller. // where "pod-specific-string" is managed by the StatefulSet controller.
optional string serviceName = 5; optional string serviceName = 5;
// podManagementPolicy controls how pods are created during initial scale up,
// when replacing pods on nodes, or when scaling down. The default policy is
// `OrderedReady`, where pods are created in increasing order (pod-0, then
// pod-1, etc) and the controller will wait until each pod is ready before
// continuing. When scaling down, the pods are removed in the opposite order.
// The alternative policy is `Parallel` which will create pods in parallel
// to match the desired scale without waiting, and on scale down will delete
// all pods at once.
// +optional
optional string podManagementPolicy = 6;
} }
// StatefulSetStatus represents the current state of a StatefulSet. // StatefulSetStatus represents the current state of a StatefulSet.
message StatefulSetStatus { message StatefulSetStatus {
// most recent generation observed by this StatefulSet. // observedGeneration is the most recent generation observed by this StatefulSet.
// +optional // +optional
optional int64 observedGeneration = 1; optional int64 observedGeneration = 1;
// Replicas is the number of actual replicas. // replicas is the number of actual replicas.
optional int32 replicas = 2; optional int32 replicas = 2;
} }

View File

@ -1340,6 +1340,32 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
func (x PodManagementPolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
yym1 := z.EncBinary()
_ = yym1
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x))
}
}
func (x *PodManagementPolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym1 := z.DecBinary()
_ = yym1
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
*((*string)(x)) = r.DecodeString()
}
}
func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e) z, r := codec1978.GenHelperEncoder(e)
@ -1354,15 +1380,16 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
} else { } else {
yysep2 := !z.EncBinary() yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [5]bool var yyq2 [6]bool
_, _, _ = yysep2, yyq2, yy2arr2 _, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false const yyr2 bool = false
yyq2[0] = x.Replicas != nil yyq2[0] = x.Replicas != nil
yyq2[1] = x.Selector != nil yyq2[1] = x.Selector != nil
yyq2[3] = len(x.VolumeClaimTemplates) != 0 yyq2[3] = len(x.VolumeClaimTemplates) != 0
yyq2[5] = x.PodManagementPolicy != ""
var yynn2 int var yynn2 int
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
r.EncodeArrayStart(5) r.EncodeArrayStart(6)
} else { } else {
yynn2 = 2 yynn2 = 2
for _, b := range yyq2 { for _, b := range yyq2 {
@ -1506,6 +1533,21 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
} }
} }
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[5] {
x.PodManagementPolicy.CodecEncodeSelf(e)
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("podManagementPolicy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
x.PodManagementPolicy.CodecEncodeSelf(e)
}
}
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
@ -1631,6 +1673,13 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
*((*string)(yyv11)) = r.DecodeString() *((*string)(yyv11)) = r.DecodeString()
} }
} }
case "podManagementPolicy":
if r.TryDecodeAsNil() {
x.PodManagementPolicy = ""
} else {
yyv13 := &x.PodManagementPolicy
yyv13.CodecDecodeSelf(d)
}
default: default:
z.DecStructFieldNotFound(-1, yys3) z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3 } // end switch yys3
@ -1642,16 +1691,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj13 int var yyj14 int
var yyb13 bool var yyb14 bool
var yyhl13 bool = l >= 0 var yyhl14 bool = l >= 0
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1664,20 +1713,20 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if x.Replicas == nil { if x.Replicas == nil {
x.Replicas = new(int32) x.Replicas = new(int32)
} }
yym15 := z.DecBinary() yym16 := z.DecBinary()
_ = yym15 _ = yym16
if false { if false {
} else { } else {
*((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
} }
} }
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1690,21 +1739,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if x.Selector == nil { if x.Selector == nil {
x.Selector = new(pkg1_v1.LabelSelector) x.Selector = new(pkg1_v1.LabelSelector)
} }
yym17 := z.DecBinary() yym18 := z.DecBinary()
_ = yym17 _ = yym18
if false { if false {
} else if z.HasExtensions() && z.DecExt(x.Selector) { } else if z.HasExtensions() && z.DecExt(x.Selector) {
} else { } else {
z.DecFallback(x.Selector, false) z.DecFallback(x.Selector, false)
} }
} }
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1712,16 +1761,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Template = pkg3_v1.PodTemplateSpec{} x.Template = pkg3_v1.PodTemplateSpec{}
} else { } else {
yyv18 := &x.Template yyv19 := &x.Template
yyv18.CodecDecodeSelf(d) yyv19.CodecDecodeSelf(d)
} }
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1729,21 +1778,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.VolumeClaimTemplates = nil x.VolumeClaimTemplates = nil
} else { } else {
yyv19 := &x.VolumeClaimTemplates yyv20 := &x.VolumeClaimTemplates
yym20 := z.DecBinary() yym21 := z.DecBinary()
_ = yym20 _ = yym21
if false { if false {
} else { } else {
h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv19), d) h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv20), d)
} }
} }
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1751,26 +1800,43 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ServiceName = "" x.ServiceName = ""
} else { } else {
yyv21 := &x.ServiceName yyv22 := &x.ServiceName
yym22 := z.DecBinary() yym23 := z.DecBinary()
_ = yym22 _ = yym23
if false { if false {
} else { } else {
*((*string)(yyv21)) = r.DecodeString() *((*string)(yyv22)) = r.DecodeString()
} }
} }
yyj14++
if yyhl14 {
yyb14 = yyj14 > l
} else {
yyb14 = r.CheckBreak()
}
if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.PodManagementPolicy = ""
} else {
yyv24 := &x.PodManagementPolicy
yyv24.CodecDecodeSelf(d)
}
for { for {
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj13-1, "") z.DecStructFieldNotFound(yyj14-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
@ -6166,7 +6232,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco
yyrg1 := len(yyv1) > 0 yyrg1 := len(yyv1) > 0
yyv21 := yyv1 yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 896) yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 912)
if yyrt1 { if yyrt1 {
if yyrl1 <= cap(yyv1) { if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1] yyv1 = yyv1[:yyrl1]

View File

@ -95,9 +95,24 @@ type StatefulSet struct {
Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
} }
// PodManagementPolicyType defines the policy for creating pods under a stateful set.
type PodManagementPolicyType string
const (
// OrderedReadyPodManagement will create pods in strictly increasing order on
// scale up and strictly decreasing order on scale down, progressing only when
// the previous pod is ready or terminated. At most one pod will be changed
// at any time.
OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
// ParallelPodManagement will create and delete pods as soon as the stateful set
// replica count is changed, and will not wait for pods to be ready or complete
// termination.
ParallelPodManagement = "Parallel"
)
// A StatefulSetSpec is the specification of a StatefulSet. // A StatefulSetSpec is the specification of a StatefulSet.
type StatefulSetSpec struct { type StatefulSetSpec struct {
// Replicas is the desired number of replicas of the given Template. // replicas is the desired number of replicas of the given Template.
// These are replicas in the sense that they are instantiations of the // These are replicas in the sense that they are instantiations of the
// same Template, but individual replicas also have a consistent identity. // same Template, but individual replicas also have a consistent identity.
// If unspecified, defaults to 1. // If unspecified, defaults to 1.
@ -105,19 +120,19 @@ type StatefulSetSpec struct {
// +optional // +optional
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
// Selector is a label query over pods that should match the replica count. // selector is a label query over pods that should match the replica count.
// If empty, defaulted to labels on the pod template. // If empty, defaulted to labels on the pod template.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
// +optional // +optional
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
// Template is the object that describes the pod that will be created if // template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the StatefulSet // insufficient replicas are detected. Each pod stamped out by the StatefulSet
// will fulfill this Template, but have a unique identity from the rest // will fulfill this Template, but have a unique identity from the rest
// of the StatefulSet. // of the StatefulSet.
Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
// VolumeClaimTemplates is a list of claims that pods are allowed to reference. // volumeClaimTemplates is a list of claims that pods are allowed to reference.
// The StatefulSet controller is responsible for mapping network identities to // The StatefulSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pod. Every claim in // claims in a way that maintains the identity of a pod. Every claim in
// this list must have at least one matching (by name) volumeMount in one // this list must have at least one matching (by name) volumeMount in one
@ -127,21 +142,32 @@ type StatefulSetSpec struct {
// +optional // +optional
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
// ServiceName is the name of the service that governs this StatefulSet. // serviceName is the name of the service that governs this StatefulSet.
// This service must exist before the StatefulSet, and is responsible for // This service must exist before the StatefulSet, and is responsible for
// the network identity of the set. Pods get DNS/hostnames that follow the // the network identity of the set. Pods get DNS/hostnames that follow the
// pattern: pod-specific-string.serviceName.default.svc.cluster.local // pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller. // where "pod-specific-string" is managed by the StatefulSet controller.
ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"` ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
// podManagementPolicy controls how pods are created during initial scale up,
// when replacing pods on nodes, or when scaling down. The default policy is
// `OrderedReady`, where pods are created in increasing order (pod-0, then
// pod-1, etc) and the controller will wait until each pod is ready before
// continuing. When scaling down, the pods are removed in the opposite order.
// The alternative policy is `Parallel` which will create pods in parallel
// to match the desired scale without waiting, and on scale down will delete
// all pods at once.
// +optional
PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"`
} }
// StatefulSetStatus represents the current state of a StatefulSet. // StatefulSetStatus represents the current state of a StatefulSet.
type StatefulSetStatus struct { type StatefulSetStatus struct {
// most recent generation observed by this StatefulSet. // observedGeneration is the most recent generation observed by this StatefulSet.
// +optional // +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
// Replicas is the number of actual replicas. // replicas is the number of actual replicas.
Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"` Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
} }

View File

@ -184,11 +184,12 @@ func (StatefulSetList) SwaggerDoc() map[string]string {
var map_StatefulSetSpec = map[string]string{ var map_StatefulSetSpec = map[string]string{
"": "A StatefulSetSpec is the specification of a StatefulSet.", "": "A StatefulSetSpec is the specification of a StatefulSet.",
"replicas": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", "replicas": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
"selector": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", "selector": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
"template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", "template": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
"volumeClaimTemplates": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", "volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
"serviceName": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", "serviceName": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
"podManagementPolicy": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
} }
func (StatefulSetSpec) SwaggerDoc() map[string]string { func (StatefulSetSpec) SwaggerDoc() map[string]string {
@ -197,8 +198,8 @@ func (StatefulSetSpec) SwaggerDoc() map[string]string {
var map_StatefulSetStatus = map[string]string{ var map_StatefulSetStatus = map[string]string{
"": "StatefulSetStatus represents the current state of a StatefulSet.", "": "StatefulSetStatus represents the current state of a StatefulSet.",
"observedGeneration": "most recent generation observed by this StatefulSet.", "observedGeneration": "observedGeneration is the most recent generation observed by this StatefulSet.",
"replicas": "Replicas is the number of actual replicas.", "replicas": "replicas is the number of actual replicas.",
} }
func (StatefulSetStatus) SwaggerDoc() map[string]string { func (StatefulSetStatus) SwaggerDoc() map[string]string {

View File

@ -133,6 +133,7 @@ func autoConvert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSet
} }
out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
out.ServiceName = in.ServiceName out.ServiceName = in.ServiceName
out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy)
return nil return nil
} }
@ -146,6 +147,7 @@ func autoConvert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.Statef
} }
out.VolumeClaimTemplates = *(*[]api_v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) out.VolumeClaimTemplates = *(*[]api_v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
out.ServiceName = in.ServiceName out.ServiceName = in.ServiceName
out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy)
return nil return nil
} }

View File

@ -17,6 +17,7 @@ limitations under the License.
package validation package validation
import ( import (
"fmt"
"reflect" "reflect"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -66,6 +67,14 @@ func ValidatePodTemplateSpecForStatefulSet(template *api.PodTemplateSpec, select
func ValidateStatefulSetSpec(spec *apps.StatefulSetSpec, fldPath *field.Path) field.ErrorList { func ValidateStatefulSetSpec(spec *apps.StatefulSetSpec, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{} allErrs := field.ErrorList{}
switch spec.PodManagementPolicy {
case "":
allErrs = append(allErrs, field.Required(fldPath.Child("podManagementPolicy"), ""))
case apps.OrderedReadyPodManagement, apps.ParallelPodManagement:
default:
allErrs = append(allErrs, field.Invalid(fldPath.Child("podManagementPolicy"), spec.PodManagementPolicy, fmt.Sprintf("must be '%s' or '%s'", apps.OrderedReadyPodManagement, apps.ParallelPodManagement)))
}
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(spec.Replicas), fldPath.Child("replicas"))...) allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(spec.Replicas), fldPath.Child("replicas"))...)
if spec.Selector == nil { if spec.Selector == nil {
allErrs = append(allErrs, field.Required(fldPath.Child("selector"), "")) allErrs = append(allErrs, field.Required(fldPath.Child("selector"), ""))

View File

@ -55,15 +55,17 @@ func TestValidateStatefulSet(t *testing.T) {
{ {
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
{ {
ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
} }
@ -77,41 +79,47 @@ func TestValidateStatefulSet(t *testing.T) {
"zero-length ID": { "zero-length ID": {
ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
"missing-namespace": { "missing-namespace": {
ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, ObjectMeta: metav1.ObjectMeta{Name: "abc-123"},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
"empty selector": { "empty selector": {
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Template: validPodTemplate.Template, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template,
}, },
}, },
"selector_doesnt_match": { "selector_doesnt_match": {
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}},
Template: validPodTemplate.Template,
}, },
}, },
"invalid manifest": { "invalid manifest": {
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: validLabels},
}, },
}, },
"negative_replicas": { "negative_replicas": {
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Replicas: -1, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Replicas: -1,
Selector: &metav1.LabelSelector{MatchLabels: validLabels},
}, },
}, },
"invalid_label": { "invalid_label": {
@ -123,8 +131,9 @@ func TestValidateStatefulSet(t *testing.T) {
}, },
}, },
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
"invalid_label 2": { "invalid_label 2": {
@ -136,7 +145,8 @@ func TestValidateStatefulSet(t *testing.T) {
}, },
}, },
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Template: invalidPodTemplate.Template, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: invalidPodTemplate.Template,
}, },
}, },
"invalid_annotation": { "invalid_annotation": {
@ -148,8 +158,9 @@ func TestValidateStatefulSet(t *testing.T) {
}, },
}, },
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
"invalid restart policy 1": { "invalid restart policy 1": {
@ -158,7 +169,8 @@ func TestValidateStatefulSet(t *testing.T) {
Namespace: metav1.NamespaceDefault, Namespace: metav1.NamespaceDefault,
}, },
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: api.PodTemplateSpec{ Template: api.PodTemplateSpec{
Spec: api.PodSpec{ Spec: api.PodSpec{
RestartPolicy: api.RestartPolicyOnFailure, RestartPolicy: api.RestartPolicyOnFailure,
@ -177,7 +189,8 @@ func TestValidateStatefulSet(t *testing.T) {
Namespace: metav1.NamespaceDefault, Namespace: metav1.NamespaceDefault,
}, },
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: api.PodTemplateSpec{ Template: api.PodTemplateSpec{
Spec: api.PodSpec{ Spec: api.PodSpec{
RestartPolicy: api.RestartPolicyNever, RestartPolicy: api.RestartPolicyNever,
@ -263,16 +276,18 @@ func TestValidateStatefulSetUpdate(t *testing.T) {
old: apps.StatefulSet{ old: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
update: apps.StatefulSet{ update: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Replicas: 3, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Replicas: 3,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
}, },
@ -296,9 +311,45 @@ func TestValidateStatefulSetUpdate(t *testing.T) {
update: apps.StatefulSet{ update: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Replicas: 2, PodManagementPolicy: apps.OrderedReadyPodManagement,
Replicas: 2,
Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: readWriteVolumePodTemplate.Template,
},
},
},
"empty pod creation policy": {
old: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: readWriteVolumePodTemplate.Template, Template: validPodTemplate.Template,
},
},
update: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{
Replicas: 3,
Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
},
},
},
"invalid pod creation policy": {
old: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
},
},
update: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{
PodManagementPolicy: apps.PodManagementPolicyType("Other"),
Replicas: 3,
Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
}, },
@ -313,9 +364,10 @@ func TestValidateStatefulSetUpdate(t *testing.T) {
update: apps.StatefulSet{ update: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Replicas: 1, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Replicas: 1,
Template: readWriteVolumePodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: readWriteVolumePodTemplate.Template,
}, },
}, },
}, },
@ -330,9 +382,10 @@ func TestValidateStatefulSetUpdate(t *testing.T) {
update: apps.StatefulSet{ update: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Replicas: 2, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: invalidLabels}, Replicas: 2,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: invalidLabels},
Template: validPodTemplate.Template,
}, },
}, },
}, },
@ -340,8 +393,9 @@ func TestValidateStatefulSetUpdate(t *testing.T) {
old: apps.StatefulSet{ old: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
update: apps.StatefulSet{ update: apps.StatefulSet{
@ -364,9 +418,10 @@ func TestValidateStatefulSetUpdate(t *testing.T) {
update: apps.StatefulSet{ update: apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Replicas: -1, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Replicas: -1,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validLabels},
Template: validPodTemplate.Template,
}, },
}, },
}, },

View File

@ -56,9 +56,11 @@ go_test(
library = ":go_default_library", library = ":go_default_library",
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library", "//pkg/api/v1:go_default_library",
"//pkg/api/v1/pod:go_default_library", "//pkg/api/v1/pod:go_default_library",
"//pkg/apis/apps/v1beta1:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library",
"//pkg/client/clientset_generated/clientset:go_default_library",
"//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library",
"//pkg/client/informers/informers_generated/externalversions:go_default_library", "//pkg/client/informers/informers_generated/externalversions:go_default_library",
"//pkg/client/informers/informers_generated/externalversions/apps/v1beta1:go_default_library", "//pkg/client/informers/informers_generated/externalversions/apps/v1beta1:go_default_library",

View File

@ -50,6 +50,12 @@ type defaultStatefulSetControl struct {
podControl StatefulPodControlInterface podControl StatefulPodControlInterface
} }
// UpdateStatefulSet executes the core logic loop for a stateful set, applying the predictable and
// consistent monotonic update strategy by default - scale up proceeds in ordinal order, no new pod
// is created while any pod is unhealthy, and pods are terminated in descending order. The burst
// strategy allows these constraints to be relaxed - pods will be created and deleted eagerly and
// in no particular order. Clients using the burst strategy should be careful to ensure they
// understand the consistency implications of having unpredictable numbers of pods available.
func (ssc *defaultStatefulSetControl) UpdateStatefulSet(set *apps.StatefulSet, pods []*v1.Pod) error { func (ssc *defaultStatefulSetControl) UpdateStatefulSet(set *apps.StatefulSet, pods []*v1.Pod) error {
replicaCount := int(*set.Spec.Replicas) replicaCount := int(*set.Spec.Replicas)
// slice that will contain all Pods such that 0 <= getOrdinal(pod) < set.Spec.Replicas // slice that will contain all Pods such that 0 <= getOrdinal(pod) < set.Spec.Replicas
@ -118,6 +124,8 @@ func (ssc *defaultStatefulSetControl) UpdateStatefulSet(set *apps.StatefulSet, p
return nil return nil
} }
monotonic := !allowsBurst(set)
// Examine each replica with respect to its ordinal // Examine each replica with respect to its ordinal
for i := range replicas { for i := range replicas {
// delete and recreate failed pods // delete and recreate failed pods
@ -128,23 +136,29 @@ func (ssc *defaultStatefulSetControl) UpdateStatefulSet(set *apps.StatefulSet, p
} }
replicas[i] = newStatefulSetPod(set, i) replicas[i] = newStatefulSetPod(set, i)
} }
// If we find a Pod that has not been created we create the Pod immediately and return // If we find a Pod that has not been created we create the Pod
if !isCreated(replicas[i]) { if !isCreated(replicas[i]) {
return ssc.podControl.CreateStatefulPod(set, replicas[i]) if err := ssc.podControl.CreateStatefulPod(set, replicas[i]); err != nil {
return err
}
// if the set does not allow bursting, return immediately
if monotonic {
return nil
}
// pod created, no more work possible for this round
continue
} }
// If we find a Pod that is currently terminating, we must wait until graceful deletion // If we find a Pod that is currently terminating, we must wait until graceful deletion
// completes before we continue to make progress. // completes before we continue to make progress.
if isTerminating(replicas[i]) { if isTerminating(replicas[i]) && monotonic {
glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to Terminate", glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to Terminate", set.Name, replicas[i].Name)
set.Name, replicas[i].Name)
return nil return nil
} }
// If we have a Pod that has been created but is not running and ready we can not make progress. // If we have a Pod that has been created but is not running and ready we can not make progress.
// We must ensure that all for each Pod, when we create it, all of its predecessors, with respect to its // We must ensure that all for each Pod, when we create it, all of its predecessors, with respect to its
// ordinal, are Running and Ready. // ordinal, are Running and Ready.
if !isRunningAndReady(replicas[i]) { if !isRunningAndReady(replicas[i]) && monotonic {
glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to be Running and Ready", glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to be Running and Ready", set.Name, replicas[i].Name)
set.Name, replicas[i].Name)
return nil return nil
} }
// Enforce the StatefulSet invariants // Enforce the StatefulSet invariants
@ -166,13 +180,18 @@ func (ssc *defaultStatefulSetControl) UpdateStatefulSet(set *apps.StatefulSet, p
// We will wait for all predecessors to be Running and Ready prior to attempting a deletion. // We will wait for all predecessors to be Running and Ready prior to attempting a deletion.
// We will terminate Pods in a monotonically decreasing order over [len(pods),set.Spec.Replicas). // We will terminate Pods in a monotonically decreasing order over [len(pods),set.Spec.Replicas).
// Note that we do not resurrect Pods in this interval. // Note that we do not resurrect Pods in this interval.
if unhealthy > 0 { if unhealthy > 0 && monotonic {
glog.V(2).Infof("StatefulSet %s is waiting on %d Pods", set.Name, unhealthy) glog.V(2).Infof("StatefulSet %s is waiting on %d Pods", set.Name, unhealthy)
return nil return nil
} }
if target := len(condemned) - 1; target >= 0 { for target := len(condemned) - 1; target >= 0; target-- {
glog.V(2).Infof("StatefulSet %s terminating Pod %s", set.Name, condemned[target]) glog.V(2).Infof("StatefulSet %s terminating Pod %s", set.Name, condemned[target])
return ssc.podControl.DeleteStatefulPod(set, condemned[target]) if err := ssc.podControl.DeleteStatefulPod(set, condemned[target]); err != nil {
return err
}
if monotonic {
return nil
}
} }
return nil return nil
} }

View File

@ -227,6 +227,11 @@ func isHealthy(pod *v1.Pod) bool {
return isRunningAndReady(pod) && !isTerminating(pod) return isRunningAndReady(pod) && !isTerminating(pod)
} }
// allowsBurst is true if the alpha burst annotation is set.
func allowsBurst(set *apps.StatefulSet) bool {
return set.Annotations[apps.StatefulSetBurstAnnotation] == "true"
}
// newControllerRef returns an ControllerRef pointing to a given StatefulSet. // newControllerRef returns an ControllerRef pointing to a given StatefulSet.
func newControllerRef(set *apps.StatefulSet) *metav1.OwnerReference { func newControllerRef(set *apps.StatefulSet) *metav1.OwnerReference {
blockOwnerDeletion := true blockOwnerDeletion := true

View File

@ -58,7 +58,8 @@ func validNewStatefulSet() *apps.StatefulSet {
Labels: map[string]string{"a": "b"}, Labels: map[string]string{"a": "b"},
}, },
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "b"}}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "b"}},
Template: api.PodTemplateSpec{ Template: api.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{"a": "b"}, Labels: map[string]string{"a": "b"},

View File

@ -51,8 +51,9 @@ func TestStatefulSetStrategy(t *testing.T) {
ps := &apps.StatefulSet{ ps := &apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: &metav1.LabelSelector{MatchLabels: validSelector}, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: &metav1.LabelSelector{MatchLabels: validSelector},
Template: validPodTemplate.Template,
}, },
Status: apps.StatefulSetStatus{Replicas: 3}, Status: apps.StatefulSetStatus{Replicas: 3},
} }
@ -70,8 +71,9 @@ func TestStatefulSetStrategy(t *testing.T) {
validPs := &apps.StatefulSet{ validPs := &apps.StatefulSet{
ObjectMeta: metav1.ObjectMeta{Name: ps.Name, Namespace: ps.Namespace, ResourceVersion: "1", Generation: 1}, ObjectMeta: metav1.ObjectMeta{Name: ps.Name, Namespace: ps.Namespace, ResourceVersion: "1", Generation: 1},
Spec: apps.StatefulSetSpec{ Spec: apps.StatefulSetSpec{
Selector: ps.Spec.Selector, PodManagementPolicy: apps.OrderedReadyPodManagement,
Template: validPodTemplate.Template, Selector: ps.Spec.Selector,
Template: validPodTemplate.Template,
}, },
Status: apps.StatefulSetStatus{Replicas: 4}, Status: apps.StatefulSetStatus{Replicas: 4},
} }

View File

@ -44,6 +44,21 @@ type StatefulSet struct {
Status StatefulSetStatus Status StatefulSetStatus
} }
// PodManagementPolicyType defines the policy for creating pods under a stateful set.
type PodManagementPolicyType string
const (
// OrderedReadyPodManagement will create pods in strictly increasing order on
// scale up and strictly decreasing order on scale down, progressing only when
// the previous pod is ready or terminated. At most one pod will be changed
// at any time.
OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
// ParallelPodManagement will create and delete pods as soon as the stateful set
// replica count is changed, and will not wait for pods to be ready or complete
// termination.
ParallelPodManagement = "Parallel"
)
// A StatefulSetSpec is the specification of a StatefulSet. // A StatefulSetSpec is the specification of a StatefulSet.
type StatefulSetSpec struct { type StatefulSetSpec struct {
// Replicas is the desired number of replicas of the given Template. // Replicas is the desired number of replicas of the given Template.
@ -82,6 +97,17 @@ type StatefulSetSpec struct {
// pattern: pod-specific-string.serviceName.default.svc.cluster.local // pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller. // where "pod-specific-string" is managed by the StatefulSet controller.
ServiceName string ServiceName string
// PodManagementPolicy controls how pods are created during initial scale up,
// when replacing pods on nodes, or when scaling down. The default policy is
// `OrderedReady`, where pods are created in increasing order (pod-0, then
// pod-1, etc) and the controller will wait until each pod is ready before
// continuing. When scaling down, the pods are removed in the opposite order.
// The alternative policy is `Parallel` which will create pods in parallel
// to match the desired scale without waiting, and on scale down will delete
// all pods at once.
// +optional
PodManagementPolicy PodManagementPolicyType
} }
// StatefulSetStatus represents the current state of a StatefulSet. // StatefulSetStatus represents the current state of a StatefulSet.

View File

@ -110,6 +110,7 @@ func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec
out.VolumeClaimTemplates = nil out.VolumeClaimTemplates = nil
} }
out.ServiceName = in.ServiceName out.ServiceName = in.ServiceName
out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy)
return nil return nil
} }
@ -140,6 +141,7 @@ func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSe
out.VolumeClaimTemplates = nil out.VolumeClaimTemplates = nil
} }
out.ServiceName = in.ServiceName out.ServiceName = in.ServiceName
out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy)
return nil return nil
} }

View File

@ -27,6 +27,9 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
} }
func SetDefaults_StatefulSet(obj *StatefulSet) { func SetDefaults_StatefulSet(obj *StatefulSet) {
if len(obj.Spec.PodManagementPolicy) == 0 {
obj.Spec.PodManagementPolicy = OrderedReadyPodManagement
}
labels := obj.Spec.Template.Labels labels := obj.Spec.Template.Labels
if labels != nil { if labels != nil {
if obj.Spec.Selector == nil { if obj.Spec.Selector == nil {

View File

@ -788,6 +788,10 @@ func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) {
i++ i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName))) i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
i += copy(dAtA[i:], m.ServiceName) i += copy(dAtA[i:], m.ServiceName)
dAtA[i] = 0x32
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodManagementPolicy)))
i += copy(dAtA[i:], m.PodManagementPolicy)
return i, nil return i, nil
} }
@ -1068,6 +1072,8 @@ func (m *StatefulSetSpec) Size() (n int) {
} }
l = len(m.ServiceName) l = len(m.ServiceName)
n += 1 + l + sovGenerated(uint64(l)) n += 1 + l + sovGenerated(uint64(l))
l = len(m.PodManagementPolicy)
n += 1 + l + sovGenerated(uint64(l))
return n return n
} }
@ -1297,6 +1303,7 @@ func (this *StatefulSetSpec) String() string {
`Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
`VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`, `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
`ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
`PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -3635,6 +3642,35 @@ func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error {
} }
m.ServiceName = string(dAtA[iNdEx:postIndex]) m.ServiceName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PodManagementPolicy", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PodManagementPolicy = PodManagementPolicyType(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:]) skippy, err := skipGenerated(dAtA[iNdEx:])
@ -3855,101 +3891,103 @@ func init() {
} }
var fileDescriptorGenerated = []byte{ var fileDescriptorGenerated = []byte{
// 1525 bytes of a gzipped FileDescriptorProto // 1563 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x5b, 0xc5, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x1b, 0x37,
0x17, 0xce, 0x4d, 0xec, 0xc4, 0x99, 0x34, 0x4e, 0x33, 0xc9, 0xaf, 0xf1, 0x2f, 0x45, 0x4e, 0xe5, 0x13, 0xf7, 0xda, 0x92, 0x2d, 0xd3, 0xb1, 0x1c, 0xd3, 0xfe, 0x62, 0x7d, 0xce, 0x07, 0x39, 0xd0,
0x45, 0x1f, 0xa8, 0xbd, 0xa6, 0x69, 0xa1, 0x8f, 0x40, 0x45, 0xdc, 0x96, 0x52, 0x94, 0xd0, 0x6a, 0x21, 0x8f, 0x0f, 0xc9, 0xaa, 0x71, 0xd2, 0xbc, 0xdc, 0x06, 0xb5, 0x92, 0x34, 0x4d, 0x61, 0x37,
0xec, 0x54, 0xb4, 0x14, 0x89, 0xb1, 0x3d, 0xbd, 0x9d, 0xfa, 0xbe, 0x74, 0x67, 0x6c, 0xc5, 0x3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0x24, 0x4d, 0xbe, 0x4e, 0x38, 0xae, 0xc1, 0xbd, 0xfd,
0x6b, 0x13, 0xbd, 0xfd, 0x35, 0x10, 0x8d, 0xa1, 0x90, 0x15, 0x3e, 0x06, 0x19, 0xe6, 0x92, 0x46, 0xa5, 0x91, 0xc3, 0xfd, 0x25, 0x10, 0xad, 0xa1, 0x90, 0x15, 0x3e, 0x05, 0x39, 0xe6, 0x92, 0x66,
0x61, 0x52, 0xb2, 0x5f, 0xd3, 0x47, 0x94, 0x93, 0x1e, 0x05, 0x59, 0x75, 0x49, 0xa3, 0x72, 0x42, 0x69, 0x54, 0xb2, 0xdf, 0xd4, 0x07, 0x0c, 0x27, 0x3d, 0x72, 0xb2, 0xee, 0x92, 0x66, 0xed, 0x94,
0x39, 0xc9, 0x88, 0x2f, 0x24, 0x29, 0x21, 0x06, 0xd3, 0x8c, 0x63, 0xde, 0x66, 0x85, 0x29, 0x49, 0x32, 0x92, 0x13, 0x5f, 0x48, 0x52, 0x42, 0x0c, 0xc6, 0x19, 0xc7, 0xbc, 0xcd, 0x4a, 0x63, 0x92,
0x7e, 0x63, 0x1c, 0x72, 0x49, 0x50, 0xc9, 0x2b, 0xfa, 0x69, 0xff, 0x1b, 0x29, 0xe2, 0xd2, 0xc1, 0xfc, 0xf6, 0x30, 0xe4, 0x92, 0xa0, 0x56, 0x54, 0xf4, 0xe3, 0xfe, 0x37, 0x52, 0xc4, 0x95, 0x83,
0x14, 0x58, 0x8a, 0x8c, 0x6f, 0x3b, 0x76, 0x93, 0x72, 0xea, 0xd8, 0x70, 0x03, 0x64, 0x78, 0xd7, 0x31, 0x30, 0x17, 0x29, 0xdf, 0x73, 0xec, 0x16, 0xe5, 0xd4, 0xb1, 0xe1, 0x0a, 0xc8, 0xf1, 0xae,
0x25, 0x72, 0xcf, 0x66, 0x2b, 0xe7, 0x82, 0xe0, 0x6a, 0x5d, 0x97, 0xbc, 0xde, 0x5f, 0x5b, 0x19, 0x4b, 0xe4, 0x99, 0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0xf2, 0x6c, 0x42, 0xc5, 0xfe, 0x5f, 0x01, 0x00,
0x00, 0xff, 0xff, 0xdf, 0x80, 0xf3, 0x34, 0xc0, 0x15, 0x00, 0x00,
} }

View File

@ -294,7 +294,7 @@ message StatefulSetList {
// A StatefulSetSpec is the specification of a StatefulSet. // A StatefulSetSpec is the specification of a StatefulSet.
message StatefulSetSpec { message StatefulSetSpec {
// Replicas is the desired number of replicas of the given Template. // replicas is the desired number of replicas of the given Template.
// These are replicas in the sense that they are instantiations of the // These are replicas in the sense that they are instantiations of the
// same Template, but individual replicas also have a consistent identity. // same Template, but individual replicas also have a consistent identity.
// If unspecified, defaults to 1. // If unspecified, defaults to 1.
@ -302,19 +302,19 @@ message StatefulSetSpec {
// +optional // +optional
optional int32 replicas = 1; optional int32 replicas = 1;
// Selector is a label query over pods that should match the replica count. // selector is a label query over pods that should match the replica count.
// If empty, defaulted to labels on the pod template. // If empty, defaulted to labels on the pod template.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
// Template is the object that describes the pod that will be created if // template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the StatefulSet // insufficient replicas are detected. Each pod stamped out by the StatefulSet
// will fulfill this Template, but have a unique identity from the rest // will fulfill this Template, but have a unique identity from the rest
// of the StatefulSet. // of the StatefulSet.
optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
// VolumeClaimTemplates is a list of claims that pods are allowed to reference. // volumeClaimTemplates is a list of claims that pods are allowed to reference.
// The StatefulSet controller is responsible for mapping network identities to // The StatefulSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pod. Every claim in // claims in a way that maintains the identity of a pod. Every claim in
// this list must have at least one matching (by name) volumeMount in one // this list must have at least one matching (by name) volumeMount in one
@ -324,21 +324,32 @@ message StatefulSetSpec {
// +optional // +optional
repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4; repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
// ServiceName is the name of the service that governs this StatefulSet. // serviceName is the name of the service that governs this StatefulSet.
// This service must exist before the StatefulSet, and is responsible for // This service must exist before the StatefulSet, and is responsible for
// the network identity of the set. Pods get DNS/hostnames that follow the // the network identity of the set. Pods get DNS/hostnames that follow the
// pattern: pod-specific-string.serviceName.default.svc.cluster.local // pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller. // where "pod-specific-string" is managed by the StatefulSet controller.
optional string serviceName = 5; optional string serviceName = 5;
// podManagementPolicy controls how pods are created during initial scale up,
// when replacing pods on nodes, or when scaling down. The default policy is
// `OrderedReady`, where pods are created in increasing order (pod-0, then
// pod-1, etc) and the controller will wait until each pod is ready before
// continuing. When scaling down, the pods are removed in the opposite order.
// The alternative policy is `Parallel` which will create pods in parallel
// to match the desired scale without waiting, and on scale down will delete
// all pods at once.
// +optional
optional string podManagementPolicy = 6;
} }
// StatefulSetStatus represents the current state of a StatefulSet. // StatefulSetStatus represents the current state of a StatefulSet.
message StatefulSetStatus { message StatefulSetStatus {
// most recent generation observed by this StatefulSet. // observedGeneration is the most recent generation observed by this StatefulSet.
// +optional // +optional
optional int64 observedGeneration = 1; optional int64 observedGeneration = 1;
// Replicas is the number of actual replicas. // replicas is the number of actual replicas.
optional int32 replicas = 2; optional int32 replicas = 2;
} }

View File

@ -1340,6 +1340,32 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
func (x PodManagementPolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
yym1 := z.EncBinary()
_ = yym1
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x))
}
}
func (x *PodManagementPolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym1 := z.DecBinary()
_ = yym1
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
*((*string)(x)) = r.DecodeString()
}
}
func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e) z, r := codec1978.GenHelperEncoder(e)
@ -1354,15 +1380,16 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
} else { } else {
yysep2 := !z.EncBinary() yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [5]bool var yyq2 [6]bool
_, _, _ = yysep2, yyq2, yy2arr2 _, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false const yyr2 bool = false
yyq2[0] = x.Replicas != nil yyq2[0] = x.Replicas != nil
yyq2[1] = x.Selector != nil yyq2[1] = x.Selector != nil
yyq2[3] = len(x.VolumeClaimTemplates) != 0 yyq2[3] = len(x.VolumeClaimTemplates) != 0
yyq2[5] = x.PodManagementPolicy != ""
var yynn2 int var yynn2 int
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
r.EncodeArrayStart(5) r.EncodeArrayStart(6)
} else { } else {
yynn2 = 2 yynn2 = 2
for _, b := range yyq2 { for _, b := range yyq2 {
@ -1506,6 +1533,21 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
} }
} }
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[5] {
x.PodManagementPolicy.CodecEncodeSelf(e)
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("podManagementPolicy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
x.PodManagementPolicy.CodecEncodeSelf(e)
}
}
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
@ -1631,6 +1673,13 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
*((*string)(yyv11)) = r.DecodeString() *((*string)(yyv11)) = r.DecodeString()
} }
} }
case "podManagementPolicy":
if r.TryDecodeAsNil() {
x.PodManagementPolicy = ""
} else {
yyv13 := &x.PodManagementPolicy
yyv13.CodecDecodeSelf(d)
}
default: default:
z.DecStructFieldNotFound(-1, yys3) z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3 } // end switch yys3
@ -1642,16 +1691,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj13 int var yyj14 int
var yyb13 bool var yyb14 bool
var yyhl13 bool = l >= 0 var yyhl14 bool = l >= 0
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1664,20 +1713,20 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if x.Replicas == nil { if x.Replicas == nil {
x.Replicas = new(int32) x.Replicas = new(int32)
} }
yym15 := z.DecBinary() yym16 := z.DecBinary()
_ = yym15 _ = yym16
if false { if false {
} else { } else {
*((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
} }
} }
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1690,21 +1739,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if x.Selector == nil { if x.Selector == nil {
x.Selector = new(pkg1_v1.LabelSelector) x.Selector = new(pkg1_v1.LabelSelector)
} }
yym17 := z.DecBinary() yym18 := z.DecBinary()
_ = yym17 _ = yym18
if false { if false {
} else if z.HasExtensions() && z.DecExt(x.Selector) { } else if z.HasExtensions() && z.DecExt(x.Selector) {
} else { } else {
z.DecFallback(x.Selector, false) z.DecFallback(x.Selector, false)
} }
} }
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1712,16 +1761,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Template = pkg3_v1.PodTemplateSpec{} x.Template = pkg3_v1.PodTemplateSpec{}
} else { } else {
yyv18 := &x.Template yyv19 := &x.Template
yyv18.CodecDecodeSelf(d) yyv19.CodecDecodeSelf(d)
} }
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1729,21 +1778,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.VolumeClaimTemplates = nil x.VolumeClaimTemplates = nil
} else { } else {
yyv19 := &x.VolumeClaimTemplates yyv20 := &x.VolumeClaimTemplates
yym20 := z.DecBinary() yym21 := z.DecBinary()
_ = yym20 _ = yym21
if false { if false {
} else { } else {
h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv19), d) h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv20), d)
} }
} }
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
@ -1751,26 +1800,43 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ServiceName = "" x.ServiceName = ""
} else { } else {
yyv21 := &x.ServiceName yyv22 := &x.ServiceName
yym22 := z.DecBinary() yym23 := z.DecBinary()
_ = yym22 _ = yym23
if false { if false {
} else { } else {
*((*string)(yyv21)) = r.DecodeString() *((*string)(yyv22)) = r.DecodeString()
} }
} }
yyj14++
if yyhl14 {
yyb14 = yyj14 > l
} else {
yyb14 = r.CheckBreak()
}
if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.PodManagementPolicy = ""
} else {
yyv24 := &x.PodManagementPolicy
yyv24.CodecDecodeSelf(d)
}
for { for {
yyj13++ yyj14++
if yyhl13 { if yyhl14 {
yyb13 = yyj13 > l yyb14 = yyj14 > l
} else { } else {
yyb13 = r.CheckBreak() yyb14 = r.CheckBreak()
} }
if yyb13 { if yyb14 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj13-1, "") z.DecStructFieldNotFound(yyj14-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
@ -6166,7 +6232,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco
yyrg1 := len(yyv1) > 0 yyrg1 := len(yyv1) > 0
yyv21 := yyv1 yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 896) yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 912)
if yyrt1 { if yyrt1 {
if yyrl1 <= cap(yyv1) { if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1] yyv1 = yyv1[:yyrl1]

View File

@ -95,9 +95,24 @@ type StatefulSet struct {
Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
} }
// PodManagementPolicyType defines the policy for creating pods under a stateful set.
type PodManagementPolicyType string
const (
// OrderedReadyPodManagement will create pods in strictly increasing order on
// scale up and strictly decreasing order on scale down, progressing only when
// the previous pod is ready or terminated. At most one pod will be changed
// at any time.
OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
// ParallelPodManagement will create and delete pods as soon as the stateful set
// replica count is changed, and will not wait for pods to be ready or complete
// termination.
ParallelPodManagement = "Parallel"
)
// A StatefulSetSpec is the specification of a StatefulSet. // A StatefulSetSpec is the specification of a StatefulSet.
type StatefulSetSpec struct { type StatefulSetSpec struct {
// Replicas is the desired number of replicas of the given Template. // replicas is the desired number of replicas of the given Template.
// These are replicas in the sense that they are instantiations of the // These are replicas in the sense that they are instantiations of the
// same Template, but individual replicas also have a consistent identity. // same Template, but individual replicas also have a consistent identity.
// If unspecified, defaults to 1. // If unspecified, defaults to 1.
@ -105,19 +120,19 @@ type StatefulSetSpec struct {
// +optional // +optional
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
// Selector is a label query over pods that should match the replica count. // selector is a label query over pods that should match the replica count.
// If empty, defaulted to labels on the pod template. // If empty, defaulted to labels on the pod template.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
// +optional // +optional
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
// Template is the object that describes the pod that will be created if // template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the StatefulSet // insufficient replicas are detected. Each pod stamped out by the StatefulSet
// will fulfill this Template, but have a unique identity from the rest // will fulfill this Template, but have a unique identity from the rest
// of the StatefulSet. // of the StatefulSet.
Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
// VolumeClaimTemplates is a list of claims that pods are allowed to reference. // volumeClaimTemplates is a list of claims that pods are allowed to reference.
// The StatefulSet controller is responsible for mapping network identities to // The StatefulSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pod. Every claim in // claims in a way that maintains the identity of a pod. Every claim in
// this list must have at least one matching (by name) volumeMount in one // this list must have at least one matching (by name) volumeMount in one
@ -127,21 +142,32 @@ type StatefulSetSpec struct {
// +optional // +optional
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
// ServiceName is the name of the service that governs this StatefulSet. // serviceName is the name of the service that governs this StatefulSet.
// This service must exist before the StatefulSet, and is responsible for // This service must exist before the StatefulSet, and is responsible for
// the network identity of the set. Pods get DNS/hostnames that follow the // the network identity of the set. Pods get DNS/hostnames that follow the
// pattern: pod-specific-string.serviceName.default.svc.cluster.local // pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller. // where "pod-specific-string" is managed by the StatefulSet controller.
ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"` ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
// podManagementPolicy controls how pods are created during initial scale up,
// when replacing pods on nodes, or when scaling down. The default policy is
// `OrderedReady`, where pods are created in increasing order (pod-0, then
// pod-1, etc) and the controller will wait until each pod is ready before
// continuing. When scaling down, the pods are removed in the opposite order.
// The alternative policy is `Parallel` which will create pods in parallel
// to match the desired scale without waiting, and on scale down will delete
// all pods at once.
// +optional
PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"`
} }
// StatefulSetStatus represents the current state of a StatefulSet. // StatefulSetStatus represents the current state of a StatefulSet.
type StatefulSetStatus struct { type StatefulSetStatus struct {
// most recent generation observed by this StatefulSet. // observedGeneration is the most recent generation observed by this StatefulSet.
// +optional // +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
// Replicas is the number of actual replicas. // replicas is the number of actual replicas.
Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"` Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
} }

View File

@ -184,11 +184,12 @@ func (StatefulSetList) SwaggerDoc() map[string]string {
var map_StatefulSetSpec = map[string]string{ var map_StatefulSetSpec = map[string]string{
"": "A StatefulSetSpec is the specification of a StatefulSet.", "": "A StatefulSetSpec is the specification of a StatefulSet.",
"replicas": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", "replicas": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
"selector": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", "selector": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
"template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", "template": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
"volumeClaimTemplates": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", "volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
"serviceName": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", "serviceName": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
"podManagementPolicy": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
} }
func (StatefulSetSpec) SwaggerDoc() map[string]string { func (StatefulSetSpec) SwaggerDoc() map[string]string {
@ -197,8 +198,8 @@ func (StatefulSetSpec) SwaggerDoc() map[string]string {
var map_StatefulSetStatus = map[string]string{ var map_StatefulSetStatus = map[string]string{
"": "StatefulSetStatus represents the current state of a StatefulSet.", "": "StatefulSetStatus represents the current state of a StatefulSet.",
"observedGeneration": "most recent generation observed by this StatefulSet.", "observedGeneration": "observedGeneration is the most recent generation observed by this StatefulSet.",
"replicas": "Replicas is the number of actual replicas.", "replicas": "replicas is the number of actual replicas.",
} }
func (StatefulSetStatus) SwaggerDoc() map[string]string { func (StatefulSetStatus) SwaggerDoc() map[string]string {

View File

@ -133,6 +133,7 @@ func autoConvert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSet
} }
out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
out.ServiceName = in.ServiceName out.ServiceName = in.ServiceName
out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy)
return nil return nil
} }
@ -146,6 +147,7 @@ func autoConvert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.Statef
} }
out.VolumeClaimTemplates = *(*[]api_v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) out.VolumeClaimTemplates = *(*[]api_v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
out.ServiceName = in.ServiceName out.ServiceName = in.ServiceName
out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy)
return nil return nil
} }