Merge pull request #51539 from saad-ali/enableAlphaGCEDiskAPI

Automatic merge from submit-queue (batch tested with PRs 51439, 51361, 51140, 51539, 51585)

Enable alpha GCE disk API

This PR builds on top of #50467 to allow the GCE disk API to use either the alpha or stable APIs.

CC @freehan
This commit is contained in:
Kubernetes Submit Queue
2017-08-30 03:59:35 -07:00
committed by GitHub
5 changed files with 390 additions and 84 deletions

View File

@@ -78,6 +78,11 @@ func setupProviderConfig() error {
managedZones = []string{zone}
}
gceAlphaFeatureGate, err := gcecloud.NewAlphaFeatureGate([]string{})
if err != nil {
glog.Errorf("Encountered error for creating alpha feature gate: %v", err)
}
gceCloud, err := gcecloud.CreateGCECloud(&gcecloud.CloudConfig{
ApiEndpoint: framework.TestContext.CloudConfig.ApiEndpoint,
ProjectID: framework.TestContext.CloudConfig.ProjectID,
@@ -89,7 +94,8 @@ func setupProviderConfig() error {
NodeTags: nil,
NodeInstancePrefix: "",
TokenSource: nil,
UseMetadataServer: false})
UseMetadataServer: false,
AlphaFeatureGate: gceAlphaFeatureGate})
if err != nil {
return fmt.Errorf("Error building GCE/GKE provider: %v", err)