Get rid of default-zone everywhere.

This commit is contained in:
Prashanth Balasubramanian 2016-06-03 11:22:56 -07:00
parent 3bed62f51e
commit 61558f4d19
6 changed files with 21 additions and 15 deletions

View file

@ -46,7 +46,7 @@ type Instances struct {
// NewNodePool creates a new node pool.
// - cloud: implements InstanceGroups, used to sync Kubernetes nodes with
// members of the cloud InstanceGroup.
func NewNodePool(cloud InstanceGroups, defaultZone string) NodePool {
func NewNodePool(cloud InstanceGroups) NodePool {
return &Instances{cloud, storage.NewInMemoryPool(), nil}
}
@ -146,6 +146,8 @@ func (i *Instances) Get(name, zone string) (*compute.InstanceGroup, error) {
return ig, nil
}
// splitNodesByZones takes a list of node names and returns a map of zone:node names.
// It figures out the zones by asking the zoneLister.
func (i *Instances) splitNodesByZone(names []string) map[string][]string {
nodesByZone := map[string][]string{}
for _, name := range names {

View file

@ -25,7 +25,7 @@ import (
const defaultZone = "default-zone"
func newNodePool(f *FakeInstanceGroups, zone string) NodePool {
pool := NewNodePool(f, zone)
pool := NewNodePool(f)
pool.Init(&FakeZoneLister{[]string{zone}})
return pool
}