Disable revision history for newdeploy (#1319)

This commit is contained in:
Ta-Ching Chen
2019-09-23 14:25:49 +08:00
committed by GitHub
parent 27ec605955
commit 7bd57c208a
+7
View File
@@ -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,
},
}