@@ -31,7 +31,6 @@ import (
31
31
ocmOutput "github.com/openshift/rosa/pkg/ocm/output"
32
32
mpOpts "github.com/openshift/rosa/pkg/options/machinepool"
33
33
"github.com/openshift/rosa/pkg/output"
34
- rprtr "github.com/openshift/rosa/pkg/reporter"
35
34
"github.com/openshift/rosa/pkg/rosa"
36
35
)
37
36
@@ -1252,7 +1251,6 @@ func fillAutoScalingAndReplicas(npBuilder *cmv1.NodePoolBuilder, autoscaling boo
1252
1251
}
1253
1252
1254
1253
func getMachinePoolReplicas (cmd * cobra.Command ,
1255
- reporter * rprtr.Object ,
1256
1254
machinePoolID string ,
1257
1255
existingReplicas int ,
1258
1256
existingAutoscaling * cmv1.MachinePoolAutoscaling ,
@@ -1458,7 +1456,7 @@ func editMachinePool(cmd *cobra.Command, machinePoolId string,
1458
1456
}
1459
1457
1460
1458
autoscaling , replicas , minReplicas , maxReplicas , err :=
1461
- getMachinePoolReplicas (cmd , r . Reporter , machinePoolId , machinePool .Replicas (), machinePool .Autoscaling (),
1459
+ getMachinePoolReplicas (cmd , machinePoolId , machinePool .Replicas (), machinePool .Autoscaling (),
1462
1460
! isLabelsSet && ! isTaintsSet , isMultiAZMachinePool (machinePool ), cluster .OpenshiftVersion ())
1463
1461
1464
1462
if err != nil {
@@ -1551,7 +1549,7 @@ func editNodePool(cmd *cobra.Command, nodePoolID string,
1551
1549
return fmt .Errorf ("Machine pool '%s' does not exist for hosted cluster '%s'" , nodePoolID , clusterKey )
1552
1550
}
1553
1551
1554
- autoscaling , replicas , minReplicas , maxReplicas , err := getNodePoolReplicas (cmd , r , nodePoolID ,
1552
+ autoscaling , replicas , minReplicas , maxReplicas , err := getNodePoolReplicas (cmd , nodePoolID ,
1555
1553
nodePool .Replicas (), nodePool .Autoscaling (), isAnyAdditionalParameterSet , cluster .OpenshiftVersion ())
1556
1554
if err != nil {
1557
1555
return fmt .Errorf ("Failed to get autoscaling or replicas: '%s'" , err )
@@ -1839,7 +1837,6 @@ func promptForNodePoolNodeRecreate(
1839
1837
}
1840
1838
1841
1839
func getNodePoolReplicas (cmd * cobra.Command ,
1842
- r * rosa.Runtime ,
1843
1840
nodePoolID string ,
1844
1841
existingReplicas int ,
1845
1842
existingAutoscaling * cmv1.NodePoolAutoscaling ,
@@ -1990,10 +1987,8 @@ func editAutoscaling(nodePool *cmv1.NodePool, minReplicas int, maxReplicas int)
1990
1987
max = maxReplicas
1991
1988
}
1992
1989
1993
- if existingMinReplica != minReplicas || existingMaxReplica != maxReplicas {
1994
- if min >= 1 && max >= 1 {
1995
- return cmv1 .NewNodePoolAutoscaling ().MinReplica (min ).MaxReplica (max )
1996
- }
1990
+ if min >= 1 && max >= 1 {
1991
+ return cmv1 .NewNodePoolAutoscaling ().MinReplica (min ).MaxReplica (max )
1997
1992
}
1998
1993
1999
1994
return nil
0 commit comments