Skip to content

Commit d26c9ce

Browse files
author
OpenShift Bot
authored
Merge pull request #9876 from kargakis/rhl-to-int32
Merged by openshift-bot
2 parents 8d2b7b2 + b6c41af commit d26c9ce

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

pkg/deploy/api/deep_copy_generated.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func DeepCopy_api_DeploymentConfigSpec(in DeploymentConfigSpec, out *DeploymentC
172172
out.Replicas = in.Replicas
173173
if in.RevisionHistoryLimit != nil {
174174
in, out := in.RevisionHistoryLimit, &out.RevisionHistoryLimit
175-
*out = new(int)
175+
*out = new(int32)
176176
**out = *in
177177
} else {
178178
out.RevisionHistoryLimit = nil

pkg/deploy/api/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ type DeploymentConfigSpec struct {
307307

308308
// RevisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks.
309309
// This field is a pointer to allow for differentiation between an explicit zero and not specified.
310-
RevisionHistoryLimit *int
310+
RevisionHistoryLimit *int32
311311

312312
// Test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the
313313
// deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding

pkg/deploy/api/v1/deep_copy_generated.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func DeepCopy_v1_DeploymentConfigSpec(in DeploymentConfigSpec, out *DeploymentCo
171171
out.Replicas = in.Replicas
172172
if in.RevisionHistoryLimit != nil {
173173
in, out := in.RevisionHistoryLimit, &out.RevisionHistoryLimit
174-
*out = new(int)
174+
*out = new(int32)
175175
**out = *in
176176
} else {
177177
out.RevisionHistoryLimit = nil

pkg/deploy/api/v1/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ type DeploymentConfigSpec struct {
267267

268268
// RevisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks.
269269
// This field is a pointer to allow for differentiation between an explicit zero and not specified.
270-
RevisionHistoryLimit *int `json:"revisionHistoryLimit,omitempty"`
270+
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
271271

272272
// Test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the
273273
// deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding

pkg/deploy/controller/deploymentconfig/controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,13 @@ func (c *DeploymentConfigController) cleanupOldDeployments(existingDeployments [
415415
}
416416

417417
prunableDeployments := deployutil.DeploymentsForCleanup(deploymentConfig, existingDeployments)
418-
if len(prunableDeployments) <= *deploymentConfig.Spec.RevisionHistoryLimit {
418+
if len(prunableDeployments) <= int(*deploymentConfig.Spec.RevisionHistoryLimit) {
419419
// the past deployment quota has not been exceeded
420420
return nil
421421
}
422422

423423
deletionErrors := []error{}
424-
for i := 0; i < (len(prunableDeployments) - *deploymentConfig.Spec.RevisionHistoryLimit); i++ {
424+
for i := 0; i < (len(prunableDeployments) - int(*deploymentConfig.Spec.RevisionHistoryLimit)); i++ {
425425
deployment := prunableDeployments[i]
426426
if deployment.Spec.Replicas != 0 {
427427
// we do not want to clobber active older deployments, but we *do* want them to count

test/extended/deployments/deployments.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ var _ = g.Describe("deploymentconfigs", func() {
536536
deploymentConfig, deployments, _, err := deploymentInfo(oc, "history-limit")
537537
o.Expect(err).NotTo(o.HaveOccurred())
538538
// sanity check to ensure that the following asertion on the amount of old deployments is valid
539-
o.Expect(*deploymentConfig.Spec.RevisionHistoryLimit).To(o.Equal(revisionHistoryLimit))
539+
o.Expect(*deploymentConfig.Spec.RevisionHistoryLimit).To(o.Equal(int32(revisionHistoryLimit)))
540540

541541
// we need to filter out any deployments that we don't care about,
542542
// namely the active deployment and any newer deployments

0 commit comments

Comments
 (0)