Removes PartitionStatefulSetStrategyType and Partition from UpdateStrategy and replaces them with a parameterized RollingUpdate strategy.

This commit is contained in:
Kenneth Owens
2017-06-12 10:06:09 -07:00
parent b84567a57e
commit b1ce1ffc55
9 changed files with 76 additions and 112 deletions

View File

@@ -483,8 +483,8 @@ func (ssc *defaultStatefulSetControl) updateStatefulSet(
// we compute the minimum ordinal of the target sequence for a destructive update based on the strategy.
updateMin := 0
if set.Spec.UpdateStrategy.Type == apps.PartitionStatefulSetStrategyType {
updateMin = int(set.Spec.UpdateStrategy.Partition.Ordinal)
if set.Spec.UpdateStrategy.RollingUpdate != nil {
updateMin = int(*set.Spec.UpdateStrategy.RollingUpdate.Partition)
}
// we terminate the Pod with the largest ordinal that does not match the update revision.
for target := len(replicas) - 1; target >= updateMin; target-- {