Commit Graph

1206 Commits (f34a24e98e7c837b567b78be3af958ac1156cd80)

Author SHA1 Message Date
Erik McClenney 99d100a353 Fix user-agent append string component order. 2017-09-29 12:09:10 -07:00
Kubernetes Submit Queue d58e322bdb Merge pull request #52983 from kubermatic/use-notimplemented-error
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use custom error for "unimplemented"

**What this PR does / why we need it**:
This introduces a new error type `NotImplemented` which is used in cloud-providers to tell that this functionality is not implemented.

Needed for https://github.com/kubernetes/kubernetes/pull/52645 to avoid doing a string comparison.
2017-09-29 01:05:50 -07:00
Kubernetes Submit Queue 00ee67bdc8 Merge pull request #52575 from vmware/vSphereInstanceNotFoundOnPowerOff
Automatic merge from submit-queue (batch tested with PRs 51311, 52575, 53169). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Unable to detach the vSphere volume from Powered off node

With the existing implementation when a vSphere node is powered off, the node is not deleted by the node controller and is in "NotReady" state. Following the approach similar to GCE as mentioned here - https://github.com/kubernetes/kubernetes/issues/46442.

I observe the following issues:
- The pods on the powered off node are not **instantaneously** created on the other available node. Only after 5 minutes timeout, the pods will be created on other available nodes with the volume attached to it. This means an application downtime of around 5 minutes which is not good at all.
- The volume on the powered off node are not detached at all when the pod with the volume is already moved to other available node. Hence any attempt to restart the powered off node will fail as the same volume is attached to other node which is present on this powered off node. (Please note that the volumes are not automatically detached from powered off in vSphere as opposed to GCE, AWS where volume is automatically detached from when node is powered off).

So inorder to resolve this problem, we have decided to back with the approach where the powered off node will be removed by the Node controller. So the above 2 problems will be resolved as follows:
- Since the node is deleted, the pod on the powered off node becomes instantaneously available on other available nodes with the volume attached to the new nodes. Hence there is no application downtime at all.
- After a period of 6 minutes (timeout period), the volumes are automatically detached from the powered off node. Hence any restarts after 6 minutes on the powered off node would work and not cause any problems as volumes are already detached.

For now, we would want to go ahead with deleting the node from node controller when a node is powered off in vCenter until we have a better approach. I think the best possible solution would be to introduce power handler in volume controller to see if the node is powered off before we can take any appropriate for attach/detach operations.

```release-note
None
```

@jingxu97 @saad-ali @divyenpatel @luomiao @rohitjogvmw
2017-09-28 23:18:19 -07:00
Kubernetes Submit Queue 671b488eba Merge pull request #50280 from FengyunPan/mark-detached-photon
Automatic merge from submit-queue (batch tested with PRs 50280, 52529, 53093, 53108, 53168). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Mark volume as detached when node does not exist for photon

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and
return false without error.
Fix #50266

**Special notes for your reviewer**:
/assign @jingxu97 

**Release note**:
```release-note
NONE
```
2017-09-28 14:59:20 -07:00
Erik McClenney f0920670fa Fix another space vs tab formatting error. 2017-09-28 10:41:04 -07:00
Erik McClenney 7221fe6dd4 Fix indentation and skip leading v on the semver. 2017-09-28 10:11:30 -07:00
Kubernetes Submit Queue 3eb5ba805c Merge pull request #52628 from richardalberto/metadata-search-order
Automatic merge from submit-queue (batch tested with PRs 53157, 52628). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Added openstack instance metadata search order

**What this PR does / why we need it**: This PR adds a search order for the instance metadata retrieval on openstack. More information and discussion can be found on #52378 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-27 22:54:15 -07:00
Unknown 5f088973ce Retry when checking Azure storage account readiness 2017-09-28 02:48:20 +00:00
Richard Gonzalez 0e81cac328 Metadata order search tests 2017-09-27 13:39:07 -04:00
Richard Gonzalez 870195ad59 Added openstack instance metadata search order 2017-09-27 02:33:16 -04:00
FengyunPan 4b2604bfe8 [OpenStack] Service LoadBalancer defaults to external 2017-09-27 11:12:51 +08:00
FengyunPan b35aa85560 Fix the version detection of OpenStack Cinder
When running Kubernetes against an installation of DevStack which
deploys the Cinder service at a path rather than a port (ex:
http://foo.bar/volume rather than http://foo.bar:xxx), the version
detection fails. It is better to use the OpenStack service catalog.
OTOH, when initialize cinder client, kubernetes will check the
endpoint from the OpenStack service catalog, so we can do this
version detection by it.
2017-09-26 21:56:17 +08:00
Henrik Schmidt 1339e4cffc Use custom error for "unimplemented" 2017-09-26 09:21:53 +02:00
Minhan Xia cce8cf6990 add alpha wrapper function for backend service and health check 2017-09-25 11:11:24 -07:00
Minhan Xia 039ac28f02 add neg to gce cloud provider 2017-09-25 11:11:18 -07:00
Kubernetes Submit Queue 0ce1cc9992 Merge pull request #52609 from FengyunPan/register-internal-ip
Automatic merge from submit-queue (batch tested with PRs 52751, 52898, 52633, 52611, 52609). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Only register floatingIP for external loadbalancer service

If the user has provided the floating-ip options, then it's safe
to assume they want (only) the floating-ip to be the ingress IP;
if they have not provided floating-ip options, then the LB IP is
the only relevant value.


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

**Release note**:
```release-note
Only register floatingIP into Loadbalancer ingress field for external loadbalancer service
```
2017-09-24 05:27:55 -07:00
Kubernetes Submit Queue 1e36480492 Merge pull request #52611 from FengyunPan/missing-floatingip
Automatic merge from submit-queue (batch tested with PRs 52751, 52898, 52633, 52611, 52609). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Fix missing floatingip when calling GetLoadBalancer()

If user specify floating-network-id, a floatingip and a vip will
be assigned to LoadBalancer service, So its status contains a
floatingip and a vip, but GetLoadBalancer() only return vip.

**Release note**:
```release-note
GetLoadBalancer() only return floatingip when user specify floating-network-id, or return LB vip.
```
2017-09-24 05:27:52 -07:00
Kubernetes Submit Queue 8c29b6540b Merge pull request #52751 from MrHohn/e2e-service-cleanup-fix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Fix GCE LB resource cleanup for service e2e tests.

**What this PR does / why we need it**: Fix GCE LB resource cleanup logic.

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

**Special notes for your reviewer**:
/assign @shyamjvs @nicksardo 

**Release note**:

```release-note
NONE
```
2017-09-24 05:21:16 -07:00
Kubernetes Submit Queue 8e7f5d8c8b Merge pull request #52855 from NickrenREN/remove-rackspace
Automatic merge from submit-queue (batch tested with PRs 52880, 52855, 52761, 52885, 52929). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Remove cloud provider rackspace

**What this PR does / why we need it**:
For now, we have to implement functions in both `rackspace` and `openstack` packages if we want to add function for cinder, for example [resize for cinder](https://github.com/kubernetes/kubernetes/pull/51498).  Since openstack has implemented all the functions rackspace has,  and rackspace is considered deprecated for a long time, [rackspace deprecated](https://github.com/rackspace/gophercloud/issues/592) ,
after talking with @mikedanese  and @jamiehannaford offline ,  i sent this PR to remove `rackspace` in favor of `openstack`

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

**Special notes for your reviewer**:

**Release note**:
```release-note
The Rackspace cloud provider has been removed after a long deprecation period. It was deprecated because it duplicates a lot of the OpenStack logic and can no longer be maintained. Please use the OpenStack cloud provider instead.
```
2017-09-24 04:30:04 -07:00
Kubernetes Submit Queue 63cc42a861 Merge pull request #52131 from vmware/BulkVerifyVolumesImplVsphere
Automatic merge from submit-queue (batch tested with PRs 50068, 52406, 52394, 48551, 52131). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Implement bulk polling of volumes for vSphere

This PR implements bulk polling of volumes - BulkVerifyVolumes() API for vSphere. 

With the existing implementation, vSphere makes multiple calls to VC to check if the volume is attached to a node. If there are "N" volumes attached on "M" nodes, vSphere makes "N" VCenter calls to check if the volumes are attached to VC for all "N" volumes. Also, by default Kubernetes queries if the volumes are attached to nodes every 1 minute. This will substantially increase the number of calls made by vSphere cloud provider to vCenter.

Inorder to prevent this, vSphere cloud provider implements the BulkVerifyVolumes() API in which only a single call is made to vCenter to check if all the volumes are attached to the respective nodes. Irrespective of the number of volumes attached to nodes, the number of vCenter calls will always be 1 on a query to BulkVerifyVolumes() API by kubernetes.

@rohitjogvmw @divyenpatel @luomiao

```release-note
BulkVerifyVolumes() implementation for vSphere
```
2017-09-23 20:55:54 -07:00
Kubernetes Submit Queue 4e64a3b5c3 Merge pull request #50673 from clement-buchart/patch-1
Automatic merge from submit-queue (batch tested with PRs 52355, 52537, 52551, 52403, 50673). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Azure - Use cloud environment to instantiate storage client

**What this PR does / why we need it**:
Since 1.7 and managed disk for azure, blob storage on Azure cloud other than the default public one is broken, because kubernetes expect blob ressources URI to end with `.blob.core.windows.net ` (ignoring storageEndpointSuffix).
This include the chinese Cloud, for which storageEndpointSuffix is `blob.core.chinacloudapi.cn` for example.

See : https://github.com/Azure/azure-storage-go/blob/master/client.go#L194

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-23 15:27:03 -07:00
Kubernetes Submit Queue 8a638c6b55 Merge pull request #51757 from itowlson/azure-load-balancer-subnet-redux
Automatic merge from submit-queue (batch tested with PRs 50294, 50422, 51757, 52379, 52014). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Azure cloud provider: expose services on non-default subnets

**What this PR does / why we need it**: The Azure cloud provider allows users to specify that a service should be exposed on an internal load balancer instead of the default external load balancer.  However, in a VNet environment, such services are currently always exposed on the master subnet.  Where there are multiple subnets in the VNet, it's desirable to be able to expose an internal service on any subnet.  This PR allows this via a new annotation, `service.beta.kubernetes.io/azure-load-balancer-internal-subnet`.

**Which issue this PR fixes**: fixes https://github.com/Azure/acs-engine/issues/1296 (no corresponding issue has been raised in the k8s core repo)

**Special notes for your reviewer**: None

**Release note**:

```release-note
A new service annotation has been added for services of type LoadBalancer on Azure, 
to specify the subnet on which the service's front end IP should be provisioned. The 
annotation is service.beta.kubernetes.io/azure-load-balancer-internal-subnet and its 
value is the subnet name (not the subnet ARM ID).  If omitted, the default is the 
master subnet.  It is ignored if the service is not on Azure, if the type is not 
LoadBalancer, or if the load balancer is not internal.
```
2017-09-23 11:40:49 -07:00
Kubernetes Submit Queue 37780d1c67 Merge pull request #51809 from davidz627/gci_api_test
Automatic merge from submit-queue (batch tested with PRs 52109, 52235, 51809, 52161, 50080). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Updated pd.go tests to use GCE API instead of GCloud Commands

Fixes #49796
2017-09-23 10:26:49 -07:00
Kubernetes Submit Queue 2b594750e7 Merge pull request #48145 from imcsk8/loadbalancer-logs
Automatic merge from submit-queue (batch tested with PRs 52240, 48145, 52220, 51698, 51777). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Avoid printing node list for LoadBalancer in log file

**What this PR does / why we need it**:  Production log files get saturated with EnsureLoadBalancer messages, this is problematic for sysadmins. 
This patch avoids printing the node list on the AWS logs so the log file is  more readable.
2017-09-23 09:13:57 -07:00
Kubernetes Submit Queue 55798b265c Merge pull request #51281 from verult/GCEDiskCleanup
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Refactor: Moving disk-related cloud provider operations to gce_disks.go

**What this PR does / why we need it**: The main GCE cloud provider code (pkg/cloudprovider/providers/gce/gce.go) should not contain disk-related operations. Moved them to gce_disks.go

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

**Release note**:

```release-note
NONE
```
/release-note-none
/sig storage
/assign @msau42 @bowei
2017-09-22 23:35:57 -07:00
Robert Rati aa8e14d4fe Moved fakes to a separate file usable by other tests 2017-09-22 13:30:05 -04:00
NickrenREN 39c48d3605 remove rackspace related code 2017-09-22 18:06:50 +08:00
NickrenREN 2fc479d9e3 Remove cloud provider rackspace 2017-09-22 00:55:56 +08:00
FengyunPan a769c11d4b Mark the LBaaS v1 of OpenStack cloud provider deprecated
Since LBaaS v1 is deprecated in the OpenStack Liberty release, we
deprecated it on Kubernetes.
Reference OpenStack doc:
https://docs.openstack.org/mitaka/networking-guide/config-lbaas.html
Related to: #52717
2017-09-21 09:59:35 +08:00
Kubernetes Submit Queue ca70c56398 Merge pull request #39620 from svanharmelen/f-cloudstack-instances
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Implement the `cloudprovider.Instances` interface for CloudStack

This PR adds code to support the `cloudprovider.Instances` interface, for the CloudStack provider

Closes #47303
2017-09-19 23:36:17 -07:00
Zihong Zheng 5532e24280 Fix GCE LB resource cleanup for service e2e tests. 2017-09-19 15:42:41 -07:00
Sander van Harmelen f19a51dbb5 godep: add dhcp4 and dhcp4client dependencies 2017-09-19 12:58:07 +02:00
Sander van Harmelen 04899f2355 Add support for Instances 2017-09-19 12:55:37 +02:00
FengyunPan 729634323d Fix missing floatingip when calling GetLoadBalancer()
If user specify floating-network-id, a floatingip be assigned to
LoadBalancer service, So its status contains a floatingip, but
GetLoadBalancer() only return vip.
2017-09-19 11:09:13 +08:00
FengyunPan 70a0f443c8 Only register floatingIP for external loadbalancer service
If the user has provided the floating-ip options, then it's safe
to assume they want (only) the floating-ip to be the ingress IP;
if they have not provided floating-ip options, then the LB IP is
the only relevant value.
Fix #52566
2017-09-19 09:43:24 +08:00
Balu Dontu 2ea619902d Bulk Verify Volumes Implementation for vSphere 2017-09-18 12:01:48 -07:00
Marek Grabowski e3e9de6010 Fix panic in ControllerManager when GCE external loadbalancer healthcheck is nil 2017-09-18 10:45:06 +01:00
Balu Dontu c7fe83266a Unable to detach the vSphere volume from Powered off node 2017-09-15 15:47:45 -07:00
David Zhu d33274ce64 Updated pd.go tests to use GCE API instead of GCloud Commands 2017-09-13 11:55:18 -07:00
Erik McClenney b6f23b1eed Add some comments to the version and user-agent changes. 2017-09-13 11:16:36 -07:00
Kubernetes Submit Queue 1f072babe8 Merge pull request #52169 from dims/remove-links-to-specific-cloud-providers
Automatic merge from submit-queue (batch tested with PRs 52007, 52196, 52169, 52263, 52291)

Remove links to GCE/AWS cloud providers from PersistentVolumeCo…

…ntroller




**What this PR does / why we need it**:

We should be able to build a cloud-controller-manager without having to
pull in code specific to GCE and AWS clouds. Note that this is a tactical
fix for now, we should have allow PVLabeler to be passed into the
PersistentVolumeController, maybe come up with better interfaces etc. Since
it is too late to do all that for 1.8, we just move cloud specific code
to where they belong and we check for PVLabeler method and use it where
needed.

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

Fixes #51629

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-12 08:46:12 -07:00
Erik McClenney c947339f27 Parse out numeric portion of semantic version. 2017-09-11 17:19:08 -07:00
Ivan Chavero 27e6fa3225 Avoid printing node list for LoadBalancer in log file
Don't to print the node list on the AWS logs so the log file is
more readable.
2017-09-11 15:10:19 -06:00
Kubernetes Submit Queue a5f766063d Merge pull request #51588 from karataliu/accm
Automatic merge from submit-queue

Fix splitProviderID for Azure

**What this PR does / why we need it**:
#46940 add 'splitProviderID' for Azure to get node name from provider, but it captures the resource id instead of node name.

Functions such as NodeAddresses are accepting node names:
84d9778f22/pkg/cloudprovider/providers/azure/azure_instances.go (L32)

With current implementation, it takes in a resource ID, and will result in following error
```
E0830 04:15:09.877143   10427 azure_instances.go:63] error: az.NodeAddresses, az.getIPForMachine(/subscriptions/{id}/resourceGroups/{id}/providers/Microsoft.Compute/virtualMachines/k8s-master-0), err=instance not found
```

This fix makes is return node names instead.


**Which issue this PR fixes**

**Special notes for your reviewer**:

**Release note**:
`NONE`


@brendandburns  @realfake @wlan0
2017-09-08 16:49:18 -07:00
Kubernetes Submit Queue a5b3e50eac Merge pull request #51528 from yastij/azure-zone-byProviderID-nodeName
Automatic merge from submit-queue (batch tested with PRs 52047, 52063, 51528)

implementation of GetZoneByProviderID and GetZoneByNodeName for azure

This is part of the #50926 effort

cc @luxas 

**Release note**:

```release-note
None
```
2017-09-08 16:07:00 -07:00
Davanum Srinivas d47bd26c4b Remove links to GCE/AWS cloud providers from PersistentVolumeController
We should be able to build a cloud-controller-manager without having to
pull in code specific to GCE and AWS clouds. Note that this is a tactical
fix for now, we should have allow PVLabeler to be passed into the
PersistentVolumeController, maybe come up with better interfaces etc. Since
it is too late to do all that for 1.8, we just move cloud specific code
to where they belong and we check for PVLabeler method and use it where
needed.

Fixes #51629
2017-09-08 15:28:08 -04:00
Unknown 125a054790 Fixes issues noted in review 2017-09-08 12:03:17 +12:00
Nick Sardo 068edd794a Bubble reservation error to the user when the address is specified. 2017-09-07 11:37:25 -07:00
Kubernetes Submit Queue 9a8cb435b7 Merge pull request #51795 from dims/bug-fix-51755
Automatic merge from submit-queue (batch tested with PRs 51984, 51351, 51873, 51795, 51634)

Bug Fix - Adding an allowed address pair wipes port security groups

**What this PR does / why we need it**:

Fix for cloud routes enabled instances will have their security groups
removed when the allowed address pair is added to the instance's port.

Upstream bug report is in:
https://github.com/gophercloud/gophercloud/issues/509

Upstream bug fix is in:
https://github.com/gophercloud/gophercloud/pull/510

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

Fixes #51755

**Special notes for your reviewer**:

Just an fix in vendored code. minimal changes needed in OpenStack cloud provider

**Release note**:

```release-note
NONE
```
2017-09-05 18:40:31 -07:00
Cheng Xing d285c5a933 Moving disk-related cloud provider operations to gce_disks.go 2017-09-05 11:06:56 -07:00
Kubernetes Submit Queue 1732a8b9bd Merge pull request #51562 from nicksardo/gce-attempt-firewall
Automatic merge from submit-queue (batch tested with PRs 51915, 51294, 51562, 51911)

GCE: Gracefully handle permission errors when attempting to create firewall rules

Purpose of this PR is to raise events from the GCE cloud provider if the GCE service account does not have the permissions necessary to create/update/delete firewall rules. 

Fixes #51812

**Release note**:
```release-note
NONE
```

Example Events:

```
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason                          Message
  ---------     --------        -----   ----                    -------------   --------        ------                          -------
  2m            2m              1       service-controller                      Normal          EnsuringLoadBalancer            Ensuring load balancer
  2m            2m              1       gce-cloudprovider                       Normal          LoadBalancerManualChange        Firewall change required by network admin: `gcloud compute firewall-rules create aa8a1dd628ddb11e78ce042010a80000 --network https://www.googleapis.com/compute/v1/projects/playground/global/networks/e2e-test-nicksardo --description "{\"kubernetes.io/service-name\":\"default/myechosvc1\", \"kubernetes.io/service-ip\":\"\"}" --allow tcp:9000 --source-ranges 0.0.0.0/0 --target-tags e2e-test-nicksardo-minion --project playground`
  2m            2m              1       gce-cloudprovider                       Normal          LoadBalancerManualChange        Firewall change required by network admin: `gcloud compute firewall-rules create k8s-1aee5045e658d174-node-hc --network https://www.googleapis.com/compute/v1/projects/playground/global/networks/e2e-test-nicksardo --description "" --allow tcp:10256 --source-ranges 130.211.0.0/22,35.191.0.0/16,209.85.152.0/22,209.85.204.0/22 --target-tags e2e-test-nicksardo-minion --project playground`
  1m            1m              1       service-controller                      Normal          EnsuredLoadBalancer             Ensured load balancer
```
2017-09-05 08:47:28 -07:00
saadali 8a2d1cd63a Remove redundant redunancy in gce_alpha.go 2017-09-04 20:16:32 -07:00
saadali 3b834cf665 Modify VolumeZonePredicate to handle multi-zone PV
Modifies the VolumeZonePredicate to handle a PV that belongs to more
then one zone or region. This is indicated by the zone or region label
value containing a comma separated list.
2017-09-04 20:13:32 -07:00
saadali d0e4271dfb GCE Cloud provider changes to enable RePD
GCE cloud provider changes for enabling GCE Regional PDs.
2017-09-04 20:10:32 -07:00
Nick Sardo 676b95e097 Gracefully handle permission errors when attempting to create firewall rules 2017-09-04 09:00:49 -07:00
Yassine TIJANI 144bd102c0 implementation of GetZoneByProviderID and GetZoneByNodeName for azure 2017-09-04 10:43:19 +02:00
Kubernetes Submit Queue 9ad2bd0f7f Merge pull request #51561 from cheftako/getzone
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

Implement GetZoneByProviderID & GetZoneByNodeName

Adding an implementation of GetZoneByProviderID & GetZoneByNodeName for
GCE.
This is related to ticket 50926.
This was tested as part of the ongoing separate GCE cloud provider work.

**What this PR does / why we need it**: It implements GCE methods needed by the cloud provider work.

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

**Special notes for your reviewer**: Tested with pull/50811

**Release note**:
<!--  Steps to write your release note:
```release-note NONE
```
2017-09-03 01:12:07 -07:00
Kubernetes Submit Queue 6b39b017b4 Merge pull request #50993 from wackxu/fixdepfuncaws
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

Replace the deprecated function with the suggest function in aws module

**What this PR does / why we need it**:

There are some deprecated  function and I replace the deprecated function with the suggest function in aws module.

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-09-02 23:50:07 -07:00
Kubernetes Submit Queue 9341f22bb6 Merge pull request #50112 from jlz27/multiple-ips
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

AWS: handle multiple IPs when using more than 1 network interface per ec2 instance

**What this PR does / why we need it**:
Adds support for kubelets running with the AWS cloud provider on ec2 instances with multiple network interfaces. If the active interface is not eth0, the AWS cloud provider currently reports the wrong node IP.

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

**Special notes for your reviewer**:
There is also some work necessary for handling multiple DNS names and such but I didn't fix them in this PR.

**Release note**:

```release-note
Fixed bug in AWS provider to handle multiple IPs when using more than 1 network interface per ec2 instance.
```
2017-09-02 23:50:03 -07:00
Kubernetes Submit Queue 6d32783453 Merge pull request #51301 from yujuhong/net-tiers-v0.3
Automatic merge from submit-queue

GCE: Add Alpha feature "Network Tiers" for external L4 load balancers

**Special notes for your reviewer**:
The PR has been manually tested in a GCE e2e cluster for the following conditions:
  1. When `network-tier` is not enabled in gce.conf, network tier annotations are completely ignored by the controller.
  2. When  `network-tier` is enabled in gce.conf:
     * Service w/ Standard tier: create a standard-tier LB.
     * Update Service to use a different tier: tear down the existing forwarding rule and release the IP before creating a new LB.
     * Service w/ an invalid tier value: `ensureExternalLoadBalancer()` returns an error, and controller emits an event.
     * Service w/ a user-owned static IP: check if the tier matches, if not, returns an error and emits an event.

I uploaded an e2e test #51483. You're welcome to review that one too.

**Release note**:

```release-note
GCE: Service object now supports "Network Tiers" as an Alpha feature via annotations.
```
2017-09-02 23:38:55 -07:00
Kubernetes Submit Queue 562d7ee37b Merge pull request #51590 from karataliu/instancetypebyid
Automatic merge from submit-queue

Fix InstanceTypeByProviderID for Azure

**What this PR does / why we need it**:

Fix change in #46940, should return InstanceType in function InstanceTypeByProviderID

Otherwise:
```
I0830 05:01:08.497989   15347 node_controller.go:328] Adding node label from cloud provider: beta.kubernetes.io/instance-type=/subscriptions/{id}/resourceGroups/{id}/providers/Microsoft.Compute/virtualMachines/k8s-agentpool1
```

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

**Special notes for your reviewer**:

**Release note**:
```
NONE
```

@brendandburns @realfake
2017-09-02 11:01:35 -07:00
Davanum Srinivas b6721bebea Changes in OpenStack cloud provider for latest gophercloud 2017-09-01 20:56:13 -04:00
Walter Fender 0167c6eb22 Implement GetZoneByProviderID & GetZoneByNodeName
Adding an implementation of GetZoneByProviderID & GetZoneByNodeName for
GCE.
This is related to ticket 50926.
This was tested as part of the ongoing separate GCE cloud provider work.

Added unit test.
Fix for wojtek-t (borrowed from FengyunPan)
2017-09-01 14:02:50 -07:00
Yu-Ju Hong 76945ad86d GCE: Add "Network Tiers" as an Alpha feature for L4 load balancers
This feature supports specifying what network tier (premium, standard)
to use for the load balancer backing the Service (type=LoadBalancer).
2017-09-01 09:13:20 -07:00
Kubernetes Submit Queue 324a3bf7f5 Merge pull request #51055 from nicksardo/gce-ilb-ip
Automatic merge from submit-queue (batch tested with PRs 51632, 51055, 51676, 51560, 50007)

GCE: Reserve address for ILBs during sync

**What this PR does / why we need it**:
This PR adds the ability for the service controller to hold the ILB's IP during sync which may delete/recreate the forwarding rule.

Fixes: #47531

**Release note**:
```release-note
GCE: Internal load balancer IPs are now reserved during service sync to prevent losing the address to another service.
```
2017-09-01 08:27:13 -07:00
Kubernetes Submit Queue b7381c3b03 Merge pull request #51515 from jianglingxia/jlx82918
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448)

fix typo about volumes

**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-31 22:09:13 -07:00
Kubernetes Submit Queue 63dfd147bf Merge pull request #51513 from yastij/aws-support-byProviderID
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448)

implementation of GetZoneByProviderID and GetZoneByNodeName for AWS

This a part of the #50926 effort

cc @luxas 

**Release note**:

```release-note
None
```
2017-08-31 22:09:10 -07:00
Ivan Towlson 37c42b10dd Azure: expose services on non-default subnets 2017-09-01 14:33:41 +12:00
Unknown faecedb174 Fix format specifiers in Azure cloud provider 2017-08-31 15:54:36 +12:00
Nick Sardo 644aa69da7 Reserve internal address for ILBs 2017-08-30 11:46:07 -07:00
Kubernetes Submit Queue e794dce445 Merge pull request #48936 from jsafrane/aws-key-check
Automatic merge from submit-queue

AWS: check validity of KSM key before creating a new encrypted disk.

AWS CreateVolume call does not check if referenced encryption key actually exists and returns a valid new AWS EBS volume even though an invalid key was specified. Later on it removes the EBS silently when its encryption fails.

To work around this buggy behavior we manually check that the key exists before calling CreateVolume.

Fixes #48438

/sig aws

Please review carefully. Can we safely assume that Kubernetes controller-manager can read encryption keys?

```release-note
aws: Kubernetes now checks existence of provided KSM (Key Management Service) key before creating an encrypted AWS EBS.
```
2017-08-30 08:05:56 -07:00
Kubernetes Submit Queue 022919d1a4 Merge pull request #51483 from yujuhong/e2e-net-tiers
Automatic merge from submit-queue

e2e: Add tests for network tiers in GCE

This test depends on #51301, which adds the new feature. Only the `e2e: Add tests for network tiers in GCE` commit is new.
#51301 should pass this new test.
2017-08-30 06:55:35 -07:00
Dong Liu 09f0850da3 Fix InstanceTypeByProviderID for Azure 2017-08-30 13:00:21 +08:00
Dong Liu 623d32a637 Fix splitProviderID for Azure 2017-08-30 12:30:34 +08:00
saadali 4ca1dbc589 Enable switching to alpha GCE disk API 2017-08-29 17:23:25 -07:00
Kubernetes Submit Queue 0d17e9deb7 Merge pull request #48574 from sakshamsharma/kms-transformer
Automatic merge from submit-queue

Add Google cloud KMS service for envelope encryption transformer

This adds the required pieces which will allow addition of KMS based encryption providers (envelope transformer).

For now, we will be implementing it using Google Cloud KMS, but the code should make it easy to add support for any other such provider which can expose Decrypt and Encrypt calls.

Writing tests for Google Cloud KMS Service may cause a significant overhead to the testing framework. It has been tested locally and on GKE though.

Upcoming after this PR:
* Complete implementation of the envelope transformer, which uses LRU cache to maintain decrypted DEKs in memory.
* Track key version to assist in data re-encryption after a KEK rotation.

Development branch containing the changes described above: https://github.com/sakshamsharma/kubernetes/pull/4

Envelope transformer used by this PR was merged in #49350 

Concerns #48522 

Planned configuration:
```
kind: EncryptionConfig
apiVersion: v1
resources:
  - resources:
    - secrets
    providers:
    - kms:
        cachesize: 100
        configfile: gcp-cloudkms.conf
        name: gcp-cloudkms
    - identity: {}
```

gcp-cloudkms.conf:
```
[GoogleCloudKMS]
    kms-location: global
    kms-keyring: google-container-engine
    kms-cryptokey: example-key
```
2017-08-29 11:11:10 -07:00
Kubernetes Submit Queue a9c80bc97b Merge pull request #51298 from yujuhong/gce-fakes
Automatic merge from submit-queue (batch tested with PRs 51298, 51510, 51511)

GCE: Add a fake forwarding rule service

Also add more methods to the address service.  These
will be used for testing soon.
2017-08-29 10:38:14 -07:00
jianglingxia 437f4640ca fix typo about volumes 2017-08-29 18:57:57 +08:00
Kubernetes Submit Queue d25a78a692 Merge pull request #51410 from nicksardo/gce-consume-netproj
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

GCE: Read networkProjectID param

Fixes #48515 

/assign bowei

The first commit is the original PR cherrypicked. The master's kubelet isn't provided a cloud config path, so the project is retrieved via instance metadata. In the GKE case, this project cannot be retrieved by the master and caused an error.

**Release note**:
```release-note
NONE
```
2017-08-29 03:20:02 -07:00
Yassine TIJANI 9585658eaa implementation of GetZoneByProviderID and GetZoneByNodeName for AWS 2017-08-29 11:37:27 +02:00
Saksham Sharma 3e11baf702 Add Google Cloud KMS plugin for encryption 2017-08-29 11:15:27 +05:30
Yu-Ju Hong f33c37e102 e2e: Add tests for network tiers in GCE 2017-08-28 18:40:20 -07:00
Yu-Ju Hong 22b2da2378 update bazel 2017-08-28 18:40:20 -07:00
Yu-Ju Hong 46eb7d8a55 GCE: Add annotations and helper functions for network tiers
These functions will be consumed in the follow-up changes.
2017-08-28 18:40:20 -07:00
Nick Sardo a48fe406be Consume new config value for network project id 2017-08-28 11:11:05 -07:00
Jan Safranek 1ea7fa84fc AWS: check validity of KSM key before creating a new encrypted disk.
AWS CreateVolume call does not check if referenced encryption key actually
exists and returns a valid new AWS EBS volume even though an invalid key
was specified. Later on it removes the EBS silently when its encryption fails.

To work around this buggy behavior we manually check that the key exists
before calling CreateVolume.
2017-08-28 12:52:57 +02:00
Kubernetes Submit Queue 4231308582 Merge pull request #51317 from FengyunPan/GetZoneByProviderID-openstack
Automatic merge from submit-queue

Implement GetZoneByProviderID and GetZoneByNodeName for openstack

This is part of #50926
cc @wlan0

**Release note**:
```release-note
NONE
```
2017-08-26 10:09:33 -07:00
Kubernetes Submit Queue 4b7135513f Merge pull request #51382 from nicksardo/revert-51038-gce-netproj
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Revert "GCE: Consume new config value for network project id"

Reverts kubernetes/kubernetes#51038

Broke GKE tests
2017-08-26 06:43:33 -07:00
Kubernetes Submit Queue 27fbb68f18 Merge pull request #51087 from oracle/for/upstream/master/ccm-instance-exists
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Add InstanceExistsByProviderID to cloud provider interface for CCM

**What this PR does / why we need it**:

Currently, [`MonitorNode()`](02b520f0a4/pkg/controller/cloud/nodecontroller.go (L240)) in the node controller checks with the CCM if a node still exists by calling `ExternalID(nodeName)`. `ExternalID` is supposed to return the provider id of a node which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist. 


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

**Special notes for your reviewer**:

We'll want to create a subsequent issue to track the implementation of these two new methods in the cloud providers.

**Release note**:

```release-note
Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager
```

/cc @wlan0 @thockin @andrewsykim @luxas @jhorwit2

/area cloudprovider
/sig cluster-lifecycle
2017-08-26 06:43:30 -07:00
Kubernetes Submit Queue c170f5bfa2 Merge pull request #50972 from FengyunPan/external-loadBalancerIP
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

Support for specifying external LoadBalancerIP on openstack

1. Support ServiceAnnotationLoadBalancerFloatingNetworkId for LB v1

2. Support for specifying external LoadBalancerIP on openstack
    Add ServiceAnnotationLoadBalancerInternal annotation to distinguish
    between internal LoadBalancerIP and external LoadBalancerIP.


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

**Release note**:
```release-note
NONE
```
2017-08-25 19:40:36 -07:00
Nick Sardo 0d55f6bdcb Revert "GCE: Consume new config value for network project id" 2017-08-25 18:02:10 -07:00
Josh Horwitz cf75c49883 change godoc based on feedback from luxas 2017-08-25 18:04:10 -04:00
Josh Horwitz 3528ceb27f address test & doc comments 2017-08-25 16:15:55 -04:00
Yu-Ju Hong 91275d23e2 GCE: Add a fake forwarding rule service
Also add more methods to the address service.
2017-08-25 08:49:11 -07:00
Nick Sardo 0028385e20 Consume new config value for network project id 2017-08-25 08:42:28 -07:00
FengyunPan 79d2b1dd4e Implement GetZoneByProviderID and GetZoneByNodeName for openstack
This is part of #50926
cc @wlan0
2017-08-25 23:08:00 +08:00
Kubernetes Submit Queue c025965db3 Merge pull request #51233 from bowei/add-alias
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

Add AddAliasToInstance() to gce cloud provider

- Adds AddAliasToInstance() to the GCE cloud provider.
- Adds field "secondary-range-name" to the gce.conf configuration file.

```release-note
NONE
```
2017-08-25 06:22:12 -07:00
Kubernetes Submit Queue d7102a0f36 Merge pull request #49770 from FengyunPan/fix-GetInstanceIDFromProviderID
Automatic merge from submit-queue (batch tested with PRs 51244, 50559, 49770, 51194, 50901)

Fix the matching rule of instance ProviderID

Url.Parse() can't parse ProviderID which contains ':///'.
This PR use regexp to match ProviderID.

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

**Release note**:
```release-note
NONE
```
2017-08-25 04:11:10 -07:00
Kubernetes Submit Queue 0cf928f681 Merge pull request #51222 from yujuhong/fake-addr-svc
Automatic merge from submit-queue (batch tested with PRs 51224, 51191, 51158, 50669, 51222)

Change the FakeCloudAddressService to store Alpha objects internally

The change assumes the compute Alpha object is the superset of the v1
object. By storing the Alpha objects internally in the fake, we can
convert them to Beta and v1 to test different functions.
2017-08-24 22:59:38 -07:00
andrewsykim bd3cc83110 cloudprovider.Zones should support external cloud providers 2017-08-24 21:05:49 -04:00