Support for AWS ELB

This commit is contained in:
Justin Santa Barbara
2015-05-22 20:12:53 -04:00
parent c741b8f3ae
commit 1e99426d5b
6 changed files with 834 additions and 91 deletions

View File

@@ -107,6 +107,8 @@ func init() {
flag.StringVar(&cloudConfig.Zone, "gce-zone", "", "GCE zone being used, if applicable")
flag.StringVar(&cloudConfig.NodeInstanceGroup, "node-instance-group", "", "Name of the managed instance group for nodes. Valid only for gce")
flag.IntVar(&cloudConfig.NumNodes, "num-nodes", -1, "Number of nodes in the cluster")
flag.StringVar(&cloudConfig.ClusterTag, "cluster-tag", "", "Tag used to identify resources. Only required if provider is aws.")
}
func TestE2E(t *testing.T) {
@@ -126,6 +128,11 @@ func TestE2E(t *testing.T) {
}
awsConfig += fmt.Sprintf("Zone=%s\n", cloudConfig.Zone)
if cloudConfig.ClusterTag == "" {
glog.Fatal("--cluster-tag must be specified for AWS")
}
awsConfig += fmt.Sprintf("KubernetesClusterTag=%s\n", cloudConfig.ClusterTag)
var err error
cloudConfig.Provider, err = cloudprovider.GetCloudProvider(testContext.Provider, strings.NewReader(awsConfig))
if err != nil {

View File

@@ -113,8 +113,8 @@ var _ = Describe("kubectl", func() {
})
It("should create and stop a working application", func() {
if !providerIs("gce", "gke") {
By(fmt.Sprintf("Skipping guestbook, uses createExternalLoadBalancer, a (gce|gke) feature"))
if !providerIs("gce", "gke", "aws") {
By(fmt.Sprintf("Skipping guestbook, uses createExternalLoadBalancer, a (gce|gke|aws) feature"))
return
}

View File

@@ -72,6 +72,7 @@ type CloudConfig struct {
MasterName string
NodeInstanceGroup string
NumNodes int
ClusterTag string
Provider cloudprovider.Interface
}