Disable revision history for newdeploy (#1319)
This commit is contained in:
@@ -183,6 +183,12 @@ func (deploy *NewDeploy) getDeploymentSpec(fn *fv1.Function, env *fv1.Environmen
|
||||
maxUnavailable := intstr.FromString("20%")
|
||||
maxSurge := intstr.FromString("100%")
|
||||
|
||||
// Newdeploy updates the environment variable "LastUpdateTimestamp" of deployment
|
||||
// whenever a configmap/secret gets an update, but it also leaves multiple ReplicaSets for
|
||||
// rollback purpose. Since fission always update a deployment instead of performing a
|
||||
// rollback, set RevisionHistoryLimit to 0 to disable this feature.
|
||||
revisionHistoryLimit := int32(0)
|
||||
|
||||
deployment := &v1beta1.Deployment{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: deployName,
|
||||
@@ -242,6 +248,7 @@ func (deploy *NewDeploy) getDeploymentSpec(fn *fv1.Function, env *fv1.Environmen
|
||||
MaxSurge: &maxSurge,
|
||||
},
|
||||
},
|
||||
RevisionHistoryLimit: &revisionHistoryLimit,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user