Added flag to skip zone check

pull/6/head
Kenneth D. Evensen 2016-07-02 05:58:25 -04:00
parent 7de5e87135
commit 7e4af9a66b
No known key found for this signature in database
GPG Key ID: 16D6152C9FDA6A3B
1 changed files with 9 additions and 3 deletions

View File

@ -300,6 +300,8 @@ type CloudConfig struct {
//has setup a rule that allows inbound traffic on kubelet ports from the
//local VPC subnet (so load balancers can access it). E.g. 10.82.0.0/16 30000-32000.
DisableSecurityGroupIngress bool
DisableStrictZoneCheck bool
}
}
@ -664,9 +666,13 @@ func newAWSCloud(config io.Reader, awsServices Services) (*Cloud, error) {
return nil, err
}
valid := isRegionValid(regionName)
if !valid {
return nil, fmt.Errorf("not a valid AWS zone (unknown region): %s", zone)
if !cfg.Global.DisableStrictZoneCheck {
valid := isRegionValid(regionName)
if !valid {
return nil, fmt.Errorf("not a valid AWS zone (unknown region): %s", zone)
}
} else {
glog.Warningf("Strict AWS zone checking is disabled. Proceeding with zone: %s", zone)
}
ec2, err := awsServices.Compute(regionName)