Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use beta GCP API instead of alpha in CloudCIDR controller #46001

Merged
merged 1 commit into from
May 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cloudprovider/providers/gce/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ go_library(
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
"//vendor/golang.org/x/oauth2:go_default_library",
"//vendor/golang.org/x/oauth2/google:go_default_library",
"//vendor/google.golang.org/api/compute/v0.alpha:go_default_library",
"//vendor/google.golang.org/api/compute/v0.beta:go_default_library",
"//vendor/google.golang.org/api/compute/v1:go_default_library",
"//vendor/google.golang.org/api/container/v1:go_default_library",
"//vendor/google.golang.org/api/googleapi:go_default_library",
Expand Down
8 changes: 4 additions & 4 deletions pkg/cloudprovider/providers/gce/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/golang/glog"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
computealpha "google.golang.org/api/compute/v0.alpha"
computebeta "google.golang.org/api/compute/v0.beta"
compute "google.golang.org/api/compute/v1"
container "google.golang.org/api/container/v1"
)
Expand Down Expand Up @@ -76,7 +76,7 @@ const (
// GCECloud is an implementation of Interface, LoadBalancer and Instances for Google Compute Engine.
type GCECloud struct {
service *compute.Service
serviceAlpha *computealpha.Service
serviceBeta *computebeta.Service
containerService *container.Service
projectID string
region string
Expand Down Expand Up @@ -187,7 +187,7 @@ func CreateGCECloud(projectID, region, zone string, managedZones []string, netwo
}

client, err = newOauthClient(tokenSource)
serviceAlpha, err := computealpha.New(client)
serviceBeta, err := computebeta.New(client)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -219,7 +219,7 @@ func CreateGCECloud(projectID, region, zone string, managedZones []string, netwo

return &GCECloud{
service: service,
serviceAlpha: serviceAlpha,
serviceBeta: serviceBeta,
containerService: containerService,
projectID: projectID,
region: region,
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloudprovider/providers/gce/gce_instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"cloud.google.com/go/compute/metadata"
"github.com/golang/glog"
computealpha "google.golang.org/api/compute/v0.alpha"
computealpha "google.golang.org/api/compute/v0.beta"
compute "google.golang.org/api/compute/v1"

"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -244,7 +244,7 @@ func (gce *GCECloud) AliasRanges(nodeName types.NodeName) (cidrs []string, err e
}

var res *computealpha.Instance
res, err = gce.serviceAlpha.Instances.Get(
res, err = gce.serviceBeta.Instances.Get(
gce.projectID, instance.Zone, instance.Name).Do()
if err != nil {
return
Expand Down