Default extensions/v1beta1 Deployment's RevisionHistoryLimit to MaxInt32

This commit is contained in:
Weibin Lin
2018-08-10 10:12:43 +08:00
parent fbb2dfcc6a
commit 1f921760d6
5 changed files with 27 additions and 1 deletions

View File

@@ -424,7 +424,7 @@ func (dc *DeploymentController) scaleReplicaSet(rs *apps.ReplicaSet, newScale in
// where N=d.Spec.RevisionHistoryLimit. Old replica sets are older versions of the podtemplate of a deployment kept
// around by default 1) for historical reasons and 2) for the ability to rollback a deployment.
func (dc *DeploymentController) cleanupDeployment(oldRSs []*apps.ReplicaSet, deployment *apps.Deployment) error {
if deployment.Spec.RevisionHistoryLimit == nil {
if !deploymentutil.HasRevisionHistoryLimit(deployment) {
return nil
}