mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
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:
committed by
Stephen Kitt
parent
f871d5fabe
commit
5bfe738af2
@@ -1042,7 +1042,7 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) {
|
||||
// Setup the statefulSet controller
|
||||
totalPods := 6
|
||||
var partition int32 = 3
|
||||
var maxUnavailable = intstr.FromInt(2)
|
||||
var maxUnavailable = intstr.FromInt32(2)
|
||||
set := setupPodManagementPolicy(tc.policyType, newStatefulSet(totalPods))
|
||||
set.Spec.UpdateStrategy = apps.StatefulSetUpdateStrategy{
|
||||
Type: apps.RollingUpdateStatefulSetStrategyType,
|
||||
@@ -1130,7 +1130,7 @@ func setupForInvariant(t *testing.T) (*apps.StatefulSet, *fakeObjectManager, Sta
|
||||
set := newStatefulSet(totalPods)
|
||||
// update all pods >=3(3,4,5)
|
||||
var partition int32 = 3
|
||||
var maxUnavailable = intstr.FromInt(2)
|
||||
var maxUnavailable = intstr.FromInt32(2)
|
||||
set.Spec.UpdateStrategy = apps.StatefulSetUpdateStrategy{
|
||||
Type: apps.RollingUpdateStatefulSetStrategyType,
|
||||
RollingUpdate: func() *apps.RollingUpdateStatefulSetStrategy {
|
||||
|
||||
Reference in New Issue
Block a user