mirror of https://github.com/kubernetes/kops.git
Merge pull request #15748 from rifelpet/cpcount
E2E - Dont set --master-count if --control-plane-count is provided
This commit is contained in:
commit
f0a9b3ef6a
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue