diff --git a/pkg/apis/apps/types.go b/pkg/apis/apps/types.go index 656c8e30..04e9b500 100644 --- a/pkg/apis/apps/types.go +++ b/pkg/apis/apps/types.go @@ -60,6 +60,54 @@ const ( ParallelPodManagement = "Parallel" ) +// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. +type StatefulSetUpdateStrategy struct { + // Type indicates the type of the StatefulSetUpdateStrategy. + Type StatefulSetUpdateStrategyType + // Partition is used to communicate the ordinal at which to partition + // the StatefulSet when Type is PartitionStatefulSetStrategyType. This + // value must be set when Type is PartitionStatefulSetStrategyType, + // and it must be nil otherwise. + Partition *PartitionStatefulSetStrategy +} + +// StatefulSetUpdateStrategyType is a string enumeration type that enumerates +// all possible update strategies for the StatefulSet controller. +type StatefulSetUpdateStrategyType string + +const ( + // PartitionStatefulSetStrategyType indicates that updates will only be + // applied to a partition of the StatefulSet. This is useful for canaries + // and phased roll outs. When a scale operation is performed with this + // strategy, new Pods will be created from the specification version indicated + // by the StatefulSet's currentRevision if there ordinal is less than the supplied + // Partition's ordinal. Otherwise, they will be created from the specification + // version indicated by the StatefulSet's updateRevision. + PartitionStatefulSetStrategyType StatefulSetUpdateStrategyType = "Partition" + // RollingUpdateStatefulSetStrategyType indicates that update will be + // applied to all Pods in the StatefulSet with respect to the StatefulSet + // ordering constraints. When a scale operation is performed with this + // strategy, new Pods will be created from the specification version indicated + // by the StatefulSet's updateRevision. + RollingUpdateStatefulSetStrategyType = "RollingUpdate" + // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version + // tracking and ordered rolling restarts are disabled. Pods are recreated + // from the StatefulSetSpec when they are manually deleted. When a scale + // operation is performed with this strategy,specification version indicated + // by the StatefulSet's currentRevision. + OnDeleteStatefulSetStrategyType = "OnDelete" +) + +// PartitionStatefulSetStrategy contains the parameters used with the +// PartitionStatefulSetStrategyType. +type PartitionStatefulSetStrategy struct { + // Ordinal indicates the ordinal at which the StatefulSet should be + // partitioned. + Ordinal int32 +} + // A StatefulSetSpec is the specification of a StatefulSet. type StatefulSetSpec struct { // Replicas is the desired number of replicas of the given Template. @@ -109,16 +157,47 @@ type StatefulSetSpec struct { // all pods at once. // +optional PodManagementPolicy PodManagementPolicyType + + // updateStrategy indicates the StatefulSetUpdateStrategy that will be + // employed to update Pods in the StatefulSet when a revision is made to + // Template. + UpdateStrategy StatefulSetUpdateStrategy + + // revisionHistoryLimit is the maximum number of revisions that will + // be maintained in the StatefulSet's revision history. The revision history + // consists of all revisions not represented by a currently applied + // StatefulSetSpec version. The default value is 10. + RevisionHistoryLimit *int32 } // 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 for this StatefulSet. It corresponds to the + // StatefulSet's generation, which is updated on mutation by the API Server. // +optional ObservedGeneration *int64 - // Replicas is the number of actual replicas. + // replicas is the number of Pods created by the StatefulSet controller. Replicas int32 + + // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. + ReadyReplicas int32 + + // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by currentRevision. + CurrentReplicas int32 + + // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by updateRevision. + UpdatedReplicas int32 + + // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the + // sequence [0,currentReplicas). + CurrentRevision string + + // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence + // [replicas-updatedReplicas,replicas) + UpdateRevision string } // StatefulSetList is a collection of StatefulSets. diff --git a/pkg/apis/apps/v1beta1/conversion.go b/pkg/apis/apps/v1beta1/conversion.go index 9ab3ce2b..95fb06d4 100644 --- a/pkg/apis/apps/v1beta1/conversion.go +++ b/pkg/apis/apps/v1beta1/conversion.go @@ -37,6 +37,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error { err := scheme.AddConversionFuncs( Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec, Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec, + Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy, + Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy, // extensions // TODO: below conversions should be dropped in favor of auto-generated // ones, see https://github.com/kubernetes/kubernetextensionsssues/39865 @@ -109,6 +111,15 @@ func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec } else { out.VolumeClaimTemplates = nil } + if err := Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil { + return err + } + if in.RevisionHistoryLimit != nil { + out.RevisionHistoryLimit = new(int32) + *out.RevisionHistoryLimit = *in.RevisionHistoryLimit + } else { + out.RevisionHistoryLimit = nil + } out.ServiceName = in.ServiceName out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy) return nil @@ -140,8 +151,39 @@ func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSe } else { out.VolumeClaimTemplates = nil } + if in.RevisionHistoryLimit != nil { + out.RevisionHistoryLimit = new(int32) + *out.RevisionHistoryLimit = *in.RevisionHistoryLimit + } else { + out.RevisionHistoryLimit = nil + } out.ServiceName = in.ServiceName out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy) + if err := Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(in *StatefulSetUpdateStrategy, out *apps.StatefulSetUpdateStrategy, s conversion.Scope) error { + out.Type = apps.StatefulSetUpdateStrategyType(in.Type) + if in.Partition != nil { + out.Partition = new(apps.PartitionStatefulSetStrategy) + out.Partition.Ordinal = in.Partition.Ordinal + } else { + out.Partition = nil + } + return nil +} + +func Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(in *apps.StatefulSetUpdateStrategy, out *StatefulSetUpdateStrategy, s conversion.Scope) error { + out.Type = StatefulSetUpdateStrategyType(in.Type) + if in.Partition != nil { + out.Partition = new(PartitionStatefulSetStrategy) + out.Partition.Ordinal = in.Partition.Ordinal + } else { + out.Partition = nil + } return nil } diff --git a/pkg/apis/apps/v1beta1/defaults.go b/pkg/apis/apps/v1beta1/defaults.go index 52b881d6..895c8b90 100644 --- a/pkg/apis/apps/v1beta1/defaults.go +++ b/pkg/apis/apps/v1beta1/defaults.go @@ -30,6 +30,10 @@ func SetDefaults_StatefulSet(obj *StatefulSet) { if len(obj.Spec.PodManagementPolicy) == 0 { obj.Spec.PodManagementPolicy = OrderedReadyPodManagement } + + if obj.Spec.UpdateStrategy.Type == "" { + obj.Spec.UpdateStrategy.Type = OnDeleteStatefulSetStrategyType + } labels := obj.Spec.Template.Labels if labels != nil { if obj.Spec.Selector == nil { @@ -45,6 +49,11 @@ func SetDefaults_StatefulSet(obj *StatefulSet) { obj.Spec.Replicas = new(int32) *obj.Spec.Replicas = 1 } + if obj.Spec.RevisionHistoryLimit == nil { + obj.Spec.RevisionHistoryLimit = new(int32) + *obj.Spec.RevisionHistoryLimit = 10 + } + } // SetDefaults_Deployment sets additional defaults compared to its counterpart diff --git a/pkg/apis/apps/v1beta1/generated.pb.go b/pkg/apis/apps/v1beta1/generated.pb.go index 40cee7e1..26cee982 100644 --- a/pkg/apis/apps/v1beta1/generated.pb.go +++ b/pkg/apis/apps/v1beta1/generated.pb.go @@ -34,6 +34,7 @@ limitations under the License. DeploymentSpec DeploymentStatus DeploymentStrategy + PartitionStatefulSetStrategy RollbackConfig RollingUpdateDeployment Scale @@ -43,6 +44,7 @@ limitations under the License. StatefulSetList StatefulSetSpec StatefulSetStatus + StatefulSetUpdateStrategy */ package v1beta1 @@ -108,43 +110,55 @@ func (m *DeploymentStrategy) Reset() { *m = DeploymentStrateg func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (m *PartitionStatefulSetStrategy) Reset() { *m = PartitionStatefulSetStrategy{} } +func (*PartitionStatefulSetStrategy) ProtoMessage() {} +func (*PartitionStatefulSetStrategy) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{9} +} + func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} -func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{10} + return fileDescriptorGenerated, []int{11} } func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *StatefulSet) Reset() { *m = StatefulSet{} } func (*StatefulSet) ProtoMessage() {} -func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } func (*StatefulSetList) ProtoMessage() {} -func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } +func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } func (*StatefulSetSpec) ProtoMessage() {} -func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } func (*StatefulSetStatus) ProtoMessage() {} -func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } +func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } + +func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } +func (*StatefulSetUpdateStrategy) ProtoMessage() {} +func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{19} +} func init() { proto.RegisterType((*ControllerRevision)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.ControllerRevision") @@ -156,6 +170,7 @@ func init() { proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentSpec") proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentStatus") proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentStrategy") + proto.RegisterType((*PartitionStatefulSetStrategy)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.PartitionStatefulSetStrategy") proto.RegisterType((*RollbackConfig)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.RollbackConfig") proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.RollingUpdateDeployment") proto.RegisterType((*Scale)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.Scale") @@ -165,6 +180,7 @@ func init() { proto.RegisterType((*StatefulSetList)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetList") proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetSpec") proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetStatus") + proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetUpdateStrategy") } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -583,6 +599,27 @@ func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *PartitionStatefulSetStrategy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PartitionStatefulSetStrategy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Ordinal)) + return i, nil +} + func (m *RollbackConfig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -885,6 +922,19 @@ func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodManagementPolicy))) i += copy(dAtA[i:], m.PodManagementPolicy) + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size())) + n27, err := m.UpdateStrategy.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + if m.RevisionHistoryLimit != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit)) + } return i, nil } @@ -911,6 +961,55 @@ func (m *StatefulSetStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x10 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas)) + dAtA[i] = 0x18 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas)) + dAtA[i] = 0x20 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas)) + dAtA[i] = 0x28 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas)) + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CurrentRevision))) + i += copy(dAtA[i:], m.CurrentRevision) + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UpdateRevision))) + i += copy(dAtA[i:], m.UpdateRevision) + return i, nil +} + +func (m *StatefulSetUpdateStrategy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatefulSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + if m.Partition != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Partition.Size())) + n28, err := m.Partition.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + } return i, nil } @@ -1090,6 +1189,13 @@ func (m *DeploymentStrategy) Size() (n int) { return n } +func (m *PartitionStatefulSetStrategy) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Ordinal)) + return n +} + func (m *RollbackConfig) Size() (n int) { var l int _ = l @@ -1195,6 +1301,11 @@ func (m *StatefulSetSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.PodManagementPolicy) n += 1 + l + sovGenerated(uint64(l)) + l = m.UpdateStrategy.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.RevisionHistoryLimit != nil { + n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit)) + } return n } @@ -1205,6 +1316,25 @@ func (m *StatefulSetStatus) Size() (n int) { n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) } n += 1 + sovGenerated(uint64(m.Replicas)) + n += 1 + sovGenerated(uint64(m.ReadyReplicas)) + n += 1 + sovGenerated(uint64(m.CurrentReplicas)) + n += 1 + sovGenerated(uint64(m.UpdatedReplicas)) + l = len(m.CurrentRevision) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UpdateRevision) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *StatefulSetUpdateStrategy) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.Partition != nil { + l = m.Partition.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -1350,6 +1480,16 @@ func (this *DeploymentStrategy) String() string { }, "") return s } +func (this *PartitionStatefulSetStrategy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PartitionStatefulSetStrategy{`, + `Ordinal:` + fmt.Sprintf("%v", this.Ordinal) + `,`, + `}`, + }, "") + return s +} func (this *RollbackConfig) String() string { if this == nil { return "nil" @@ -1449,6 +1589,8 @@ func (this *StatefulSetSpec) String() string { `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) + `,`, + `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "StatefulSetUpdateStrategy", "StatefulSetUpdateStrategy", 1), `&`, ``, 1) + `,`, + `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`, `}`, }, "") return s @@ -1460,6 +1602,22 @@ func (this *StatefulSetStatus) String() string { s := strings.Join([]string{`&StatefulSetStatus{`, `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, + `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`, + `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`, + `CurrentRevision:` + fmt.Sprintf("%v", this.CurrentRevision) + `,`, + `UpdateRevision:` + fmt.Sprintf("%v", this.UpdateRevision) + `,`, + `}`, + }, "") + return s +} +func (this *StatefulSetUpdateStrategy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatefulSetUpdateStrategy{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Partition:` + strings.Replace(fmt.Sprintf("%v", this.Partition), "PartitionStatefulSetStrategy", "PartitionStatefulSetStrategy", 1) + `,`, `}`, }, "") return s @@ -3016,6 +3174,75 @@ func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error { } return nil } +func (m *PartitionStatefulSetStrategy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PartitionStatefulSetStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PartitionStatefulSetStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ordinal", wireType) + } + m.Ordinal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Ordinal |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *RollbackConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4076,6 +4303,56 @@ func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error { } m.PodManagementPolicy = PodManagementPolicyType(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RevisionHistoryLimit = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -4165,6 +4442,233 @@ func (m *StatefulSetStatus) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType) + } + m.ReadyReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReadyReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType) + } + m.CurrentReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType) + } + m.UpdatedReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UpdatedReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentRevision", 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.CurrentRevision = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateRevision", 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.UpdateRevision = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatefulSetUpdateStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatefulSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", 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.Type = StatefulSetUpdateStrategyType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Partition == nil { + m.Partition = &PartitionStatefulSetStrategy{} + } + if err := m.Partition.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -4296,108 +4800,119 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1647 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcf, 0x4f, 0x1b, 0xc7, - 0x17, 0x67, 0x8d, 0x0d, 0x66, 0x08, 0x26, 0x0c, 0x7c, 0xc1, 0x5f, 0x52, 0x19, 0xe4, 0x43, 0x42, - 0xaa, 0x64, 0xdd, 0x90, 0x34, 0x3f, 0xa0, 0x8a, 0x8a, 0x49, 0x9a, 0xa6, 0x82, 0x82, 0xc6, 0x10, - 0x35, 0x69, 0x2a, 0x65, 0xbc, 0x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 0x23, 0x16, 0x2d, 0x66, 0xe6, 0x07, 0x17, 0x46, 0x17, 0x97, 0xd5, 0x3e, 0xab, 0x42, 0x4d, 0x5b, - 0x5b, 0x1d, 0x93, 0x7a, 0x72, 0x0f, 0x39, 0x22, 0xf2, 0x81, 0xcb, 0x3f, 0x67, 0x00, 0xb8, 0x47, - 0x5c, 0xd3, 0x69, 0x5b, 0xc4, 0x66, 0x67, 0x70, 0x95, 0x8f, 0x41, 0x96, 0xba, 0x44, 0x93, 0x57, - 0x79, 0xab, 0x6f, 0x8f, 0x22, 0x23, 0x6b, 0x2e, 0xd1, 0xa2, 0x4b, 0xe5, 0x5f, 0x48, 0x40, 0x42, - 0x0c, 0x86, 0x28, 0xc3, 0xac, 0x49, 0xc5, 0x95, 0x8e, 0x2e, 0xde, 0x39, 0x0d, 0xb8, 0x00, 0xa8, - 0x16, 0x24, 0xfc, 0x90, 0xff, 0x8d, 0x24, 0x70, 0xf9, 0x60, 0x10, 0x4c, 0x46, 0xcc, 0xab, 0x8e, - 0xdd, 0x30, 0x18, 0x2f, 0x81, 0x65, 0x90, 0x65, 0x6d, 0x97, 0x88, 0x98, 0x8d, 0x54, 0x2f, 0x05, - 0xc6, 0x6d, 0xb5, 0x5d, 0xf2, 0x76, 0x7f, 0x6e, 0xa6, 0x8b, 0x08, 0x27, 0x21, 0x21, 0x04, 0x1f, - 0x85, 0x76, 0x67, 0x84, 0xf8, 0xdd, 0xa4, 0xf2, 0xb7, 0xfb, 0x73, 0x47, 0x56, 0xb8, 0x1a, 0x62, - 0x26, 0x8d, 0x85, 0x17, 0xc1, 0x90, 0x47, 0x30, 0x75, 0xec, 0x62, 0x56, 0xe0, 0x86, 0x4e, 0x21, - 0x71, 0x8a, 0x24, 0x15, 0x5e, 0x06, 0xc3, 0x16, 0xa1, 0x14, 0xeb, 0xa4, 0x98, 0x13, 0x8c, 0xe3, - 0x92, 0x71, 0x78, 0xdd, 0x3f, 0x46, 0x01, 0x1d, 0xbe, 0x00, 0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e, 0x83, - 0x31, 0x8f, 0x57, 0x48, 0x68, 0xfa, 0xb0, 0x30, 0xfd, 0x7f, 0x52, 0x6c, 0x0c, 0xc5, 0x89, 0x28, - 0xc9, 0x0b, 0x97, 0x40, 0x41, 0x73, 0x4c, 0x53, 0x54, 0xc6, 0xaa, 0xd3, 0xb4, 0x99, 0x48, 0xee, - 0xc1, 0x2a, 0xe4, 0x33, 0xc0, 0x6a, 0x82, 0x82, 0x3a, 0x38, 0xcb, 0xbf, 0x29, 0xf1, 0x07, 0x2c, - 0x28, 0x77, 0xb8, 0x94, 0x18, 0xb7, 0x2e, 0x76, 0x8c, 0x5b, 0xd3, 0x69, 0x89, 0xd8, 0xb4, 0xd5, - 0x06, 0x63, 0xbc, 0x18, 0x0c, 0x5b, 0xf7, 0x13, 0x40, 0x36, 0xd3, 0x0f, 0x4f, 0x54, 0x6a, 0xa1, - 0x74, 0xec, 0x09, 0x9e, 0x10, 0x91, 0x88, 0x13, 0x51, 0x52, 0x53, 0xf9, 0x2e, 0x28, 0x24, 0xeb, - 0x34, 0xb1, 0x87, 0x28, 0xc7, 0xee, 0x21, 0x6f, 0x14, 0x30, 0xd3, 0x43, 0x3b, 0x34, 0x41, 0xc1, - 0xc2, 0x2f, 0x63, 0x39, 0x74, 0xec, 0xfc, 0xce, 0x57, 0x4a, 0xd5, 0x5f, 0x29, 0xd5, 0x87, 0x36, - 0xdb, 0xf0, 0x6a, 0xcc, 0x33, 0x6c, 0xdd, 0xbf, 0x97, 0xf5, 0x04, 0x16, 0xea, 0xc0, 0x86, 0x4f, - 0x40, 0xde, 0xc2, 0x2f, 0x6b, 0x4d, 0x4f, 0x0f, 0xe2, 0x77, 0x72, 0x3d, 0xe2, 0x25, 0x5a, 0x97, - 0x28, 0x28, 0xc4, 0x2b, 0x7f, 0x9f, 0x01, 0xb9, 0x9a, 0x86, 0x4d, 0x72, 0x06, 0xdb, 0xc8, 0x56, - 0x62, 0x1b, 0x59, 0xec, 0x3b, 0x07, 0x84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80, 0x51, 0x57, 0x75, - 0xf0, 0x7d, 0x30, 0xca, 0x87, 0x40, 0x43, 0x23, 0x7c, 0x33, 0x95, 0xff, 0x4d, 0x4c, 0x4a, 0xa0, - 0xd1, 0x5a, 0x44, 0x42, 0x71, 0x3e, 0xb8, 0x03, 0x26, 0x5d, 0xa7, 0xb1, 0x8e, 0x6d, 0xac, 0x13, - 0xfe, 0x34, 0x6e, 0x8a, 0x3f, 0x35, 0xc5, 0xf4, 0x3e, 0x52, 0xbd, 0x19, 0x4c, 0x5b, 0x9b, 0x69, - 0x96, 0xb7, 0x7c, 0xec, 0x4d, 0x1f, 0x8b, 0xd9, 0xa1, 0x1b, 0x64, 0xf9, 0x1b, 0x05, 0x4c, 0xa4, - 0xaa, 0x03, 0x7e, 0x74, 0xc4, 0xcc, 0x3b, 0xfd, 0x6f, 0xcd, 0xbb, 0xd5, 0xcb, 0x7b, 0x07, 0xa5, - 0x81, 0x57, 0x07, 0xa5, 0x81, 0xd7, 0x07, 0xa5, 0x81, 0xaf, 0x0e, 0x4b, 0xca, 0xde, 0x61, 0x49, - 0x79, 0x75, 0x58, 0x52, 0xfe, 0x3c, 0x2c, 0x29, 0xdf, 0xbd, 0x29, 0x0d, 0x3c, 0x19, 0x96, 0xb9, - 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x5b, 0xd8, 0xe7, 0x95, 0x17, 0x00, 0x00, + // 1818 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x4f, 0x23, 0xc9, + 0x15, 0xa7, 0xfd, 0x07, 0x4c, 0xb1, 0x98, 0xa1, 0x20, 0xe0, 0x65, 0x37, 0x06, 0xf9, 0xb0, 0xcb, + 0x44, 0x4b, 0x3b, 0xc3, 0x4c, 0x76, 0x67, 0x20, 0x1a, 0x85, 0x66, 0xc8, 0x66, 0x22, 0x08, 0xa8, + 0x0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0xc3, 0x1a, 0xa9, 0x95, 0xb9, 0xe2, 0x82, 0x50, 0x9c, 0x39, 0xf2, 0x97, 0x51, 0x20, 0x87, 0x5f, + 0x83, 0xaa, 0x81, 0x3d, 0x7a, 0xe6, 0x74, 0x30, 0x25, 0xa7, 0xba, 0x49, 0x6a, 0xd3, 0xfc, 0xa8, + 0xbf, 0x37, 0x5a, 0x96, 0x30, 0x0b, 0x65, 0x45, 0xa0, 0x57, 0x0f, 0x13, 0x48, 0x28, 0x85, 0x0c, + 0x7b, 0x00, 0xb2, 0x95, 0x53, 0x17, 0x5b, 0x9e, 0x7f, 0x64, 0xcc, 0xdf, 0xcc, 0xd8, 0xfe, 0xd6, + 0x84, 0x3f, 0x78, 0x98, 0x41, 0x43, 0x43, 0x3c, 0x34, 0x2e, 0x25, 0x50, 0x8d, 0x2e, 0xec, 0x0e, + 0xaa, 0xfc, 0xe7, 0xc9, 0x2a, 0x7f, 0x38, 0x41, 0xda, 0xe6, 0x54, 0xf7, 0xef, 0x8a, 0x00, 0x46, + 0x4a, 0xc8, 0x36, 0x8c, 0x36, 0x56, 0x2f, 0xe0, 0x06, 0x28, 0x59, 0xd8, 0x0c, 0xb2, 0x35, 0x2c, + 0xa5, 0x9f, 0x61, 0x93, 0x20, 0x2e, 0x81, 0x7f, 0x94, 0x00, 0xec, 0xf2, 0xab, 0xe8, 0xec, 0x59, + 0x96, 0x4d, 0x31, 0x3b, 0x9d, 0x20, 0xc0, 0xd6, 0x04, 0x01, 0x06, 0xbe, 0xe5, 0xb3, 0x0c, 0xea, + 0x81, 0x45, 0xdd, 0x7e, 0x74, 0x4b, 0x59, 0x05, 0x34, 0x24, 0x14, 0x78, 0x01, 0x80, 0x2b, 0x30, + 0x4f, 0x6d, 0x51, 0xf0, 0xa3, 0x77, 0x93, 0x20, 0x9c, 0x7d, 0xdb, 0x7a, 0xa5, 0x6b, 0x51, 0xcb, + 0x42, 0x21, 0x24, 0x8a, 0xc1, 0xaf, 0x1d, 0x80, 0xd5, 0x9c, 0xb8, 0xe1, 0x3d, 0x50, 0xbc, 0x20, + 0x7d, 0xff, 0x28, 0x11, 0xfb, 0x09, 0x97, 0x41, 0xb9, 0x87, 0x8d, 0x2e, 0xf1, 0xab, 0x19, 0xf9, + 0x1f, 0x3b, 0x85, 0xc7, 0x52, 0xe3, 0x1f, 0xe5, 0x78, 0x66, 0xb1, 0xce, 0x05, 0x37, 0xd9, 0x43, + 0xe4, 0x18, 0xba, 0x8a, 0x3d, 0x8e, 0x51, 0x56, 0xde, 0xf3, 0x1f, 0x21, 0x7f, 0x0d, 0x85, 0x52, + 0xf8, 0x4b, 0x50, 0xf1, 0x88, 0x41, 0x54, 0x6a, 0xbb, 0xa2, 0x79, 0x3e, 0x1c, 0x31, 0x07, 0x71, + 0x9b, 0x18, 0x2d, 0x61, 0xea, 0xc3, 0x07, 0x5f, 0x28, 0x84, 0x84, 0xbf, 0x00, 0x15, 0x4a, 0x4c, + 0xc7, 0xc0, 0x94, 0x88, 0xd3, 0xdc, 0xca, 0x3f, 0x4d, 0x06, 0x7b, 0x62, 0x77, 0x4e, 0x85, 0x01, + 0xef, 0xc8, 0x61, 0x86, 0x07, 0xab, 0x28, 0x04, 0x84, 0x3a, 0xa8, 0x78, 0x94, 0x31, 0x09, 0xad, + 0xcf, 0x7b, 0xd1, 0x38, 0x4f, 0x59, 0xbc, 0x37, 0xfb, 0x10, 0x91, 0xab, 0x60, 0x05, 0x85, 0xf0, + 0x70, 0x0f, 0x2c, 0x98, 0xba, 0x85, 0x08, 0xee, 0xf4, 0x5b, 0x44, 0xb5, 0xad, 0x8e, 0xc7, 0x9b, + 0x5a, 0x59, 0x59, 0x15, 0x46, 0x0b, 0x47, 0x49, 0x31, 0x4a, 0xeb, 0xc3, 0x43, 0xb0, 0x1c, 0x3c, + 0xfd, 0x3f, 0xd1, 0x3d, 0x6a, 0xbb, 0xfd, 0x43, 0xdd, 0xd4, 0x29, 0x6f, 0x75, 0x65, 0xa5, 0x36, + 0xb8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 0x4d, 0x23, 0xe5, 0x31, 0xa7, 0x91, 0x78, 0x14, + 0x82, 0xe6, 0xf9, 0x79, 0x98, 0x8d, 0x42, 0xb0, 0xbd, 0xb4, 0x3e, 0x7b, 0x03, 0x7d, 0xd4, 0x10, + 0x61, 0x26, 0xf9, 0x06, 0x9e, 0x25, 0xa4, 0x28, 0xa5, 0xdd, 0xf8, 0x56, 0x02, 0xef, 0xe7, 0x66, + 0x19, 0xdc, 0x4b, 0x90, 0xf2, 0xad, 0x14, 0x29, 0xff, 0x6e, 0xae, 0x61, 0x8c, 0x9b, 0xbb, 0x60, + 0xd6, 0x09, 0x08, 0xb2, 0xe8, 0x75, 0x07, 0x23, 0xe7, 0xff, 0x4d, 0xd4, 0x5a, 0x99, 0x1f, 0x5c, + 0xad, 0xcf, 0x86, 0x1a, 0x28, 0x72, 0xa3, 0xdc, 0xbf, 0xbc, 0xae, 0x4f, 0x7d, 0x73, 0x5d, 0x9f, + 0x7a, 0x73, 0x5d, 0x9f, 0xfa, 0xf5, 0xa0, 0x2e, 0x5d, 0x0e, 0xea, 0xd2, 0x37, 0x83, 0xba, 0xf4, + 0xcf, 0x41, 0x5d, 0xfa, 0xfd, 0xdb, 0xfa, 0xd4, 0xcb, 0x19, 0xe1, 0xe1, 0x3f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x4f, 0x0f, 0xec, 0xcc, 0xce, 0x1a, 0x00, 0x00, } diff --git a/pkg/apis/apps/v1beta1/generated.proto b/pkg/apis/apps/v1beta1/generated.proto index 5d548a7f..ab1dc6dd 100644 --- a/pkg/apis/apps/v1beta1/generated.proto +++ b/pkg/apis/apps/v1beta1/generated.proto @@ -224,6 +224,14 @@ message DeploymentStrategy { optional RollingUpdateDeployment rollingUpdate = 2; } +// PartitionStatefulSetStrategy contains the parameters used with the +// PartitionStatefulSetStrategyType. +message PartitionStatefulSetStrategy { + // Ordinal indicates the ordinal at which the StatefulSet should be + // partitioned. + optional int32 ordinal = 1; +} + message RollbackConfig { // The revision to rollback to. If set to 0, rollback to the last revision. // +optional @@ -378,15 +386,60 @@ message StatefulSetSpec { // all pods at once. // +optional optional string podManagementPolicy = 6; + + // updateStrategy indicates the StatefulSetUpdateStrategy that will be + // employed to update Pods in the StatefulSet when a revision is made to + // Template. + optional StatefulSetUpdateStrategy updateStrategy = 7; + + // revisionHistoryLimit is the maximum number of revisions that will + // be maintained in the StatefulSet's revision history. The revision history + // consists of all revisions not represented by a currently applied + // StatefulSetSpec version. The default value is 10. + optional int32 revisionHistoryLimit = 8; } // StatefulSetStatus represents the current state of a StatefulSet. message StatefulSetStatus { - // observedGeneration is the most recent generation observed by this StatefulSet. + // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the + // StatefulSet's generation, which is updated on mutation by the API Server. // +optional optional int64 observedGeneration = 1; - // replicas is the number of actual replicas. + // replicas is the number of Pods created by the StatefulSet controller. optional int32 replicas = 2; + + // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. + optional int32 readyReplicas = 3; + + // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by currentRevision. + optional int32 currentReplicas = 4; + + // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by updateRevision. + optional int32 updatedReplicas = 5; + + // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the + // sequence [0,currentReplicas). + optional string currentRevision = 6; + + // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence + // [replicas-updatedReplicas,replicas) + optional string updateRevision = 7; +} + +// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. +message StatefulSetUpdateStrategy { + // Type indicates the type of the StatefulSetUpdateStrategy. + optional string type = 1; + + // Partition is used to communicate the ordinal at which to partition + // the StatefulSet when Type is PartitionStatefulSetStrategyType. This + // value must be set when Type is PartitionStatefulSetStrategyType, + // and it must be nil otherwise. + optional PartitionStatefulSetStrategy partition = 2; } diff --git a/pkg/apis/apps/v1beta1/types.generated.go b/pkg/apis/apps/v1beta1/types.generated.go index c7ddf6f4..9022e039 100644 --- a/pkg/apis/apps/v1beta1/types.generated.go +++ b/pkg/apis/apps/v1beta1/types.generated.go @@ -1368,6 +1368,423 @@ func (x *PodManagementPolicyType) CodecDecodeSelf(d *codec1978.Decoder) { } } +func (x *StatefulSetUpdateStrategy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Type != "" + yyq2[1] = x.Partition != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + x.Type.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Partition == nil { + r.EncodeNil() + } else { + x.Partition.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("partition")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Partition == nil { + r.EncodeNil() + } else { + x.Partition.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetUpdateStrategy) 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 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetUpdateStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "partition": + if r.TryDecodeAsNil() { + if x.Partition != nil { + x.Partition = nil + } + } else { + if x.Partition == nil { + x.Partition = new(PartitionStatefulSetStrategy) + } + x.Partition.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetUpdateStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv7 := &x.Type + yyv7.CodecDecodeSelf(d) + } + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Partition != nil { + x.Partition = nil + } + } else { + if x.Partition == nil { + x.Partition = new(PartitionStatefulSetStrategy) + } + x.Partition.CodecDecodeSelf(d) + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x StatefulSetUpdateStrategyType) 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 *StatefulSetUpdateStrategyType) 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 *PartitionStatefulSetStrategy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.Ordinal)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ordinal")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.Ordinal)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PartitionStatefulSetStrategy) 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 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PartitionStatefulSetStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "ordinal": + if r.TryDecodeAsNil() { + x.Ordinal = 0 + } else { + yyv4 := &x.Ordinal + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PartitionStatefulSetStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Ordinal = 0 + } else { + yyv7 := &x.Ordinal + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -1382,16 +1799,18 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [6]bool + var yyq2 [8]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 != "" + yyq2[6] = true + yyq2[7] = x.RevisionHistoryLimit != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(6) + r.EncodeArrayStart(8) } else { yynn2 = 2 for _, b := range yyq2 { @@ -1550,6 +1969,58 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { x.PodManagementPolicy.CodecEncodeSelf(e) } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + yy26 := &x.UpdateStrategy + yy26.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("updateStrategy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy28 := &x.UpdateStrategy + yy28.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[7] { + if x.RevisionHistoryLimit == nil { + r.EncodeNil() + } else { + yy31 := *x.RevisionHistoryLimit + yym32 := z.EncBinary() + _ = yym32 + if false { + } else { + r.EncodeInt(int64(yy31)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RevisionHistoryLimit == nil { + r.EncodeNil() + } else { + yy33 := *x.RevisionHistoryLimit + yym34 := z.EncBinary() + _ = yym34 + if false { + } else { + r.EncodeInt(int64(yy33)) + } + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -1682,6 +2153,29 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { yyv13 := &x.PodManagementPolicy yyv13.CodecDecodeSelf(d) } + case "updateStrategy": + if r.TryDecodeAsNil() { + x.UpdateStrategy = StatefulSetUpdateStrategy{} + } else { + yyv14 := &x.UpdateStrategy + yyv14.CodecDecodeSelf(d) + } + case "revisionHistoryLimit": + if r.TryDecodeAsNil() { + if x.RevisionHistoryLimit != nil { + x.RevisionHistoryLimit = nil + } + } else { + if x.RevisionHistoryLimit == nil { + x.RevisionHistoryLimit = new(int32) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -1693,16 +2187,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + var yyj17 int + var yyb17 bool + var yyhl17 bool = l >= 0 + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb14 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb14 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1715,20 +2209,20 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Replicas == nil { x.Replicas = new(int32) } - yym16 := z.DecBinary() - _ = yym16 + yym19 := z.DecBinary() + _ = yym19 if false { } else { *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb14 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb14 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1741,21 +2235,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Selector == nil { x.Selector = new(pkg1_v1.LabelSelector) } - yym18 := z.DecBinary() - _ = yym18 + yym21 := z.DecBinary() + _ = yym21 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { z.DecFallback(x.Selector, false) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb14 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb14 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1763,16 +2257,16 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Template = pkg3_v1.PodTemplateSpec{} } else { - yyv19 := &x.Template - yyv19.CodecDecodeSelf(d) + yyv22 := &x.Template + yyv22.CodecDecodeSelf(d) } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb14 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb14 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1780,21 +2274,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.VolumeClaimTemplates = nil } else { - yyv20 := &x.VolumeClaimTemplates - yym21 := z.DecBinary() - _ = yym21 + yyv23 := &x.VolumeClaimTemplates + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv20), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv23), d) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb14 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb14 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1802,21 +2296,21 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ServiceName = "" } else { - yyv22 := &x.ServiceName - yym23 := z.DecBinary() - _ = yym23 + yyv25 := &x.ServiceName + yym26 := z.DecBinary() + _ = yym26 if false { } else { - *((*string)(yyv22)) = r.DecodeString() + *((*string)(yyv25)) = r.DecodeString() } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb14 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb14 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1824,21 +2318,64 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.PodManagementPolicy = "" } else { - yyv24 := &x.PodManagementPolicy - yyv24.CodecDecodeSelf(d) + yyv27 := &x.PodManagementPolicy + yyv27.CodecDecodeSelf(d) + } + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UpdateStrategy = StatefulSetUpdateStrategy{} + } else { + yyv28 := &x.UpdateStrategy + yyv28.CodecDecodeSelf(d) + } + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l + } else { + yyb17 = r.CheckBreak() + } + if yyb17 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RevisionHistoryLimit != nil { + x.RevisionHistoryLimit = nil + } + } else { + if x.RevisionHistoryLimit == nil { + x.RevisionHistoryLimit = new(int32) + } + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) + } } for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb14 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb14 { + if yyb17 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj14-1, "") + z.DecStructFieldNotFound(yyj17-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1857,13 +2394,18 @@ func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool + var yyq2 [7]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.ObservedGeneration != nil + yyq2[2] = x.ReadyReplicas != 0 + yyq2[3] = x.CurrentReplicas != 0 + yyq2[4] = x.UpdatedReplicas != 0 + yyq2[5] = x.CurrentRevision != "" + yyq2[6] = x.UpdateRevision != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) + r.EncodeArrayStart(7) } else { yynn2 = 1 for _, b := range yyq2 { @@ -1928,6 +2470,131 @@ func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(int64(x.Replicas)) } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeInt(int64(x.ReadyReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readyReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.ReadyReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeInt(int64(x.CurrentReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeInt(int64(x.CurrentReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeInt(int64(x.UpdatedReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeInt(int64(x.UpdatedReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CurrentRevision)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentRevision")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.CurrentRevision)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + yym24 := z.EncBinary() + _ = yym24 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UpdateRevision)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("updateRevision")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UpdateRevision)) + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -2017,6 +2684,66 @@ func (x *StatefulSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) *((*int32)(yyv6)) = int32(r.DecodeInt(32)) } } + case "readyReplicas": + if r.TryDecodeAsNil() { + x.ReadyReplicas = 0 + } else { + yyv8 := &x.ReadyReplicas + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "currentReplicas": + if r.TryDecodeAsNil() { + x.CurrentReplicas = 0 + } else { + yyv10 := &x.CurrentReplicas + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } + } + case "updatedReplicas": + if r.TryDecodeAsNil() { + x.UpdatedReplicas = 0 + } else { + yyv12 := &x.UpdatedReplicas + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(yyv12)) = int32(r.DecodeInt(32)) + } + } + case "currentRevision": + if r.TryDecodeAsNil() { + x.CurrentRevision = "" + } else { + yyv14 := &x.CurrentRevision + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + case "updateRevision": + if r.TryDecodeAsNil() { + x.UpdateRevision = "" + } else { + yyv16 := &x.UpdateRevision + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -2028,16 +2755,16 @@ func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb8 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb8 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2050,20 +2777,20 @@ func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if x.ObservedGeneration == nil { x.ObservedGeneration = new(int64) } - yym10 := z.DecBinary() - _ = yym10 + yym20 := z.DecBinary() + _ = yym20 if false { } else { *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) } } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb8 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb8 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2071,26 +2798,136 @@ func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Replicas = 0 } else { - yyv11 := &x.Replicas - yym12 := z.DecBinary() - _ = yym12 + yyv21 := &x.Replicas + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*int32)(yyv11)) = int32(r.DecodeInt(32)) + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadyReplicas = 0 + } else { + yyv23 := &x.ReadyReplicas + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentReplicas = 0 + } else { + yyv25 := &x.CurrentReplicas + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UpdatedReplicas = 0 + } else { + yyv27 := &x.UpdatedReplicas + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(yyv27)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentRevision = "" + } else { + yyv29 := &x.CurrentRevision + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*string)(yyv29)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UpdateRevision = "" + } else { + yyv31 := &x.UpdateRevision + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() } } for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb8 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb8 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj8-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7114,7 +7951,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 912) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 984) 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 02b9784a..66b6b6ba 100644 --- a/pkg/apis/apps/v1beta1/types.go +++ b/pkg/apis/apps/v1beta1/types.go @@ -26,6 +26,7 @@ import ( const ( // StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored. StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized" + StatefulSetRevisionLabel = "statefulset.beta.kubernetes.io/revision" ) // ScaleSpec describes the attributes of a scale subresource @@ -111,6 +112,54 @@ const ( ParallelPodManagement = "Parallel" ) +// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. +type StatefulSetUpdateStrategy struct { + // Type indicates the type of the StatefulSetUpdateStrategy. + Type StatefulSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetStrategyType"` + // Partition is used to communicate the ordinal at which to partition + // the StatefulSet when Type is PartitionStatefulSetStrategyType. This + // value must be set when Type is PartitionStatefulSetStrategyType, + // and it must be nil otherwise. + Partition *PartitionStatefulSetStrategy `json:"partition,omitempty" protobuf:"bytes,2,opt,name=partition"` +} + +// StatefulSetUpdateStrategyType is a string enumeration type that enumerates +// all possible update strategies for the StatefulSet controller. +type StatefulSetUpdateStrategyType string + +const ( + // PartitionStatefulSetStrategyType indicates that updates will only be + // applied to a partition of the StatefulSet. This is useful for canaries + // and phased roll outs. When a scale operation is performed with this + // strategy, new Pods will be created from the specification version indicated + // by the StatefulSet's currentRevision if there ordinal is less than the supplied + // Partition's ordinal. Otherwise, they will be created from the specification + // version indicated by the StatefulSet's updateRevision. + PartitionStatefulSetStrategyType StatefulSetUpdateStrategyType = "Partition" + // RollingUpdateStatefulSetStrategyType indicates that update will be + // applied to all Pods in the StatefulSet with respect to the StatefulSet + // ordering constraints. When a scale operation is performed with this + // strategy, new Pods will be created from the specification version indicated + // by the StatefulSet's updateRevision. + RollingUpdateStatefulSetStrategyType = "RollingUpdate" + // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version + // tracking and ordered rolling restarts are disabled. Pods are recreated + // from the StatefulSetSpec when they are manually deleted. When a scale + // operation is performed with this strategy,specification version indicated + // by the StatefulSet's currentRevision. + OnDeleteStatefulSetStrategyType = "OnDelete" +) + +// PartitionStatefulSetStrategy contains the parameters used with the +// PartitionStatefulSetStrategyType. +type PartitionStatefulSetStrategy struct { + // Ordinal indicates the ordinal at which the StatefulSet should be + // partitioned. + Ordinal int32 `json:"ordinal" protobuf:"varint,1,opt,name=ordinal"` +} + // A StatefulSetSpec is the specification of a StatefulSet. type StatefulSetSpec struct { // replicas is the desired number of replicas of the given Template. @@ -160,16 +209,47 @@ type StatefulSetSpec struct { // all pods at once. // +optional PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"` + + // updateStrategy indicates the StatefulSetUpdateStrategy that will be + // employed to update Pods in the StatefulSet when a revision is made to + // Template. + UpdateStrategy StatefulSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,7,opt,name=updateStrategy"` + + // revisionHistoryLimit is the maximum number of revisions that will + // be maintained in the StatefulSet's revision history. The revision history + // consists of all revisions not represented by a currently applied + // StatefulSetSpec version. The default value is 10. + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,8,opt,name=revisionHistoryLimit"` } // StatefulSetStatus represents the current state of a StatefulSet. type StatefulSetStatus struct { - // observedGeneration is the most recent generation observed by this StatefulSet. + // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the + // StatefulSet's generation, which is updated on mutation by the API Server. // +optional ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` - // replicas is the number of actual replicas. + // replicas is the number of Pods created by the StatefulSet controller. Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"` + + // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. + ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"` + + // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by currentRevision. + CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,4,opt,name=currentReplicas"` + + // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version + // indicated by updateRevision. + UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,5,opt,name=updatedReplicas"` + + // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the + // sequence [0,currentReplicas). + CurrentRevision string `json:"currentRevision,omitempty" protobuf:"bytes,6,opt,name=currentRevision"` + + // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence + // [replicas-updatedReplicas,replicas) + UpdateRevision string `json:"updateRevision,omitempty" protobuf:"bytes,7,opt,name=updateRevision"` } // StatefulSetList is a collection of StatefulSets. diff --git a/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go b/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go index 75235693..e5b40330 100644 --- a/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go +++ b/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go @@ -137,6 +137,15 @@ func (DeploymentStrategy) SwaggerDoc() map[string]string { return map_DeploymentStrategy } +var map_PartitionStatefulSetStrategy = map[string]string{ + "": "PartitionStatefulSetStrategy contains the parameters used with the PartitionStatefulSetStrategyType.", + "ordinal": "Ordinal indicates the ordinal at which the StatefulSet should be partitioned.", +} + +func (PartitionStatefulSetStrategy) SwaggerDoc() map[string]string { + return map_PartitionStatefulSetStrategy +} + var map_RollbackConfig = map[string]string{ "revision": "The revision to rollback to. If set to 0, rollback to the last revision.", } @@ -212,6 +221,8 @@ var map_StatefulSetSpec = map[string]string{ "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.", + "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", } func (StatefulSetSpec) SwaggerDoc() map[string]string { @@ -220,12 +231,27 @@ func (StatefulSetSpec) SwaggerDoc() map[string]string { var map_StatefulSetStatus = map[string]string{ "": "StatefulSetStatus represents the current state of a StatefulSet.", - "observedGeneration": "observedGeneration is the most recent generation observed by this StatefulSet.", - "replicas": "replicas is the number of actual replicas.", + "observedGeneration": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", + "replicas": "replicas is the number of Pods created by the StatefulSet controller.", + "readyReplicas": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + "currentReplicas": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", + "updatedReplicas": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", + "currentRevision": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", + "updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", } func (StatefulSetStatus) SwaggerDoc() map[string]string { return map_StatefulSetStatus } +var map_StatefulSetUpdateStrategy = map[string]string{ + "": "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", + "type": "Type indicates the type of the StatefulSetUpdateStrategy.", + "partition": "Partition is used to communicate the ordinal at which to partition the StatefulSet when Type is PartitionStatefulSetStrategyType. This value must be set when Type is PartitionStatefulSetStrategyType, and it must be nil otherwise.", +} + +func (StatefulSetUpdateStrategy) SwaggerDoc() map[string]string { + return map_StatefulSetUpdateStrategy +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/pkg/apis/apps/v1beta1/zz_generated.conversion.go index 5b39d12f..a5ead25a 100644 --- a/pkg/apis/apps/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/apps/v1beta1/zz_generated.conversion.go @@ -42,6 +42,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision, Convert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList, Convert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList, + Convert_v1beta1_PartitionStatefulSetStrategy_To_apps_PartitionStatefulSetStrategy, + Convert_apps_PartitionStatefulSetStrategy_To_v1beta1_PartitionStatefulSetStrategy, Convert_v1beta1_StatefulSet_To_apps_StatefulSet, Convert_apps_StatefulSet_To_v1beta1_StatefulSet, Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList, @@ -50,6 +52,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec, Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus, Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus, + Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy, + Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy, ) } @@ -123,6 +127,26 @@ func Convert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList(in *a return autoConvert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList(in, out, s) } +func autoConvert_v1beta1_PartitionStatefulSetStrategy_To_apps_PartitionStatefulSetStrategy(in *PartitionStatefulSetStrategy, out *apps.PartitionStatefulSetStrategy, s conversion.Scope) error { + out.Ordinal = in.Ordinal + return nil +} + +// Convert_v1beta1_PartitionStatefulSetStrategy_To_apps_PartitionStatefulSetStrategy is an autogenerated conversion function. +func Convert_v1beta1_PartitionStatefulSetStrategy_To_apps_PartitionStatefulSetStrategy(in *PartitionStatefulSetStrategy, out *apps.PartitionStatefulSetStrategy, s conversion.Scope) error { + return autoConvert_v1beta1_PartitionStatefulSetStrategy_To_apps_PartitionStatefulSetStrategy(in, out, s) +} + +func autoConvert_apps_PartitionStatefulSetStrategy_To_v1beta1_PartitionStatefulSetStrategy(in *apps.PartitionStatefulSetStrategy, out *PartitionStatefulSetStrategy, s conversion.Scope) error { + out.Ordinal = in.Ordinal + return nil +} + +// Convert_apps_PartitionStatefulSetStrategy_To_v1beta1_PartitionStatefulSetStrategy is an autogenerated conversion function. +func Convert_apps_PartitionStatefulSetStrategy_To_v1beta1_PartitionStatefulSetStrategy(in *apps.PartitionStatefulSetStrategy, out *PartitionStatefulSetStrategy, s conversion.Scope) error { + return autoConvert_apps_PartitionStatefulSetStrategy_To_v1beta1_PartitionStatefulSetStrategy(in, out, s) +} + func autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { @@ -208,6 +232,10 @@ 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) + if err := Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil { + return err + } + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) return nil } @@ -222,12 +250,21 @@ 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) + if err := Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil { + return err + } + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) return nil } func autoConvert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error { out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) out.Replicas = in.Replicas + out.ReadyReplicas = in.ReadyReplicas + out.CurrentReplicas = in.CurrentReplicas + out.UpdatedReplicas = in.UpdatedReplicas + out.CurrentRevision = in.CurrentRevision + out.UpdateRevision = in.UpdateRevision return nil } @@ -239,6 +276,11 @@ func Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSet func autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error { out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) out.Replicas = in.Replicas + out.ReadyReplicas = in.ReadyReplicas + out.CurrentReplicas = in.CurrentReplicas + out.UpdatedReplicas = in.UpdatedReplicas + out.CurrentRevision = in.CurrentRevision + out.UpdateRevision = in.UpdateRevision return nil } @@ -246,3 +288,15 @@ func autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.St func Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error { return autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in, out, s) } + +func autoConvert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(in *StatefulSetUpdateStrategy, out *apps.StatefulSetUpdateStrategy, s conversion.Scope) error { + out.Type = apps.StatefulSetUpdateStrategyType(in.Type) + out.Partition = (*apps.PartitionStatefulSetStrategy)(unsafe.Pointer(in.Partition)) + return nil +} + +func autoConvert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(in *apps.StatefulSetUpdateStrategy, out *StatefulSetUpdateStrategy, s conversion.Scope) error { + out.Type = StatefulSetUpdateStrategyType(in.Type) + out.Partition = (*PartitionStatefulSetStrategy)(unsafe.Pointer(in.Partition)) + return nil +} diff --git a/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go b/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go index a7feb4a8..475fb17d 100644 --- a/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go @@ -46,6 +46,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PartitionStatefulSetStrategy, InType: reflect.TypeOf(&PartitionStatefulSetStrategy{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Scale, InType: reflect.TypeOf(&Scale{})}, @@ -55,6 +56,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetUpdateStrategy, InType: reflect.TypeOf(&StatefulSetUpdateStrategy{})}, ) } @@ -251,6 +253,16 @@ func DeepCopy_v1beta1_DeploymentStrategy(in interface{}, out interface{}, c *con } } +// DeepCopy_v1beta1_PartitionStatefulSetStrategy is an autogenerated deepcopy function. +func DeepCopy_v1beta1_PartitionStatefulSetStrategy(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PartitionStatefulSetStrategy) + out := out.(*PartitionStatefulSetStrategy) + *out = *in + return nil + } +} + // DeepCopy_v1beta1_RollbackConfig is an autogenerated deepcopy function. func DeepCopy_v1beta1_RollbackConfig(in interface{}, out interface{}, c *conversion.Cloner) error { { @@ -397,6 +409,14 @@ func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conver } } } + if err := DeepCopy_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil { + return err + } + if in.RevisionHistoryLimit != nil { + in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit + *out = new(int32) + **out = **in + } return nil } } @@ -415,3 +435,18 @@ func DeepCopy_v1beta1_StatefulSetStatus(in interface{}, out interface{}, c *conv return nil } } + +// DeepCopy_v1beta1_StatefulSetUpdateStrategy is an autogenerated deepcopy function. +func DeepCopy_v1beta1_StatefulSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSetUpdateStrategy) + out := out.(*StatefulSetUpdateStrategy) + *out = *in + if in.Partition != nil { + in, out := &in.Partition, &out.Partition + *out = new(PartitionStatefulSetStrategy) + **out = **in + } + return nil + } +} diff --git a/pkg/apis/apps/zz_generated.deepcopy.go b/pkg/apis/apps/zz_generated.deepcopy.go index 9e2bf524..5307cdf7 100644 --- a/pkg/apis/apps/zz_generated.deepcopy.go +++ b/pkg/apis/apps/zz_generated.deepcopy.go @@ -38,10 +38,12 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_ControllerRevision, InType: reflect.TypeOf(&ControllerRevision{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_ControllerRevisionList, InType: reflect.TypeOf(&ControllerRevisionList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PartitionStatefulSetStrategy, InType: reflect.TypeOf(&PartitionStatefulSetStrategy{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetUpdateStrategy, InType: reflect.TypeOf(&StatefulSetUpdateStrategy{})}, ) } @@ -87,6 +89,16 @@ func DeepCopy_apps_ControllerRevisionList(in interface{}, out interface{}, c *co } } +// DeepCopy_apps_PartitionStatefulSetStrategy is an autogenerated deepcopy function. +func DeepCopy_apps_PartitionStatefulSetStrategy(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PartitionStatefulSetStrategy) + out := out.(*PartitionStatefulSetStrategy) + *out = *in + return nil + } +} + // DeepCopy_apps_StatefulSet is an autogenerated deepcopy function. func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error { { @@ -153,6 +165,14 @@ func DeepCopy_apps_StatefulSetSpec(in interface{}, out interface{}, c *conversio } } } + if err := DeepCopy_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil { + return err + } + if in.RevisionHistoryLimit != nil { + in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit + *out = new(int32) + **out = **in + } return nil } } @@ -171,3 +191,18 @@ func DeepCopy_apps_StatefulSetStatus(in interface{}, out interface{}, c *convers return nil } } + +// DeepCopy_apps_StatefulSetUpdateStrategy is an autogenerated deepcopy function. +func DeepCopy_apps_StatefulSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSetUpdateStrategy) + out := out.(*StatefulSetUpdateStrategy) + *out = *in + if in.Partition != nil { + in, out := &in.Partition, &out.Partition + *out = new(PartitionStatefulSetStrategy) + **out = **in + } + return nil + } +}