From 7e4af9a66bf68f4e2211817b7a90ac0e9e1c0769 Mon Sep 17 00:00:00 2001 From: "Kenneth D. Evensen" Date: Sat, 2 Jul 2016 05:58:25 -0400 Subject: [PATCH] Added flag to skip zone check --- pkg/cloudprovider/providers/aws/aws.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 37c042923e6..ef9331b2677 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -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)