Merge pull request #89482 from renatoviana12/master

fixed percentage behaviour in instr
This commit is contained in:
Kubernetes Prow Robot
2020-10-05 20:00:19 -07:00
committed by GitHub
10 changed files with 143 additions and 16 deletions

View File

@@ -755,7 +755,7 @@ func testProportionalScalingDeployment(f *framework.Framework) {
framework.ExpectNoError(err)
// Checking state of first rollout's replicaset.
maxUnavailable, err := intstr.GetValueFromIntOrPercent(deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, int(*(deployment.Spec.Replicas)), false)
maxUnavailable, err := intstr.GetScaledValueFromIntOrPercent(deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, int(*(deployment.Spec.Replicas)), false)
framework.ExpectNoError(err)
// First rollout's replicaset should have Deployment's (replicas - maxUnavailable) = 10 - 2 = 8 available replicas.
@@ -780,7 +780,7 @@ func testProportionalScalingDeployment(f *framework.Framework) {
secondRS, err := deploymentutil.GetNewReplicaSet(deployment, c.AppsV1())
framework.ExpectNoError(err)
maxSurge, err := intstr.GetValueFromIntOrPercent(deployment.Spec.Strategy.RollingUpdate.MaxSurge, int(*(deployment.Spec.Replicas)), false)
maxSurge, err := intstr.GetScaledValueFromIntOrPercent(deployment.Spec.Strategy.RollingUpdate.MaxSurge, int(*(deployment.Spec.Replicas)), false)
framework.ExpectNoError(err)
// Second rollout's replicaset should have 0 available replicas.