diff --git a/tests/e2e/kubetest2-kops/deployer/up.go b/tests/e2e/kubetest2-kops/deployer/up.go index c19534984e..2accf227ae 100644 --- a/tests/e2e/kubetest2-kops/deployer/up.go +++ b/tests/e2e/kubetest2-kops/deployer/up.go @@ -134,7 +134,21 @@ func (d *deployer) createCluster(zones []string, adminAccess string, yes bool) e args = append(args, createArgs...) } args = appendIfUnset(args, "--admin-access", adminAccess) - args = appendIfUnset(args, "--master-count", fmt.Sprintf("%d", d.ControlPlaneCount)) + + // Dont set --master-count if either --control-plane-count or --master-count + // has been provided in --create-args + foundCPCount := false + for _, existingArg := range args { + existingKey := strings.Split(existingArg, "=") + if existingKey[0] == "--control-plane-count" || existingKey[0] == "--master-count" { + foundCPCount = true + break + } + } + if !foundCPCount { + args = appendIfUnset(args, "--master-count", fmt.Sprintf("%d", d.ControlPlaneCount)) + } + args = appendIfUnset(args, "--master-volume-size", "48") args = appendIfUnset(args, "--node-count", "4") args = appendIfUnset(args, "--node-volume-size", "48")