Merge pull request #15748 from rifelpet/cpcount

E2E - Dont set --master-count if --control-plane-count is provided
This commit is contained in:
Kubernetes Prow Robot 2023-08-06 08:52:30 -07:00 committed by GitHub
commit f0a9b3ef6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -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")