From 2861ae5eb986a059c69e812513c272566c346710 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 25 Apr 2017 00:39:32 -0400 Subject: [PATCH] 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. --- api/openapi-spec/swagger.json | 18 +- api/swagger-spec/apps_v1beta1.json | 18 +- .../apps/v1beta1/definitions.html | 23 +- pkg/api/testing/BUILD | 1 + pkg/api/testing/fuzzer.go | 14 ++ pkg/apis/apps/types.go | 26 ++ pkg/apis/apps/v1beta1/conversion.go | 2 + pkg/apis/apps/v1beta1/defaults.go | 3 + pkg/apis/apps/v1beta1/generated.pb.go | 232 ++++++++++-------- pkg/apis/apps/v1beta1/generated.proto | 25 +- pkg/apis/apps/v1beta1/types.generated.go | 168 +++++++++---- pkg/apis/apps/v1beta1/types.go | 40 ++- .../v1beta1/types_swagger_doc_generated.go | 15 +- .../apps/v1beta1/zz_generated.conversion.go | 2 + pkg/apis/apps/validation/validation.go | 9 + pkg/apis/apps/validation/validation_test.go | 133 +++++++--- pkg/controller/statefulset/BUILD | 2 + .../statefulset/stateful_set_control.go | 43 +++- .../statefulset/stateful_set_utils.go | 5 + .../apps/statefulset/storage/storage_test.go | 3 +- .../apps/statefulset/strategy_test.go | 10 +- .../k8s.io/client-go/pkg/apis/apps/types.go | 26 ++ .../pkg/apis/apps/v1beta1/conversion.go | 2 + .../pkg/apis/apps/v1beta1/defaults.go | 3 + .../pkg/apis/apps/v1beta1/generated.pb.go | 232 ++++++++++-------- .../pkg/apis/apps/v1beta1/generated.proto | 25 +- .../pkg/apis/apps/v1beta1/types.generated.go | 168 +++++++++---- .../client-go/pkg/apis/apps/v1beta1/types.go | 40 ++- .../v1beta1/types_swagger_doc_generated.go | 15 +- .../apps/v1beta1/zz_generated.conversion.go | 2 + 30 files changed, 889 insertions(+), 416 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 0f8c2085902..81bfde4d851 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -47442,25 +47442,29 @@ "serviceName" ], "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": { - "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", "format": "int32" }, "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" }, "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" }, "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" }, "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", "items": { "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaim" @@ -47475,12 +47479,12 @@ ], "properties": { "observedGeneration": { - "description": "most recent generation observed by this StatefulSet.", + "description": "observedGeneration is the most recent generation observed by this StatefulSet.", "type": "integer", "format": "int64" }, "replicas": { - "description": "Replicas is the number of actual replicas.", + "description": "replicas is the number of actual replicas.", "type": "integer", "format": "int32" } diff --git a/api/swagger-spec/apps_v1beta1.json b/api/swagger-spec/apps_v1beta1.json index d4417c829e9..2743dd92be4 100644 --- a/api/swagger-spec/apps_v1beta1.json +++ b/api/swagger-spec/apps_v1beta1.json @@ -4955,26 +4955,30 @@ "replicas": { "type": "integer", "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": { "$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": { "$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": { "type": "array", "items": { "$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": { "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": { "type": "integer", "format": "int64", - "description": "most recent generation observed by this StatefulSet." + "description": "observedGeneration is the most recent generation observed by this StatefulSet." }, "replicas": { "type": "integer", "format": "int32", - "description": "Replicas is the number of actual replicas." + "description": "replicas is the number of actual replicas." } } }, diff --git a/docs/api-reference/apps/v1beta1/definitions.html b/docs/api-reference/apps/v1beta1/definitions.html index 3a0f1f3b5a0..b63abaf5625 100755 --- a/docs/api-reference/apps/v1beta1/definitions.html +++ b/docs/api-reference/apps/v1beta1/definitions.html @@ -1511,39 +1511,46 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

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 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.

false

integer (int32)

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 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

false

v1.LabelSelector

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 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.

true

v1.PodTemplateSpec

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 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.

false

v1.PersistentVolumeClaim array

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 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.

true

string

+ +

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.

+

false

+

string

+ + @@ -4914,14 +4921,14 @@ Examples:

observedGeneration

-

most recent generation observed by this StatefulSet.

+

observedGeneration is the most recent generation observed by this StatefulSet.

false

integer (int64)

replicas

-

Replicas is the number of actual replicas.

+

replicas is the number of actual replicas.

true

integer (int32)

@@ -6449,7 +6456,7 @@ Examples:
diff --git a/pkg/api/testing/BUILD b/pkg/api/testing/BUILD index a56059db7e7..8bb555412a7 100644 --- a/pkg/api/testing/BUILD +++ b/pkg/api/testing/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/v1:go_default_library", + "//pkg/apis/apps:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/certificates:go_default_library", diff --git a/pkg/api/testing/fuzzer.go b/pkg/api/testing/fuzzer.go index 6f0a06f5e1d..ee9ca68723e 100644 --- a/pkg/api/testing/fuzzer.go +++ b/pkg/api/testing/fuzzer.go @@ -36,6 +36,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/batch" "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{} { return []interface{}{ func(s *policy.PodDisruptionBudgetStatus, c fuzz.Continue) { @@ -731,6 +744,7 @@ func FuzzerFuncs(t apitesting.TestingCommon, codecs runtimeserializer.CodecFacto overrideGenericFuncs(t, codecs), coreFuncs(t), extensionFuncs(t), + appsFuncs(t), batchFuncs(t), autoscalingFuncs(t), rbacFuncs(t), diff --git a/pkg/apis/apps/types.go b/pkg/apis/apps/types.go index a45b2a77601..18f3d2f6204 100644 --- a/pkg/apis/apps/types.go +++ b/pkg/apis/apps/types.go @@ -44,6 +44,21 @@ type StatefulSet struct { 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. type StatefulSetSpec struct { // 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 // where "pod-specific-string" is managed by the StatefulSet controller. 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. diff --git a/pkg/apis/apps/v1beta1/conversion.go b/pkg/apis/apps/v1beta1/conversion.go index e8d18b56cb2..a2e36890996 100644 --- a/pkg/apis/apps/v1beta1/conversion.go +++ b/pkg/apis/apps/v1beta1/conversion.go @@ -110,6 +110,7 @@ func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec out.VolumeClaimTemplates = nil } out.ServiceName = in.ServiceName + out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy) return nil } @@ -140,6 +141,7 @@ func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSe out.VolumeClaimTemplates = nil } out.ServiceName = in.ServiceName + out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy) return nil } diff --git a/pkg/apis/apps/v1beta1/defaults.go b/pkg/apis/apps/v1beta1/defaults.go index def2bab711d..52b881d6644 100644 --- a/pkg/apis/apps/v1beta1/defaults.go +++ b/pkg/apis/apps/v1beta1/defaults.go @@ -27,6 +27,9 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error { } func SetDefaults_StatefulSet(obj *StatefulSet) { + if len(obj.Spec.PodManagementPolicy) == 0 { + obj.Spec.PodManagementPolicy = OrderedReadyPodManagement + } labels := obj.Spec.Template.Labels if labels != nil { if obj.Spec.Selector == nil { diff --git a/pkg/apis/apps/v1beta1/generated.pb.go b/pkg/apis/apps/v1beta1/generated.pb.go index fc5b15ee460..9ce331b5b6c 100644 --- a/pkg/apis/apps/v1beta1/generated.pb.go +++ b/pkg/apis/apps/v1beta1/generated.pb.go @@ -788,6 +788,10 @@ func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(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 } @@ -1068,6 +1072,8 @@ func (m *StatefulSetSpec) Size() (n int) { } l = len(m.ServiceName) n += 1 + l + sovGenerated(uint64(l)) + l = len(m.PodManagementPolicy) + n += 1 + l + sovGenerated(uint64(l)) 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) + `,`, `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) + `,`, + `PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`, `}`, }, "") return s @@ -3635,6 +3642,35 @@ func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error { } m.ServiceName = string(dAtA[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: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3855,101 +3891,103 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1525 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x5b, 0xc5, - 0x17, 0xce, 0x4d, 0xec, 0xc4, 0x99, 0x34, 0x4e, 0x33, 0xc9, 0xaf, 0xf1, 0x2f, 0x45, 0x4e, 0xe5, - 0x45, 0x1f, 0xa8, 0xbd, 0xa6, 0x69, 0xa1, 0x8f, 0x40, 0x45, 0xdc, 0x96, 0x52, 0x94, 0xd0, 0x6a, - 0xec, 0x54, 0xb4, 0x14, 0x89, 0xb1, 0x3d, 0xbd, 0x9d, 0xfa, 0xbe, 0x74, 0x67, 0x6c, 0xc5, 0x3b, - 0x36, 0x2c, 0x90, 0x58, 0xb0, 0x62, 0x87, 0xd8, 0x23, 0x24, 0x76, 0xfc, 0x0d, 0x11, 0x6c, 0xba, - 0x44, 0x2c, 0x22, 0xe2, 0xfe, 0x17, 0x5d, 0xa1, 0x99, 0x3b, 0xf7, 0xe5, 0x6b, 0x27, 0x8e, 0x11, - 0xdd, 0xb0, 0xf3, 0x9d, 0x39, 0xdf, 0x77, 0xce, 0xcc, 0x7c, 0xe7, 0xcc, 0x19, 0x83, 0x6b, 0xad, - 0xeb, 0x4c, 0xa7, 0x4e, 0xb9, 0xd5, 0xae, 0x13, 0xcf, 0x26, 0x9c, 0xb0, 0xb2, 0xdb, 0x32, 0xca, - 0xd8, 0xa5, 0xac, 0x8c, 0x5d, 0x97, 0x95, 0x3b, 0x97, 0xeb, 0x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, 0xbd, 0x73, 0x59, 0x7f, 0x50, 0x7f, 0x41, 0x1a, 0x7c, 0x9b, 0x70, 0x5c, 0x81, 0x7b, 0xfb, - 0x6b, 0x13, 0xbd, 0xfd, 0x35, 0x10, 0x8d, 0xa1, 0x90, 0x15, 0x3e, 0x06, 0x19, 0xe6, 0x92, 0x46, - 0x61, 0x52, 0xb2, 0x5f, 0xd3, 0x47, 0x94, 0x93, 0x1e, 0x05, 0x59, 0x75, 0x49, 0xa3, 0x72, 0x42, - 0x39, 0xc9, 0x88, 0x2f, 0x24, 0x29, 0x21, 0x06, 0xd3, 0x8c, 0x63, 0xde, 0x66, 0x85, 0x29, 0x49, - 0x7e, 0x63, 0x1c, 0x72, 0x49, 0x50, 0xc9, 0x2b, 0xfa, 0x69, 0xff, 0x1b, 0x29, 0xe2, 0xd2, 0xc1, - 0x14, 0x58, 0x8a, 0x8c, 0x6f, 0x3b, 0x76, 0x93, 0x72, 0xea, 0xd8, 0x70, 0x03, 0x64, 0x78, 0xd7, - 0x25, 0x72, 0xcf, 0x66, 0x2b, 0xe7, 0x82, 0xe0, 0x6a, 0x5d, 0x97, 0xbc, 0xde, 0x5f, 0x5b, 0x19, - 0x00, 0x11, 0x53, 0x48, 0x82, 0xe0, 0xa3, 0x30, 0xee, 0x49, 0x09, 0xbf, 0x95, 0x74, 0xfe, 0x7a, - 0x7f, 0xed, 0x50, 0x49, 0xe8, 0x21, 0x67, 0x32, 0x58, 0x78, 0x16, 0x4c, 0x7b, 0x04, 0x33, 0xc7, - 0x2e, 0x64, 0x24, 0x6f, 0xb8, 0x28, 0x24, 0x47, 0x91, 0x9a, 0x85, 0x17, 0xc0, 0x8c, 0x45, 0x18, - 0xc3, 0x06, 0x29, 0x64, 0xa5, 0xe1, 0x82, 0x32, 0x9c, 0xd9, 0xf6, 0x87, 0x51, 0x30, 0x0f, 0x5f, - 0x80, 0xbc, 0x89, 0x19, 0xdf, 0x71, 0x9b, 0x98, 0x93, 0x1a, 0xb5, 0x48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x27, 0x36, 0x7f, 0x14, 0x71, - 0x54, 0xde, 0x52, 0xfe, 0x96, 0x1f, 0x0d, 0x20, 0x46, 0x03, 0xdd, 0xc1, 0x77, 0xc1, 0x9c, 0x68, - 0xe4, 0x68, 0x83, 0x88, 0xd7, 0xa5, 0xfa, 0x7f, 0x61, 0x49, 0x11, 0xcd, 0x55, 0xa3, 0x29, 0x14, - 0xb7, 0x2b, 0x7d, 0xa3, 0x81, 0xc5, 0x94, 0x66, 0xe1, 0x47, 0x87, 0x74, 0x93, 0xa7, 0xfe, 0xad, - 0x4e, 0xb2, 0x72, 0x61, 0xef, 0xa0, 0x38, 0xf1, 0xf2, 0xa0, 0x38, 0xf1, 0xc7, 0x41, 0x71, 0xe2, - 0xab, 0x5e, 0x51, 0xdb, 0xeb, 0x15, 0xb5, 0x97, 0xbd, 0xa2, 0xf6, 0x57, 0xaf, 0xa8, 0x7d, 0xf7, - 0xaa, 0x38, 0xf1, 0x64, 0x46, 0x29, 0xf2, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xb9, 0xde, - 0x1a, 0x56, 0x15, 0x00, 0x00, + // 1563 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x1b, 0x37, + 0x13, 0xf7, 0xda, 0x92, 0x2d, 0xd3, 0xb1, 0x1c, 0xd3, 0xfe, 0x62, 0x7d, 0xce, 0x07, 0x39, 0xd0, + 0x21, 0x8f, 0x0f, 0xc9, 0xaa, 0x71, 0xd2, 0xbc, 0xdc, 0x06, 0xb5, 0x92, 0x34, 0x4d, 0x61, 0x37, + 0x06, 0x65, 0x07, 0x4d, 0x9a, 0x02, 0xa5, 0x24, 0x66, 0xcd, 0x78, 0x5f, 0x58, 0x52, 0x82, 0x75, + 0xeb, 0xa5, 0x87, 0x02, 0x3d, 0xf4, 0xd4, 0x5b, 0xd1, 0x9e, 0x8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, 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, } diff --git a/pkg/apis/apps/v1beta1/generated.proto b/pkg/apis/apps/v1beta1/generated.proto index 537ae2d520a..86991978869 100644 --- a/pkg/apis/apps/v1beta1/generated.proto +++ b/pkg/apis/apps/v1beta1/generated.proto @@ -294,7 +294,7 @@ message StatefulSetList { // A StatefulSetSpec is the specification of a StatefulSet. 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 // same Template, but individual replicas also have a consistent identity. // If unspecified, defaults to 1. @@ -302,19 +302,19 @@ message StatefulSetSpec { // +optional 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. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // +optional 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 // will fulfill this Template, but have a unique identity from the rest // of the StatefulSet. 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 // 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 @@ -324,21 +324,32 @@ message StatefulSetSpec { // +optional 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 // 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. 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. message StatefulSetStatus { - // most recent generation observed by this StatefulSet. + // observedGeneration is the most recent generation observed by this StatefulSet. // +optional optional int64 observedGeneration = 1; - // Replicas is the number of actual replicas. + // replicas is the number of actual replicas. optional int32 replicas = 2; } diff --git a/pkg/apis/apps/v1beta1/types.generated.go b/pkg/apis/apps/v1beta1/types.generated.go index 93fa390ed1b..db45c0fa258 100644 --- a/pkg/apis/apps/v1beta1/types.generated.go +++ b/pkg/apis/apps/v1beta1/types.generated.go @@ -1340,6 +1340,32 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 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) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -1354,15 +1380,16 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool + var yyq2 [6]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.Replicas != nil yyq2[1] = x.Selector != nil yyq2[3] = len(x.VolumeClaimTemplates) != 0 + yyq2[5] = x.PodManagementPolicy != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) + r.EncodeArrayStart(6) } else { yynn2 = 2 for _, b := range yyq2 { @@ -1506,6 +1533,21 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { 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 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -1631,6 +1673,13 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { *((*string)(yyv11)) = r.DecodeString() } } + case "podManagementPolicy": + if r.TryDecodeAsNil() { + x.PodManagementPolicy = "" + } else { + yyv13 := &x.PodManagementPolicy + yyv13.CodecDecodeSelf(d) + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -1642,16 +1691,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1664,20 +1713,20 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Replicas == nil { x.Replicas = new(int32) } - yym15 := z.DecBinary() - _ = yym15 + yym16 := z.DecBinary() + _ = yym16 if false { } else { *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1690,21 +1739,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Selector == nil { x.Selector = new(pkg1_v1.LabelSelector) } - yym17 := z.DecBinary() - _ = yym17 + yym18 := z.DecBinary() + _ = yym18 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { z.DecFallback(x.Selector, false) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1712,16 +1761,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Template = pkg3_v1.PodTemplateSpec{} } else { - yyv18 := &x.Template - yyv18.CodecDecodeSelf(d) + yyv19 := &x.Template + yyv19.CodecDecodeSelf(d) } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1729,21 +1778,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.VolumeClaimTemplates = nil } else { - yyv19 := &x.VolumeClaimTemplates - yym20 := z.DecBinary() - _ = yym20 + yyv20 := &x.VolumeClaimTemplates + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv19), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv20), d) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1751,26 +1800,43 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ServiceName = "" } else { - yyv21 := &x.ServiceName - yym22 := z.DecBinary() - _ = yym22 + yyv22 := &x.ServiceName + yym23 := z.DecBinary() + _ = yym23 if false { } 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 { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6166,7 +6232,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 896) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 912) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/pkg/apis/apps/v1beta1/types.go b/pkg/apis/apps/v1beta1/types.go index f4dc08a276b..e3cb013acda 100644 --- a/pkg/apis/apps/v1beta1/types.go +++ b/pkg/apis/apps/v1beta1/types.go @@ -95,9 +95,24 @@ type StatefulSet struct { 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. 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 // same Template, but individual replicas also have a consistent identity. // If unspecified, defaults to 1. @@ -105,19 +120,19 @@ type StatefulSetSpec struct { // +optional 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. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // +optional 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 // will fulfill this Template, but have a unique identity from the rest // of the StatefulSet. 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 // 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 @@ -127,21 +142,32 @@ type StatefulSetSpec struct { // +optional 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 // 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 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. type StatefulSetStatus struct { - // most recent generation observed by this StatefulSet. + // observedGeneration is the most recent generation observed by this StatefulSet. // +optional 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"` } diff --git a/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go b/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go index 15c73ae9598..f40254cb749 100644 --- a/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go +++ b/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go @@ -184,11 +184,12 @@ func (StatefulSetList) SwaggerDoc() map[string]string { var map_StatefulSetSpec = map[string]string{ "": "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.", - "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.", - "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.", + "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", + "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.", + "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 { @@ -197,8 +198,8 @@ func (StatefulSetSpec) SwaggerDoc() map[string]string { var map_StatefulSetStatus = map[string]string{ "": "StatefulSetStatus represents the current state of a StatefulSet.", - "observedGeneration": "most recent generation observed by this StatefulSet.", - "replicas": "Replicas is the number of actual replicas.", + "observedGeneration": "observedGeneration is the most recent generation observed by this StatefulSet.", + "replicas": "replicas is the number of actual replicas.", } func (StatefulSetStatus) SwaggerDoc() map[string]string { diff --git a/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/pkg/apis/apps/v1beta1/zz_generated.conversion.go index 02d7da15f87..18994b66dd7 100644 --- a/pkg/apis/apps/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/apps/v1beta1/zz_generated.conversion.go @@ -133,6 +133,7 @@ func autoConvert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSet } out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) out.ServiceName = in.ServiceName + out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy) 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.ServiceName = in.ServiceName + out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy) return nil } diff --git a/pkg/apis/apps/validation/validation.go b/pkg/apis/apps/validation/validation.go index c4b7c7e8f0f..413f4baa4cd 100644 --- a/pkg/apis/apps/validation/validation.go +++ b/pkg/apis/apps/validation/validation.go @@ -17,6 +17,7 @@ limitations under the License. package validation import ( + "fmt" "reflect" 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 { 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"))...) if spec.Selector == nil { allErrs = append(allErrs, field.Required(fldPath.Child("selector"), "")) diff --git a/pkg/apis/apps/validation/validation_test.go b/pkg/apis/apps/validation/validation_test.go index 6efff4b552d..2aa31cd72f7 100644 --- a/pkg/apis/apps/validation/validation_test.go +++ b/pkg/apis/apps/validation/validation_test.go @@ -55,15 +55,17 @@ func TestValidateStatefulSet(t *testing.T) { { ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, { ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, } @@ -77,41 +79,47 @@ func TestValidateStatefulSet(t *testing.T) { "zero-length ID": { ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, "missing-namespace": { ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, "empty selector": { ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Template: validPodTemplate.Template, }, }, "selector_doesnt_match": { ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, + Template: validPodTemplate.Template, }, }, "invalid manifest": { ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "negative_replicas": { ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Replicas: -1, - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Replicas: -1, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "invalid_label": { @@ -123,8 +131,9 @@ func TestValidateStatefulSet(t *testing.T) { }, }, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, "invalid_label 2": { @@ -136,7 +145,8 @@ func TestValidateStatefulSet(t *testing.T) { }, }, Spec: apps.StatefulSetSpec{ - Template: invalidPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Template: invalidPodTemplate.Template, }, }, "invalid_annotation": { @@ -148,8 +158,9 @@ func TestValidateStatefulSet(t *testing.T) { }, }, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, "invalid restart policy 1": { @@ -158,7 +169,8 @@ func TestValidateStatefulSet(t *testing.T) { Namespace: metav1.NamespaceDefault, }, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: api.PodTemplateSpec{ Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, @@ -177,7 +189,8 @@ func TestValidateStatefulSet(t *testing.T) { Namespace: metav1.NamespaceDefault, }, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: api.PodTemplateSpec{ Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyNever, @@ -263,16 +276,18 @@ func TestValidateStatefulSetUpdate(t *testing.T) { old: apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + 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, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Replicas: 3, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, }, @@ -296,9 +311,45 @@ func TestValidateStatefulSetUpdate(t *testing.T) { update: apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, 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}, - 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{ ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Replicas: 1, - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: readWriteVolumePodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Replicas: 1, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: readWriteVolumePodTemplate.Template, }, }, }, @@ -330,9 +382,10 @@ func TestValidateStatefulSetUpdate(t *testing.T) { update: apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Replicas: 2, - Selector: &metav1.LabelSelector{MatchLabels: invalidLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Replicas: 2, + Selector: &metav1.LabelSelector{MatchLabels: invalidLabels}, + Template: validPodTemplate.Template, }, }, }, @@ -340,8 +393,9 @@ func TestValidateStatefulSetUpdate(t *testing.T) { old: apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ @@ -364,9 +418,10 @@ func TestValidateStatefulSetUpdate(t *testing.T) { update: apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Replicas: -1, - Selector: &metav1.LabelSelector{MatchLabels: validLabels}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Replicas: -1, + Selector: &metav1.LabelSelector{MatchLabels: validLabels}, + Template: validPodTemplate.Template, }, }, }, diff --git a/pkg/controller/statefulset/BUILD b/pkg/controller/statefulset/BUILD index 50e89fe0718..dd64bae616d 100644 --- a/pkg/controller/statefulset/BUILD +++ b/pkg/controller/statefulset/BUILD @@ -56,9 +56,11 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ + "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/api/v1/pod: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/informers/informers_generated/externalversions:go_default_library", "//pkg/client/informers/informers_generated/externalversions/apps/v1beta1:go_default_library", diff --git a/pkg/controller/statefulset/stateful_set_control.go b/pkg/controller/statefulset/stateful_set_control.go index 026b243a875..a0923d45bbc 100644 --- a/pkg/controller/statefulset/stateful_set_control.go +++ b/pkg/controller/statefulset/stateful_set_control.go @@ -50,6 +50,12 @@ type defaultStatefulSetControl struct { 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 { replicaCount := int(*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 } + monotonic := !allowsBurst(set) + // Examine each replica with respect to its ordinal for i := range replicas { // delete and recreate failed pods @@ -128,23 +136,29 @@ func (ssc *defaultStatefulSetControl) UpdateStatefulSet(set *apps.StatefulSet, p } 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]) { - 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 - // completes before we continue to make progress. - if isTerminating(replicas[i]) { - glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to Terminate", - set.Name, replicas[i].Name) + // completes before we continue to make progress. + if isTerminating(replicas[i]) && monotonic { + glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to Terminate", set.Name, replicas[i].Name) return nil } // 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 // ordinal, are Running and Ready. - if !isRunningAndReady(replicas[i]) { - glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to be Running and Ready", - set.Name, replicas[i].Name) + if !isRunningAndReady(replicas[i]) && monotonic { + glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to be Running and Ready", set.Name, replicas[i].Name) return nil } // 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 terminate Pods in a monotonically decreasing order over [len(pods),set.Spec.Replicas). // 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) 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]) - 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 } diff --git a/pkg/controller/statefulset/stateful_set_utils.go b/pkg/controller/statefulset/stateful_set_utils.go index 12bc47827a6..88bc8eb102f 100644 --- a/pkg/controller/statefulset/stateful_set_utils.go +++ b/pkg/controller/statefulset/stateful_set_utils.go @@ -227,6 +227,11 @@ func isHealthy(pod *v1.Pod) bool { 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. func newControllerRef(set *apps.StatefulSet) *metav1.OwnerReference { blockOwnerDeletion := true diff --git a/pkg/registry/apps/statefulset/storage/storage_test.go b/pkg/registry/apps/statefulset/storage/storage_test.go index 1ddc6984f31..070e75781cf 100644 --- a/pkg/registry/apps/statefulset/storage/storage_test.go +++ b/pkg/registry/apps/statefulset/storage/storage_test.go @@ -58,7 +58,8 @@ func validNewStatefulSet() *apps.StatefulSet { Labels: map[string]string{"a": "b"}, }, 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{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, diff --git a/pkg/registry/apps/statefulset/strategy_test.go b/pkg/registry/apps/statefulset/strategy_test.go index 8769037bc72..34010031b46 100644 --- a/pkg/registry/apps/statefulset/strategy_test.go +++ b/pkg/registry/apps/statefulset/strategy_test.go @@ -51,8 +51,9 @@ func TestStatefulSetStrategy(t *testing.T) { ps := &apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: validSelector}, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: &metav1.LabelSelector{MatchLabels: validSelector}, + Template: validPodTemplate.Template, }, Status: apps.StatefulSetStatus{Replicas: 3}, } @@ -70,8 +71,9 @@ func TestStatefulSetStrategy(t *testing.T) { validPs := &apps.StatefulSet{ ObjectMeta: metav1.ObjectMeta{Name: ps.Name, Namespace: ps.Namespace, ResourceVersion: "1", Generation: 1}, Spec: apps.StatefulSetSpec{ - Selector: ps.Spec.Selector, - Template: validPodTemplate.Template, + PodManagementPolicy: apps.OrderedReadyPodManagement, + Selector: ps.Spec.Selector, + Template: validPodTemplate.Template, }, Status: apps.StatefulSetStatus{Replicas: 4}, } diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/types.go b/staging/src/k8s.io/client-go/pkg/apis/apps/types.go index 9b9b2d1bbe7..08a0d9a3970 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/types.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/types.go @@ -44,6 +44,21 @@ type StatefulSet struct { 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. type StatefulSetSpec struct { // 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 // where "pod-specific-string" is managed by the StatefulSet controller. 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. diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go index 6631cd37ad1..9ab3ce2b09e 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go @@ -110,6 +110,7 @@ func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec out.VolumeClaimTemplates = nil } out.ServiceName = in.ServiceName + out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy) return nil } @@ -140,6 +141,7 @@ func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSe out.VolumeClaimTemplates = nil } out.ServiceName = in.ServiceName + out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy) return nil } diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go index def2bab711d..52b881d6644 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go @@ -27,6 +27,9 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error { } func SetDefaults_StatefulSet(obj *StatefulSet) { + if len(obj.Spec.PodManagementPolicy) == 0 { + obj.Spec.PodManagementPolicy = OrderedReadyPodManagement + } labels := obj.Spec.Template.Labels if labels != nil { if obj.Spec.Selector == nil { diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go index 32b6f40efa5..39b91937a39 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go @@ -788,6 +788,10 @@ func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(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 } @@ -1068,6 +1072,8 @@ func (m *StatefulSetSpec) Size() (n int) { } l = len(m.ServiceName) n += 1 + l + sovGenerated(uint64(l)) + l = len(m.PodManagementPolicy) + n += 1 + l + sovGenerated(uint64(l)) 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) + `,`, `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) + `,`, + `PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`, `}`, }, "") return s @@ -3635,6 +3642,35 @@ func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error { } m.ServiceName = string(dAtA[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: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3855,101 +3891,103 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1525 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x5b, 0xc5, - 0x17, 0xce, 0x4d, 0xec, 0xc4,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, 0x4e, 0x6d, 0xe2, 0x75, 0xa3, - 0x90, 0x2c, 0xc2, 0x71, 0xb9, 0x93, 0x8a, 0x66, 0xb5, 0x3c, 0x0c, 0xe5, 0xb5, 0x6d, 0x4e, 0x2d, - 0x92, 0x02, 0xbc, 0x77, 0x14, 0x80, 0x35, 0x9e, 0x13, 0x0b, 0xa7, 0x70, 0x57, 0x86, 0xe1, 0xda, - 0x9c, 0x9a, 0x65, 0x6a, 0x73, 0xc6, 0xbd, 0x14, 0x28, 0xb6, 0x26, 0x46, 0xbc, 0x0e, 0xf1, 0xa2, - 0x05, 0x91, 0x5d, 0x6c, 0xb9, 0x26, 0x19, 0xb4, 0xa6, 0x8b, 0x43, 0x8f, 0x66, 0x90, 0xf5, 0x07, - 0x87, 0x1c, 0x24, 0xd9, 0xe5, 0xc4, 0x66, 0xd4, 0xb1, 0x87, 0x1e, 0x67, 0xe9, 0xe7, 0x49, 0x00, - 0xee, 0x10, 0xd7, 0x74, 0xba, 0x16, 0xb1, 0x39, 0xfc, 0x12, 0xe4, 0xc4, 0x56, 0x37, 0x31, 0xc7, - 0x05, 0xed, 0x8c, 0x76, 0x7e, 0x6e, 0xfd, 0x1d, 0x5d, 0x1d, 0x78, 0x7c, 0xe5, 0xd1, 0x91, 0x0b, - 0x6b, 0xbd, 0x73, 0x59, 0x7f, 0x50, 0x7f, 0x41, 0x1a, 0x7c, 0x9b, 0x70, 0x5c, 0x81, 0x7b, 0xfb, - 0x6b, 0x13, 0xbd, 0xfd, 0x35, 0x10, 0x8d, 0xa1, 0x90, 0x15, 0x3e, 0x06, 0x19, 0xe6, 0x92, 0x46, - 0x61, 0x52, 0xb2, 0x5f, 0xd3, 0x47, 0x94, 0x93, 0x1e, 0x05, 0x59, 0x75, 0x49, 0xa3, 0x72, 0x42, - 0x39, 0xc9, 0x88, 0x2f, 0x24, 0x29, 0x21, 0x06, 0xd3, 0x8c, 0x63, 0xde, 0x66, 0x85, 0x29, 0x49, - 0x7e, 0x63, 0x1c, 0x72, 0x49, 0x50, 0xc9, 0x2b, 0xfa, 0x69, 0xff, 0x1b, 0x29, 0xe2, 0xd2, 0xc1, - 0x14, 0x58, 0x8a, 0x8c, 0x6f, 0x3b, 0x76, 0x93, 0x72, 0xea, 0xd8, 0x70, 0x03, 0x64, 0x78, 0xd7, - 0x25, 0x72, 0xcf, 0x66, 0x2b, 0xe7, 0x82, 0xe0, 0x6a, 0x5d, 0x97, 0xbc, 0xde, 0x5f, 0x5b, 0x19, - 0x00, 0x11, 0x53, 0x48, 0x82, 0xe0, 0xa3, 0x30, 0xee, 0x49, 0x09, 0xbf, 0x95, 0x74, 0xfe, 0x7a, - 0x7f, 0xed, 0x50, 0x49, 0xe8, 0x21, 0x67, 0x32, 0x58, 0x78, 0x16, 0x4c, 0x7b, 0x04, 0x33, 0xc7, - 0x2e, 0x64, 0x24, 0x6f, 0xb8, 0x28, 0x24, 0x47, 0x91, 0x9a, 0x85, 0x17, 0xc0, 0x8c, 0x45, 0x18, - 0xc3, 0x06, 0x29, 0x64, 0xa5, 0xe1, 0x82, 0x32, 0x9c, 0xd9, 0xf6, 0x87, 0x51, 0x30, 0x0f, 0x5f, - 0x80, 0xbc, 0x89, 0x19, 0xdf, 0x71, 0x9b, 0x98, 0x93, 0x1a, 0xb5, 0x48, 0x61, 0x5a, 0x6e, 0xf5, - 0xdb, 0xa3, 0xa9, 0x44, 0x20, 0x2a, 0xa7, 0x14, 0x7b, 0x7e, 0x2b, 0xc1, 0x84, 0xfa, 0x98, 0x61, - 0x07, 0x40, 0x31, 0x52, 0xf3, 0xb0, 0xcd, 0xfc, 0x2d, 0x13, 0xfe, 0x66, 0x8e, 0xed, 0x6f, 0x55, - 0xf9, 0x83, 0x5b, 0x29, 0x36, 0x34, 0xc0, 0x43, 0x69, 0x4f, 0x03, 0xf9, 0xe8, 0xc0, 0xb6, 0x28, - 0xe3, 0xf0, 0x69, 0x2a, 0x2d, 0xf4, 0xd1, 0x02, 0x10, 0x68, 0x99, 0x14, 0x27, 0x55, 0x10, 0xb9, - 0x60, 0x24, 0x96, 0x12, 0x9f, 0x81, 0x2c, 0xe5, 0xc4, 0x12, 0xc7, 0x3f, 0x75, 0x7e, 0x6e, 0xfd, - 0xca, 0x18, 0xb2, 0xad, 0xcc, 0x2b, 0xfe, 0xec, 0x7d, 0xc1, 0x84, 0x7c, 0xc2, 0xd2, 0xb7, 0x53, - 0x00, 0x46, 0x46, 0xc8, 0x31, 0xcd, 0x3a, 0x6e, 0xb4, 0xe0, 0x19, 0x90, 0xb1, 0xb1, 0x15, 0xa8, - 0x35, 0x4c, 0xa5, 0x4f, 0xb1, 0x45, 0x90, 0x9c, 0x81, 0x3f, 0x6a, 0x00, 0xb6, 0xe5, 0x51, 0x34, - 0x37, 0x6d, 0xdb, 0xe1, 0x58, 0xec, 0x4e, 0x10, 0x60, 0x75, 0x8c, 0x00, 0x03, 0xdf, 0xfa, 0x4e, - 0x8a, 0xf5, 0xae, 0xcd, 0xbd, 0x6e, 0x74, 0x4a, 0x69, 0x03, 0x34, 0x20, 0x14, 0xd8, 0x02, 0xc0, - 0x53, 0x9c, 0x35, 0x47, 0x25, 0xfc, 0xe8, 0xd5, 0x24, 0x08, 0xe7, 0xb6, 0x63, 0x3f, 0xa3, 0x46, - 0x54, 0xb2, 0x50, 0x48, 0x89, 0x62, 0xf4, 0xab, 0x77, 0xc1, 0xca, 0x90, 0xb8, 0xe1, 0x49, 0x30, - 0xd5, 0x22, 0x5d, 0x7f, 0x2b, 0x91, 0xf8, 0x09, 0x97, 0x41, 0xb6, 0x83, 0xcd, 0x36, 0xf1, 0xb3, - 0x19, 0xf9, 0x1f, 0x37, 0x27, 0xaf, 0x6b, 0xa5, 0x3f, 0xb3, 0x71, 0x65, 0x89, 0xca, 0x05, 0xcf, - 0x83, 0x9c, 0x47, 0x5c, 0x93, 0x36, 0x30, 0x93, 0x1c, 0xd9, 0xca, 0x09, 0xa1, 0x12, 0xa4, 0xc6, - 0x50, 0x38, 0x0b, 0xbf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c7, 0x41, 0x71, 0xe2, - 0xab, 0x5e, 0x51, 0xdb, 0xeb, 0x15, 0xb5, 0x97, 0xbd, 0xa2, 0xf6, 0x57, 0xaf, 0xa8, 0x7d, 0xf7, - 0xaa, 0x38, 0xf1, 0x64, 0x46, 0x29, 0xf2, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xb9, 0xde, - 0x1a, 0x56, 0x15, 0x00, 0x00, + // 1563 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x1b, 0x37, + 0x13, 0xf7, 0xda, 0x92, 0x2d, 0xd3, 0xb1, 0x1c, 0xd3, 0xfe, 0x62, 0x7d, 0xce, 0x07, 0x39, 0xd0, + 0x21, 0x8f, 0x0f, 0xc9, 0xaa, 0x71, 0xd2, 0xbc, 0xdc, 0x06, 0xb5, 0x92, 0x34, 0x4d, 0x61, 0x37, + 0x06, 0x65, 0x07, 0x4d, 0x9a, 0x02, 0xa5, 0x24, 0x66, 0xcd, 0x78, 0x5f, 0x58, 0x52, 0x82, 0x75, + 0xeb, 0xa5, 0x87, 0x02, 0x3d, 0xf4, 0xd4, 0x5b, 0xd1, 0x9e, 0x8b, 0x02, 0xfd, 0x37, 0x8c, 0xf6, + 0x92, 0x63, 0xd1, 0x83, 0x51, 0x3b, 0xff, 0x45, 0x4e, 0x05, 0xb9, 0xdc, 0x97, 0x76, 0x65, 0xcb, + 0x2a, 0x9a, 0x4b, 0x6f, 0x5a, 0xce, 0xfc, 0x7e, 0x33, 0x24, 0x67, 0x86, 0x33, 0x02, 0x37, 0x77, + 0x6e, 0x31, 0x9d, 0x3a, 0xd5, 0x9d, 0x76, 0x83, 0x78, 0x36, 0xe1, 0x84, 0x55, 0xdd, 0x1d, 0xa3, + 0x8a, 0x5d, 0xca, 0xaa, 0xd8, 0x75, 0x59, 0xb5, 0x73, 0xb5, 0x41, 0x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 0xb6, 0xde, 0xb9, 0xaa, 0x3f, 0x6e, 0xbc, 0x24, 0x4d, 0xbe, 0x4e, 0x38, 0xae, 0xc1, 0xbd, 0xfd, + 0xa5, 0x91, 0xc3, 0xfd, 0x25, 0x10, 0xad, 0xa1, 0x90, 0x15, 0x3e, 0x05, 0x39, 0xe6, 0x92, 0x66, + 0x69, 0x54, 0xb2, 0xdf, 0xd4, 0x07, 0x0c, 0x27, 0x3d, 0x72, 0xb2, 0xee, 0x92, 0x66, 0xed, 0x94, + 0x32, 0x92, 0x13, 0x5f, 0x48, 0x52, 0x42, 0x0c, 0xc6, 0x19, 0xc7, 0xbc, 0xcd, 0x4a, 0x63, 0x92, + 0xfc, 0xf6, 0x30, 0xe4, 0x92, 0xa0, 0x56, 0x54, 0xf4, 0xe3, 0xfe, 0x37, 0x52, 0xc4, 0x95, 0x83, + 0x31, 0x30, 0x17, 0x29, 0xdf, 0x73, 0xec, 0x16, 0xe5, 0xd4, 0xb1, 0xe1, 0x0a, 0xc8, 0xf1, 0xae, + 0x4b, 0xe4, 0x99, 0x4d, 0xd6, 0x2e, 0x04, 0xce, 0x6d, 0x76, 0x5d, 0xf2, 0x66, 0x7f, 0x69, 0x21, + 0x03, 0x22, 0x44, 0x48, 0x82, 0xe0, 0x93, 0xd0, 0xef, 0x51, 0x09, 0xbf, 0x9b, 0x34, 0xfe, 0x66, + 0x7f, 0xe9, 0xc8, 0x90, 0xd0, 0x43, 0xce, 0xa4, 0xb3, 0xf0, 0x3c, 0x18, 0xf7, 0x08, 0x66, 0x8e, + 0x5d, 0xca, 0x49, 0xde, 0x70, 0x53, 0x48, 0xae, 0x22, 0x25, 0x85, 0x97, 0xc0, 0x84, 0x45, 0x18, + 0xc3, 0x06, 0x29, 0xe5, 0xa5, 0xe2, 0x8c, 0x52, 0x9c, 0x58, 0xf7, 0x97, 0x51, 0x20, 0x87, 0x2f, + 0x41, 0xd1, 0xc4, 0x8c, 0x6f, 0xb9, 0x2d, 0xcc, 0xc9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3c, 0x46, 0x19, 0x27, 0x36, 0x7f, 0x12, 0x71, + 0xd4, 0xfe, 0xa7, 0xec, 0xcd, 0x3f, 0xc9, 0x20, 0x46, 0x99, 0xe6, 0xe0, 0xbb, 0x60, 0x4a, 0x34, + 0x72, 0xb4, 0x49, 0xc4, 0x74, 0xa9, 0xfe, 0x5f, 0x98, 0x53, 0x44, 0x53, 0xf5, 0x48, 0x84, 0xe2, + 0x7a, 0x70, 0x1b, 0xcc, 0xb9, 0x4e, 0x6b, 0x1d, 0xdb, 0xd8, 0x20, 0xe2, 0x69, 0xdc, 0x70, 0x4c, + 0xda, 0xec, 0xca, 0x0e, 0x7c, 0xb2, 0x76, 0x23, 0xe8, 0x98, 0x36, 0xd2, 0x2a, 0x6f, 0x44, 0xeb, + 0x9a, 0x5e, 0x96, 0xbd, 0x43, 0x16, 0x65, 0xe5, 0x6b, 0x0d, 0xcc, 0xa6, 0xb2, 0x03, 0x7e, 0x78, + 0x44, 0xdf, 0x7a, 0xe6, 0x9f, 0xea, 0x59, 0x6b, 0x97, 0xf6, 0x0e, 0xca, 0x23, 0xaf, 0x0e, 0xca, + 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, } diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto index 537ae2d520a..86991978869 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto @@ -294,7 +294,7 @@ message StatefulSetList { // A StatefulSetSpec is the specification of a StatefulSet. 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 // same Template, but individual replicas also have a consistent identity. // If unspecified, defaults to 1. @@ -302,19 +302,19 @@ message StatefulSetSpec { // +optional 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. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // +optional 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 // will fulfill this Template, but have a unique identity from the rest // of the StatefulSet. 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 // 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 @@ -324,21 +324,32 @@ message StatefulSetSpec { // +optional 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 // 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. 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. message StatefulSetStatus { - // most recent generation observed by this StatefulSet. + // observedGeneration is the most recent generation observed by this StatefulSet. // +optional optional int64 observedGeneration = 1; - // Replicas is the number of actual replicas. + // replicas is the number of actual replicas. optional int32 replicas = 2; } diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go index 50a9d81e58f..72d486de83c 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go @@ -1340,6 +1340,32 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 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) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -1354,15 +1380,16 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool + var yyq2 [6]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.Replicas != nil yyq2[1] = x.Selector != nil yyq2[3] = len(x.VolumeClaimTemplates) != 0 + yyq2[5] = x.PodManagementPolicy != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) + r.EncodeArrayStart(6) } else { yynn2 = 2 for _, b := range yyq2 { @@ -1506,6 +1533,21 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { 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 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -1631,6 +1673,13 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { *((*string)(yyv11)) = r.DecodeString() } } + case "podManagementPolicy": + if r.TryDecodeAsNil() { + x.PodManagementPolicy = "" + } else { + yyv13 := &x.PodManagementPolicy + yyv13.CodecDecodeSelf(d) + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -1642,16 +1691,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1664,20 +1713,20 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Replicas == nil { x.Replicas = new(int32) } - yym15 := z.DecBinary() - _ = yym15 + yym16 := z.DecBinary() + _ = yym16 if false { } else { *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1690,21 +1739,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Selector == nil { x.Selector = new(pkg1_v1.LabelSelector) } - yym17 := z.DecBinary() - _ = yym17 + yym18 := z.DecBinary() + _ = yym18 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { z.DecFallback(x.Selector, false) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1712,16 +1761,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Template = pkg3_v1.PodTemplateSpec{} } else { - yyv18 := &x.Template - yyv18.CodecDecodeSelf(d) + yyv19 := &x.Template + yyv19.CodecDecodeSelf(d) } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1729,21 +1778,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.VolumeClaimTemplates = nil } else { - yyv19 := &x.VolumeClaimTemplates - yym20 := z.DecBinary() - _ = yym20 + yyv20 := &x.VolumeClaimTemplates + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv19), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv20), d) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1751,26 +1800,43 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ServiceName = "" } else { - yyv21 := &x.ServiceName - yym22 := z.DecBinary() - _ = yym22 + yyv22 := &x.ServiceName + yym23 := z.DecBinary() + _ = yym23 if false { } 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 { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6166,7 +6232,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 896) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 912) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go index ee80fbc34f6..cd1d2c2f205 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go @@ -95,9 +95,24 @@ type StatefulSet struct { 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. 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 // same Template, but individual replicas also have a consistent identity. // If unspecified, defaults to 1. @@ -105,19 +120,19 @@ type StatefulSetSpec struct { // +optional 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. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // +optional 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 // will fulfill this Template, but have a unique identity from the rest // of the StatefulSet. 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 // 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 @@ -127,21 +142,32 @@ type StatefulSetSpec struct { // +optional 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 // 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 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. type StatefulSetStatus struct { - // most recent generation observed by this StatefulSet. + // observedGeneration is the most recent generation observed by this StatefulSet. // +optional 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"` } diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go index 15c73ae9598..f40254cb749 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go @@ -184,11 +184,12 @@ func (StatefulSetList) SwaggerDoc() map[string]string { var map_StatefulSetSpec = map[string]string{ "": "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.", - "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.", - "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.", + "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", + "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.", + "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 { @@ -197,8 +198,8 @@ func (StatefulSetSpec) SwaggerDoc() map[string]string { var map_StatefulSetStatus = map[string]string{ "": "StatefulSetStatus represents the current state of a StatefulSet.", - "observedGeneration": "most recent generation observed by this StatefulSet.", - "replicas": "Replicas is the number of actual replicas.", + "observedGeneration": "observedGeneration is the most recent generation observed by this StatefulSet.", + "replicas": "replicas is the number of actual replicas.", } func (StatefulSetStatus) SwaggerDoc() map[string]string { diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go index 55e36637fa9..87ce6d4c010 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go @@ -133,6 +133,7 @@ func autoConvert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSet } out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) out.ServiceName = in.ServiceName + out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy) 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.ServiceName = in.ServiceName + out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy) return nil }