diff --git a/pkg/reconciler/revision/resources/deploy.go b/pkg/reconciler/revision/resources/deploy.go index aba5c877bbcd..cbdcf6fd47a4 100644 --- a/pkg/reconciler/revision/resources/deploy.go +++ b/pkg/reconciler/revision/resources/deploy.go @@ -388,6 +388,7 @@ func MakeDeployment(rev *v1.Revision, cfg *config.Config) (*appsv1.Deployment, e Replicas: ptr.Int32(replicaCount), Selector: makeSelector(rev), ProgressDeadlineSeconds: ptr.Int32(progressDeadline), + RevisionHistoryLimit: ptr.Int32(0), Strategy: appsv1.DeploymentStrategy{ Type: appsv1.RollingUpdateDeploymentStrategyType, RollingUpdate: &appsv1.RollingUpdateDeployment{ diff --git a/pkg/reconciler/revision/resources/deploy_test.go b/pkg/reconciler/revision/resources/deploy_test.go index c3b6d4fd78e2..9c60a1d22323 100644 --- a/pkg/reconciler/revision/resources/deploy_test.go +++ b/pkg/reconciler/revision/resources/deploy_test.go @@ -202,7 +202,7 @@ var ( } defaultPodSpec = &corev1.PodSpec{ - TerminationGracePeriodSeconds: refInt64(45), + TerminationGracePeriodSeconds: ptr.Int64(45), EnableServiceLinks: ptr.Bool(false), } @@ -259,6 +259,7 @@ var ( }, }, ProgressDeadlineSeconds: ptr.Int32(0), + RevisionHistoryLimit: ptr.Int32(0), Strategy: appsv1.DeploymentStrategy{ Type: appsv1.RollingUpdateDeploymentStrategyType, RollingUpdate: &appsv1.RollingUpdateDeployment{ @@ -310,10 +311,6 @@ func defaultRevision() *v1.Revision { } } -func refInt64(num int64) *int64 { - return &num -} - type ( containerOption func(*corev1.Container) podSpecOption func(*corev1.PodSpec)