Revision number should be updated only when it's smaller than it should be

This commit is contained in:
Janet Kuo 2016-03-01 17:12:24 -08:00
parent 719158d2c8
commit 1706df6242

View File

@ -758,7 +758,7 @@ func setNewReplicaSetAnnotations(deployment *extensions.Deployment, rs *extensio
if rs.Annotations == nil {
rs.Annotations = make(map[string]string)
}
if rs.Annotations[deploymentutil.RevisionAnnotation] != newRevision {
if rs.Annotations[deploymentutil.RevisionAnnotation] < newRevision {
rs.Annotations[deploymentutil.RevisionAnnotation] = newRevision
annotationChanged = true
glog.V(4).Infof("updating replica set %q's revision to %s - %+v\n", rs.Name, newRevision, rs)