Fix statefulset label selector diffing (#273)

Otherwise, rolling updates are done unnecessarily.
This commit is contained in:
Manuel Gómez 2018-04-06 17:21:57 +02:00 committed by GitHub
parent 9bf80afa6b
commit 88c68712b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -348,11 +348,10 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) *comp
c.logger.Warningf("new statefulset introduces extra labels in the label selector, cannot continue")
return &compareStatefulsetResult{}
}
}
needsReplace = true
needsRollUpdate = true
reasons = append(reasons, "new statefulset's selector doesn't match the current one")
}
}
if !reflect.DeepEqual(c.Statefulset.Spec.Template.Annotations, statefulSet.Spec.Template.Annotations) {
needsRollUpdate = true