Skip to content

Commit

Permalink
Merge pull request kubernetes#50858 from andrewsykim/49308
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

cloudprovider.Zones should support external cloud providers

**What this PR does / why we need it**:
Provides methods in cloudprovider.Zones that allows external cloud providers to set the correct zone labels to nodes. Part of kubernetes#48690

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
fixes kubernetes#49308

**Special notes for your reviewer**:
Should help with getting ccm/external cloud providers to beta. 

**Release note**:
```release-note
cloudprovider.Zones should support external cloud providers
```

cc @luxas @wlan0 @thockin
  • Loading branch information
Kubernetes Submit Queue authored Aug 25, 2017
2 parents 6cdb124 + 7a780e8 commit 1e63225
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/cloudprovider/providers/openstack/openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,20 @@ func (os *OpenStack) GetZone() (cloudprovider.Zone, error) {
return zone, nil
}

// GetZoneByProviderID implements Zones.GetZoneByProviderID
// This is particularly useful in external cloud providers where the kubelet
// does not initialize node data.
func (os *OpenStack) GetZoneByProviderID(providerID string) (cloudprovider.Zone, error) {
return cloudprovider.Zone{}, errors.New("GetZoneByProviderID not implemented")
}

// GetZoneByNodeName implements Zones.GetZoneByNodeName
// This is particularly useful in external cloud providers where the kubelet
// does not initialize node data.
func (os *OpenStack) GetZoneByNodeName(nodeName types.NodeName) (cloudprovider.Zone, error) {
return cloudprovider.Zone{}, errors.New("GetZoneByNodeName not imeplemented")
}

func (os *OpenStack) Routes() (cloudprovider.Routes, bool) {
glog.V(4).Info("openstack.Routes() called")

Expand Down

0 comments on commit 1e63225

Please sign in to comment.