update e2e for GCE ApiEndpoint support

pull/6/head
Koonwah Chen 2017-06-22 14:57:21 -07:00
parent 65b2f71ee7
commit 890d356d5c
2 changed files with 4 additions and 1 deletions

View File

@ -80,7 +80,8 @@ func setupProviderConfig() error {
if !framework.TestContext.CloudConfig.MultiZone {
managedZones = []string{zone}
}
cloudConfig.Provider, err = gcecloud.CreateGCECloud(framework.TestContext.CloudConfig.ProjectID,
cloudConfig.Provider, err = gcecloud.CreateGCECloud(framework.TestContext.CloudConfig.ApiEndpoint,
framework.TestContext.CloudConfig.ProjectID,
region, zone, managedZones, "" /* networkUrl */, "" /* subnetworkUrl */, nil, /* nodeTags */
"" /* nodeInstancePerfix */, nil /* tokenSource */, false /* useMetadataServer */)
if err != nil {

View File

@ -133,6 +133,7 @@ type NodeTestContextType struct {
}
type CloudConfig struct {
ApiEndpoint string
ProjectID string
Zone string
MultiZone bool
@ -203,6 +204,7 @@ func RegisterClusterFlags() {
// TODO: Flags per provider? Rename gce-project/gce-zone?
cloudConfig := &TestContext.CloudConfig
flag.StringVar(&cloudConfig.MasterName, "kube-master", "", "Name of the kubernetes master. Only required if provider is gce or gke")
flag.StringVar(&cloudConfig.ApiEndpoint, "gce-api-endpoint", "", "The GCE ApiEndpoint being used, if applicable")
flag.StringVar(&cloudConfig.ProjectID, "gce-project", "", "The GCE project being used, if applicable")
flag.StringVar(&cloudConfig.Zone, "gce-zone", "", "GCE zone being used, if applicable")
flag.BoolVar(&cloudConfig.MultiZone, "gce-multizone", false, "If true, start GCE cloud provider with multizone support.")