apps: replace intstr.FromInt with intstr.FromInt32

This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
This commit is contained in:
Stephen Kitt
2023-03-14 16:17:48 +01:00
committed by Stephen Kitt
parent f871d5fabe
commit 5bfe738af2
10 changed files with 58 additions and 58 deletions

View File

@@ -93,8 +93,8 @@ func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSu
Strategy: apps.DeploymentStrategy{
Type: apps.RollingUpdateDeploymentStrategyType,
RollingUpdate: &apps.RollingUpdateDeployment{
MaxUnavailable: func() *intstr.IntOrString { i := intstr.FromInt(0); return &i }(),
MaxSurge: func() *intstr.IntOrString { i := intstr.FromInt(0); return &i }(),
MaxUnavailable: func() *intstr.IntOrString { i := intstr.FromInt32(0); return &i }(),
MaxSurge: func() *intstr.IntOrString { i := intstr.FromInt32(0); return &i }(),
},
},
Replicas: pointer.Int32(int32(replicas)),