Don't force HA master by default

Users can still get HA master by explicitly specifying a list of
`--master-zones`.

But HA master is not as well tested, is slower, needs more machines etc
and we probably shouldn't silently force it as the default.

Fix #33
This commit is contained in:
Justin Santa Barbara 2016-07-05 12:17:22 -04:00
parent 188ca8339c
commit 9c07670d26
2 changed files with 10 additions and 3 deletions

View File

@ -80,7 +80,9 @@ You must pass --yes to actually delete resources (without the `#` comment!)
* Specify the k8s build to run: `--kubernetes-version=1.2.2`
* Try HA mode: `--zones=us-east-1b,us-east-1c,us-east-1d`
* Run nodes in multiple zones: `--zones=us-east-1b,us-east-1c,us-east-1d`
* Run with a HA master: `--master-zones=us-east-1b,us-east-1c,us-east-1d`
* Specify the number of nodes: `--node-count=4`

View File

@ -170,8 +170,9 @@ func (c *CreateClusterCmd) Run() error {
if c.MasterZones == "" {
if len(masters) == 0 {
// Default to putting into every zone
// TODO: just the first 1 or 3 zones; or should we force users to declare?
// We default to single-master (not HA), unless the user explicitly specifies it
// HA master is a little slower, not as well tested yet, and requires more resources
// Probably best not to make it the silent default!
for _, zone := range cluster.Spec.Zones {
g := &api.InstanceGroup{}
g.Spec.Role = api.InstanceGroupRoleMaster
@ -181,10 +182,14 @@ func (c *CreateClusterCmd) Run() error {
g.Name = "master-" + zone.Name // Subsequent masters (if we support that) could be <zone>-1, <zone>-2
instanceGroups = append(instanceGroups, g)
masters = append(masters, g)
// Don't force HA master
break
}
}
} else {
if len(masters) == 0 {
// Use the specified master zones (this is how the user gets HA master)
for _, zone := range parseZoneList(c.MasterZones) {
g := &api.InstanceGroup{}
g.Spec.Role = api.InstanceGroupRoleMaster