Commit Graph

2040 Commits (b13092554cd335eb4f367d5108e79709947effe4)

Author SHA1 Message Date
Pengfei Ni 806e4f5afa Add a general VMSet interface for both scale sets and availability sets 2017-12-13 14:11:55 +08:00
Kubernetes Submit Queue b4356de356
Merge pull request #56918 from feiskyer/azure-probe
Automatic merge from submit-queue (batch tested with PRs 56599, 56824, 56918, 56967, 56959). 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>.

Check both name and ports for azure health probes

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

Check both name and ports for azure health probes, so that probe ports could follow nodePorts changes.

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

**Special notes for your reviewer**:

Should be cherry-picked in 1.7, 1.8, 1.9.

**Release note**:

```release-note
BUG FIX: Check both name and ports for azure health probes
```
2017-12-11 19:58:17 -08:00
Kubernetes Submit Queue 08c98289c3
Merge pull request #56679 from andyzhangx/fix-time-waiting-issue
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>.

remove time waiting after create storage account (save 25s)

**What this PR does / why we need it**:
I found azure cloud provider will always sleep 25 seconds after creating a new azure storage account:
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure_blobDiskController.go#L531
Actually it's not necessary now, since it's already using sync way to create a storage account:
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure_blobDiskController.go#L531
Above code will wait until the storage account is created in azure.

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

**Special notes for your reviewer**:
Below are logs without this PR:
```
I1201 06:41:22.486663       1 azure_blobDiskController.go:522] azureDisk - Creating storage account pvc3329812692002 type Standard_LRS
I1201 06:41:22.486810       1 azure_blobDiskController.go:531] azureDisk - Creating storage account pvc3329812692002 type Standard_LRS begin to wait
I1201 06:41:40.440005       1 azure_blobDiskController.go:533] azureDisk - Creating storage account pvc3329812692002 type Standard_LRS end wait
I1201 06:41:40.440030       1 azure_blobDiskController.go:551] azureDisk - storage account pvc3329812692002 was just created, allowing time before polling status
I1201 06:42:05.440176       1 azure_blobDiskController.go:553] azureDisk - storage account pvc3329812692002 was just created, allowing time before polling status, end wait
```

Below are logs with this PR, it could save 25s now:
```
I1201 07:36:07.755540       1 azure_blobDiskController.go:523] azureDisk - Creating storage account pvc33298126923895004820 type Standard_LRS
I1201 07:36:07.755652       1 azure_blobDiskController.go:532] azureDisk - Creating storage account pvc33298126923895004820 type Standard_LRS begin to wait
I1201 07:36:25.722540       1 azure_blobDiskController.go:534] azureDisk - Creating storage account pvc33298126923895004820 type Standard_LRS end wait
I1201 07:36:25.722557       1 azure_blobDiskController.go:552] azureDisk - storage account pvc33298126923895004820 was just created, allowing time before polling status
I1201 07:36:25.722562       1 azure_blobDiskController.go:554] azureDisk - storage account pvc33298126923895004820 was just created, allowing time before polling status, end wait
I1201 07:36:26.011157       1 azure_blobDiskController.go:436] azureDisk - storage account:pvc33298126923895004820 had no default container(3329812692) and it was created
I1201 07:36:26.011201       1 azure_blobDiskController.go:182] azureDisk - creating page blob andy-mgwin1710-dynamic-pvc-88c50c37-d668-11e7-94dc-000d3a041274.vhd in container 3329812692 account pvc33298126923895004820
```
**Release note**:

```
none
```
/sig azure
/assign @khenidak
2017-12-11 16:25:47 -08:00
prashima c52413b82e Fixes issue#392. 2017-12-11 11:12:36 -08:00
Davanum Srinivas 62f45189e1 Sort default cidrs for reproducible builds
In different distros or environments, we may end up with a different
order of the default string printed during help and man page generation,
So we should sort so the string we print is the same everytime.
2017-12-10 21:05:17 -05:00
Kubernetes Submit Queue a6741ea743
Merge pull request #45192 from cehoffman/azure_deadlock
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>.

Prevent deadlock on azure zone fetch in presence of failure

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

This fixes a bug in the Zone get function for the Azure cloud provider.

**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
Fix deadlock in azure cloud provider zone fetching
```
2017-12-08 11:50:34 -08:00
Pengfei Ni 65efeee64f Remove unused ScrubDNS interface from cloudprovider 2017-12-08 16:03:56 +08:00
Pengfei Ni 6bc18d9958 Check both name and ports for azure health probes 2017-12-07 15:33:02 +08:00
Kubernetes Submit Queue 64ed037e68
Merge pull request #56861 from freehan/fix-gce-config-array
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.conf multi-value parameter processing

fixes: https://github.com/kubernetes/kubernetes/issues/56833

alternative to: https://github.com/kubernetes/kubernetes/pull/56857


```release-note
NONE
```
2017-12-05 16:45:14 -08:00
Kubernetes Submit Queue 86ff044d84
Merge pull request #56688 from karataliu/fix_azure_internallb_static
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 static IP issue for Azure internal LB

**What this PR does / why we need it**:
Fix regression for Azure internal LB with static IP support

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

**Special notes for your reviewer**:

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

```
2017-12-05 13:57:56 -08:00
Minhan Xia af42fbd3d0 fix gce.conf multi-value parameter processing 2017-12-05 13:30:04 -08:00
Kubernetes Submit Queue 3fef902161
Merge pull request #56709 from gnufied/cluster-role-for-cloud-provider
Automatic merge from submit-queue (batch tested with PRs 56785, 56709). 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>.

cloud-provider needs cluster-role to apply taint to the node

When volume is stuck in attaching state on AWS, cloud-provider
needs to taint the node. But the node can not be tainted
without proper access. Without this change https://github.com/kubernetes/kubernetes/pull/55558 will not work.

xref - https://github.com/kubernetes/kubernetes/issues/56819

cc @jsafrane @liggitt 

/sig storage

```release-note
none
```
2017-12-04 17:14:14 -08:00
Kubernetes Submit Queue 36ea6de4a0
Merge pull request #52013 from FengyunPan/autoprobing-external-network
Automatic merge from submit-queue (batch tested with PRs 52013, 56719). 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>.

Support autoprobing floating-network-id for openstack cloud provider

Currently if user doesn't specify floatingnetwork-id and loadbalancer.openstack.org/floating-network-id annotation, openstack cloud provider can't create a external LoadBalancer service.
Actually we can get  floatingnetwork-id automatically. 
If we get multiple  floatingnetwork-ids, then ask user to specify one, or we use the  floatingnetwork-id to create floatingip for external LoadBalancer service.

This is a part of #50726

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

**Release note**:
```release-note
Support autoprobing floating-network-id for openstack cloud provider
```
2017-12-04 10:55:14 -08:00
Hemant Kumar 514f219c22 cloud-provider needs cluster-role to apply taint to the node
When volume is stuck in attaching state on AWS, cloud-provider
needs to taint the node. But the node can not be tainted
without proper access.
2017-12-04 10:57:21 -05:00
Shaomin Chen ecdb47a40b Fix issue #390 2017-12-01 16:13:23 -08:00
Dong Liu da8e85e28e Fix static IP issue for Azure internal LB 2017-12-01 18:34:47 +08:00
stewart-yu af882afd3e should not ignore return messages from wait function 2017-12-01 16:02:06 +08:00
andyzhangx 2afba1e40b remove time waiting after create storage account 2017-12-01 07:45:56 +00:00
stewart-yu f0d894543b remove unnecessary condition judgement 2017-12-01 15:15:31 +08:00
Kubernetes Submit Queue c933067cd3
Merge pull request #56607 from justinsb/aws_nvme_2
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>.

AWS: Support for mounting nvme volumes

Supports mounting nvme volumes

Fixes #56155

```release-note
AWS: Detect EBS volumes mounted via NVME and mount them
```
2017-11-30 19:25:42 -08:00
Kubernetes Submit Queue 3904cc7803
Merge pull request #54687 from andyzhangx/createvolume-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 CreateVolume func: use search mode instead

**What this PR does / why we need it**:
This is a little fall back for CreateVolume func: use search mode for Dedicated kind as @rootfs suggested.

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

**Special notes for your reviewer**:
I reference the implmentation of v1.6 in the same CreateVolume func
https://github.com/kubernetes/kubernetes/blob/release-1.6/pkg/cloudprovider/providers/azure/azure_storage.go#L213-L247

**Release note**:

```
fix azure storage account exhausting issue by using azure disk mount
```
/sig azure

@rootfs @feiskyer @karataliu
2017-11-30 13:55:29 -08:00
Abrar Shivani 94b45a9e84 Fix session out issue while creating volume and error message coming up while attaching the volume 2017-11-30 12:06:40 -08:00
Justin Santa Barbara 8bfb676378 AWS: Support for mounting nvme volumes 2017-11-30 14:48:33 -05:00
Kubernetes Submit Queue a0ed61671c
Merge pull request #55987 from andyzhangx/azure-reviewer
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>.

add andyzhangx as azure reviewer

**What this PR does / why we need it**:
add andyzhangx as azure reviewer

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

**Special notes for your reviewer**:

**Release note**:

```
none
```

/sig azure
/assign @jdumars @brendandburns
2017-11-30 09:24:18 -08:00
andyzhangx 08f40eac6d return error when create azure share failed
remember error info in CreateFileShare

fix typo
2017-11-30 06:57:40 +00:00
Fabian Ruff 51a367f806 relax server list option, set Blackhole field 2017-11-29 19:08:14 +01:00
wenlxie e80dcba297 should check the return value of os.DiskIsAttached 2017-11-29 13:02:27 +08:00
Kubernetes Submit Queue 2c9ffc0e88
Merge pull request #53764 from FengyunPan/unique-sg
Automatic merge from submit-queue (batch tested with PRs 56520, 53764). 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>.

Add service.UID into security group name

Related to: #53714 

**Release note**:
```release-note
NONE
```
2017-11-28 19:13:14 -08:00
Kubernetes Submit Queue 6503f39bb1
Merge pull request #55893 from gnufied/aws-detach-fix-for-stopped-nodes
Automatic merge from submit-queue (batch tested with PRs 55893, 55906, 55026). 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>.

AWS: Implement fix for detaching volume from stopped instances

We should detach volume from stopped instanes.

Fixes https://github.com/kubernetes/kubernetes/issues/55892

```release-note
AWS: Fix detaching volume from stopped nodes.
```
2017-11-28 18:24:49 -08:00
Kubernetes Submit Queue 51033c4dec
Merge pull request #56437 from dims/fix-unit-tests-that-need-openstack
Automatic merge from submit-queue (batch tested with PRs 56446, 56437). 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 unit tests that need openstack

**What this PR does / why we need it**:
Currently the unit tests that depend that they be on running inside an openstack vm fail as no one seem to have run them for a while.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-28 13:08:13 -08:00
Kubernetes Submit Queue 6851e6abde
Merge pull request #56344 from gmarek/gce-lb-fix-19
Automatic merge from submit-queue (batch tested with PRs 56344, 56473). 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 panic in GCE loadbalancer library
2017-11-28 04:17:30 -08:00
andyzhangx 090c67539a use ListByResourceGroup instead of List() 2017-11-28 08:04:14 +00:00
FengyunPan de7c96ad3c Support autoprobing floating-network-id for openstack cloud provider 2017-11-28 09:37:00 +08:00
Saad Ali 0475c8527c Change `GCEDiskAlphaAPI` to `DiskAlphaAPI`
Change name in comment
2017-11-27 16:23:31 -08:00
Kubernetes Submit Queue ba4b07a431
Merge pull request #52910 from FengyunPan/volume-v3
Automatic merge from submit-queue (batch tested with PRs 56094, 52910, 55953, 56405, 56415). 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>.

Support VolumeV3 for OpenStack cloud Provider

Currently OpenStack supports Cinder v3 API, let Kubernetes support
it too.

Fix #52877

**Release note**:
```release-note
OpenStack cloud provider supports Cinder v3 API.
```
2017-11-27 16:04:22 -08:00
Davanum Srinivas 8300dd8901 Find a server name and router id to test TestRoutes 2017-11-27 16:32:10 -05:00
Davanum Srinivas 076f4da28b Allow volume test to run outside an actual OpenStack VM 2017-11-27 14:03:04 -05:00
Davanum Srinivas f5299fe7e1 Skip TestRoutes if extension or router-id is missing 2017-11-27 14:02:23 -05:00
Davanum Srinivas 90a531ceb5 Set bs-version to auto for tests 2017-11-27 13:48:27 -05:00
Davanum Srinivas c31bfe67a4 LBaaS v1 is no longer supported 2017-11-27 13:44:46 -05:00
stewart-yu d8ebc4f88f fix bad return Error 2017-11-25 08:50:01 +08:00
Marek Grabowski 94b6a1fb70 Fix panic in GCE loadbalancer library 2017-11-24 13:27:57 +00:00
Hemant Kumar ac2c68ad8f AWS: Implement fix for detaching volume from stopped instances
Clean up detach disk functions and remove duplication
2017-11-23 11:02:09 -05:00
edisonxiang aab6efd192 Change wording in OpenStack Provider 2017-11-23 10:48:23 +08:00
Hemant Kumar 8c49d1db02 Implement disk resizing for AWS
Update bazel files
2017-11-22 21:38:54 -05:00
Kubernetes Submit Queue 7dd41577e3
Merge pull request #55815 from gnufied/implement-node-fs-resize
Automatic merge from submit-queue (batch tested with PRs 55545, 55548, 55815, 56136, 56185). 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 node fs resize

Implement kubelet side resizing of file system.

xref - https://github.com/kubernetes/features/issues/284 

```release-note
Implement kubelet side file system resizing. Also implement GCE PD resizing
```
2017-11-22 16:52:29 -08:00
Kubernetes Submit Queue 11cf604377
Merge pull request #55545 from osoriano/private/osoriano/gcp-initialize-alphafeaturegate
Automatic merge from submit-queue (batch tested with PRs 55545, 55548, 55815, 56136, 56185). 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>.

Ensure GCE AlphaFeatureGate initialized

If no config file is specified for the controller-manager,
the GCE CloudConfig.AlphaFeatureGate property is not initialized.

This can cause a panic when checking for alpha features in the GCE
provider.

```release-note
NONE 
```

Closes #55544
2017-11-22 16:52:23 -08:00
Fabian Ruff 2e177ef9b2
return routes for unknown next hops 2017-11-22 23:44:07 +01:00
Hemant Kumar 7be94c4b06 Implement resizing support for GCE
Fix GCE attacher test
Update bazel files
2017-11-22 16:24:58 -05:00
Kubernetes Submit Queue 6b1b6d504a
Merge pull request #56024 from dimpavloff/aws-elb-set-hc-params
Automatic merge from submit-queue (batch tested with PRs 56211, 56024). 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>.

allow ELB Healthcheck configuration via Service annotations

**What this PR does / why we need it**:
The default settings which are set on the ELB HC work well but there are cases when it would be better to tweak its parameters -- for example, faster detection of unhealthy backends. This PR makes it possible to override any of the healthcheck's parameters via annotations on the Service, with the exception of the Target setting which continues to be inferred from the Service's spec.

**Release note**:
```release-note
It is now possible to override the healthcheck parameters for AWS ELBs via annotations on the corresponding service. The new annotations are `healthy-threshold`, `unhealthy-threshold`, `timeout`, `interval` (all prefixed with `service.beta.kubernetes.io/aws-load-balancer-healthcheck-`)
```
2017-11-22 08:48:43 -08:00
langyenan f0853342b2 refactor(service-controller/gce/ensureInternalBackendService): delete unused variable 2017-11-22 17:16:37 +08:00
FengyunPan f95ac1c87a Support VolumeV3 for OpenStack cloud Provider 2017-11-22 16:45:38 +08:00
Kubernetes Submit Queue b18d86d5cc
Merge pull request #51498 from NickrenREN/pvc-resize-cinder
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 volume resize for cinder

**What this PR does / why we need it**:
resize for cinder
xref: [resize proposal](https://github.com/kubernetes/community/pull/657)

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: xref https://github.com/kubernetes/community/pull/657
Follow up: #49727

**Special notes for your reviewer**:

**Release note**:
```release-note
Implement volume resize for cinder
```

wip, assign to myself first

/assign @NickrenREN
2017-11-21 23:40:37 -08:00
Kubernetes Submit Queue 2f2ab910ef
Merge pull request #55752 from kevinkim9264/fix-azure-loadbalancer
Automatic merge from submit-queue (batch tested with PRs 55812, 55752, 55447, 55848, 50984). 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 Load Balancer reconciliation should consider all Kubernetes-controlled properties of a LB NSG

**What this PR does / why we need it**:
This PR refers to issue #55733 
With this PR, Kubernetes will update Azure nsg rules based on not just name, but also based on other properties such as destination port range and destination ip address.
We need it because right now Kubernetes will detect the difference and update only if there is difference in Name of nsg rule. It's been working fine for changing destination port range and source IP address because these two are part of the Name. (which external users should not assume) Basically right now, Kubernetes won't detect the difference if I go ahead and change any part of nsg rule using port UI. 
This PR will let Kubernetes detect the difference and always try to reconcile nsg rules with service definition.

**Which issue(s) this PR fixes** :
Fixes #55733 

**Special notes for your reviewer**: None

**Release note**:

```release-note
Kubernetes update Azure nsg rules based on not just difference in Name, but also in Protocol, SourcePortRange, DestinationPortRange, SourceAddressPrefix, DestinationAddressPrefix, Access, and Direction.
```
2017-11-21 17:57:31 -08:00
Kubernetes Submit Queue c975b13869
Merge pull request #55833 from feiskyer/azure-vmss
Automatic merge from submit-queue (batch tested with PRs 56128, 56004, 56083, 55833, 56042). 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>.

Add initial Virtual Machine Scale Sets (VMSS) support in Azure

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

This is the first step of adding Virtual Machine Scale Sets (VMSS) support in Azure, it

- Adds  vmType params to support both vmss and standard in Azure
- Adds initial InstanceID/InstanceType/IP/Routes support for vmss instances
- Master nodes may not belong to any scale sets, so it falls back to VirtualMachinesClient for such instances

Have validated that nodes could be registered and pods could be scheduled and run correctly.

Still more work to do to fully support Azure VMSS. And next steps are tracking at #43287.

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

Part of #43287.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-21 17:04:59 -08:00
Kubernetes Submit Queue 63d4b85bf4
Merge pull request #53400 from micahhausler/aws-nlb
Automatic merge from submit-queue (batch tested with PRs 54316, 53400, 55933, 55786, 55794). 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>.

Add Amazon NLB support

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

This adds support for AWS's NLB for `LoadBalancer` services.

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

Fixes #52173

**Special notes for your reviewer**:

This is NOT yet ready for merge, but I'd love any feedback before it is.

This requires at least `v1.10.40` of the [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go), which is not yet included in Kubernetes. Per @justinsb, I'm waiting on possibly #48314 to update to `v1.10.40`  or some other PR. 

I tried to make the change as easy to review as possible, so some LoadBalancer logic is duplicated in the `if isNLB(annotations)` blocks. I can refactor that and sprinkle more `isNLB()` switches around, but it might be harder to view the diff.

**Other Notes:**

* NLB's subnets cannot be modified after creation (maybe look for public subnets in all AZ's?).  Currently, I'm just using `c.findELBSubnets()`
* Health check uses TCP with all the NLB default values. I was thinking HTTP health checks via annotation could be added later. Should that go into this PR?
* ~~`externalTrafficPolicy`/`healthCheckNodePort` are ignored. Should those be implemented for this PR?~~
* `externalTrafficPolicy` and subsequent `healthCheckNodePort` are handled properly. This may come with uneven load balancing, as NLB doesn't support weighted backends.
* With classic ELB, you have a security group the ELB is inside of to associate Instance (k8s node) SG rules with a LoadBalancer (k8s Service), but NLB's don't have a security group. Instead, I use the `Description` field on [`ec2.IpRange`](https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#IpRange) with the following annotations. Is this ok? I couldn't think of another way to associate SG rule to the NLB
    * Node SG gets an rule added for VPC cidr on NodePort for Health Check with annotation in description `kubernetes.io/rule/nlb/health=<loadBalancerName>`
    * Node SG gets an rule added for `loadBalancerSourceRanges` to  NodePort for client traffic with annotation in description `kubernetes.io/rule/nlb/client=<loadBalancerName>`
    * **Note: if `loadBalancerSourceRanges` is unspecified, this opens instance security groups to traffic from `0.0.0.0/0` on the service's nodePorts**
* Respects internal annotation
* Creates a TargetGroup per frontend port: simplifies updates when you have same backend port for multiple front end ports.
* Does not (yet) verify that we're under the NLB limits in terms of # of listeners
* `UpdateLoadBalancer()`  basically just calls `EnsureLoadBalancer` for NLB's. Is this ok?

**Areas for future improvement or optimization**:

* A new annotation indicating a new security group should be created for NLB traffic and instances would be placed in this new SG. (Could bump up against the default limit of 5 SG's per instance)
* Only create a client health check security group rule when the VPC cidr is not a subset of `spec.loadBalancerSourceRanges`
* Consolidate TargetGroups if a service has 2+ frontend ports and the same nodePort.
* A new annotation for specifying TargetGroup Health Check options.

**Release note**:

```release-notes
Add Amazon NLB support - Fixes #52173
```

ping @justinsb @bchav
2017-11-21 15:04:25 -08:00
kevinkim 8514537759 comment on findSecurityRule and fmt 2017-11-21 12:44:15 -08:00
Kubernetes Submit Queue 421e4951cf
Merge pull request #56021 from xiangpengzhao/gce-panic
Automatic merge from submit-queue (batch tested with PRs 56021, 55843, 55088, 56117, 55859). 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 panic when AlphaFeatureGate isn't configured for gcp.

**What this PR does / why we need it**:
When AlphaFeatureGate isn't configured, the pointer will be nil. This PR fixes it.

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

**Special notes for your reviewer**:
cc @jsiebens 

**Release note**:

```release-note
NONE
```
2017-11-21 12:16:48 -08:00
kevinkim d39b517ad3 findSecurityRule returns true when it matches most of characteristics. 2017-11-21 11:28:47 -08:00
Kubernetes Submit Queue d1e711a6af
Merge pull request #55307 from xiangpengzhao/fix-aws-panic
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>.

Check if SleepDelay of AWS request is nil before sign.

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

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

**Special notes for your reviewer**:
/cc @justinsb 

**Release note**:

```release-note
NONE
```
2017-11-21 06:47:30 -08:00
dimitar 8cf7c5e34a allow ELB HC configuration via Service annotations
The constants which have been used so far have been set as default in
case the annotations have not been set.
2017-11-21 14:34:05 +00:00
Kubernetes Submit Queue 5353d588b6
Merge pull request #55611 from stewart-yu/regexMatch
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>.

using Regexp Match 

**What this PR does / why we need it**:
using regexp match achieve find efficiently

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-21 05:58:23 -08:00
Kubernetes Submit Queue 80e1c7907e
Merge pull request #52322 from davidz627/multizoneWrongZone
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>.

Fixes issue where PVCs using `standard` StorageClass create PDs in disks in wrong zone in multi-zone GKE clusters

Fixes #50115

Changed GetAllZones to only get zones with nodes that are currently running (renamed to GetAllCurrentZones). Added E2E test to confirm this behavior.
2017-11-21 01:35:01 -08:00
NickrenREN af108fb938 implement cinder resize 2017-11-21 15:55:49 +08:00
Pengfei Ni 924f9a45f3 Add fake clients and unit tests 2017-11-21 07:14:27 +00:00
Pengfei Ni 65c0738a82 Support getting instanceID, type and IP for vmss instances 2017-11-21 07:14:07 +00:00
Pengfei Ni 07a8dff4fa Add utils for vmss typed instances 2017-11-21 07:13:42 +00:00
Pengfei Ni 0f52220ed1 Add initial VMType (via vmType param) in azure cloud provider 2017-11-21 07:12:49 +00:00
Kubernetes Submit Queue e201d34296
Merge pull request #55845 from vmware/multi-vc-upstream
Automatic merge from submit-queue (batch tested with PRs 55112, 56029, 55740, 56095, 55845). 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>.

Updating vsphere cloud provider to support k8s cluster spread across multiple vCenters

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

vSphere cloud provider in Kubernetes 1.8 was designed to work only if all the nodes of the cluster are in one single datacenter folder. This is a hard restriction that makes the cluster not span across different folders/datacenter/vCenters. Users have use-cases to span the cluster across datacenters/vCenters.

**Which issue(s) this PR fixes** 
Fixes # https://github.com/vmware/kubernetes/issues/255

**Special notes for your reviewer**:
This is a change purely in vsphere cloud provider and no changes in kubernetes core are needed.

**Release note**:
```release-note
With this change
 - User should be able to create k8s cluster which spans across multiple ESXi clusters, datacenters or even vCenters.
 - vSphere cloud provider (VCP) uses OS hostname and not vSphere Inventory VM Name.
   That means, now  VCP can handle cases where user changes VM inventory name.
- VCP can handle cases where VM migrates to other ESXi cluster or datacenter or vCenter.

The only requirement is the shared storage. VCP needs shared storage on all Node VMs.
```

Internally tested and reviewed the code.

@tthole, @shaominchen, @abrarshivani
2017-11-20 21:03:50 -08:00
xiangpengzhao 90ecc49386 Fix panic when AlphaFeatureGate isn't configured for gce. 2017-11-21 12:25:07 +08:00
FengyunPan 669520f9bb Add EnsureOldSecurityGroupDeleted to delete old security group
Consider the migration from the old security group name to the new
security group name, we need delete the old security group.
At V1.10, we can assume everyone is using the new security group
names and remove this code.
2017-11-21 09:38:43 +08:00
FengyunPan 7215ce30b1 Add service.UID into security group name
Related to: #53714
2017-11-21 09:29:32 +08:00
David Zhu e5aec8645d Changed GetAllZones to only get zones with nodes that are currently
running (renamed to GetAllCurrentZones). Added E2E test to confirm this
behavior.

Added node informer to cloud-provider controller to keep track of zones
with k8s nodes in them.
2017-11-20 16:04:18 -08:00
Jingtao Ren 35964d4a80 fix rebase test error 2017-11-20 09:53:34 -08:00
Jingtao Ren 1e3ec2b639 correct doc for reconcileSecurityGroup 2017-11-20 09:32:47 -08:00
itowlson 422dac5d9b Option to consolidate Azure NSG rules for services (#13)
* Option to consolidate Azure NSG rules for services

* Fixed panic checking for service on other Azure LB
2017-11-20 09:32:47 -08:00
Jingtao Ren 839e7f4c38 add test for flipServiceInternalAnnotation 2017-11-20 09:32:47 -08:00
Jingtao Ren 1b9b3fd7c7 assign random ip instead of hard code 2017-11-20 09:32:47 -08:00
Jingtao Ren ff961163aa clean up retry logic, since we try at least once 2017-11-20 09:32:47 -08:00
Jingtao Ren c3050e3ab4 make newFake* functions unexported 2017-11-20 09:32:47 -08:00
Jingtao Ren 1bf1c0d4d5 add azure_fakes.go Boilerplate header 2017-11-20 09:32:47 -08:00
Jingtao Ren 83f18ca3f0 refactor fake Delete function 2017-11-20 09:32:47 -08:00
Jingtao Ren 6b36a70d79 fix fake name convention 2017-11-20 09:32:47 -08:00
Jingtao Ren faec1d7f46 for error case, return nil for SG 2017-11-20 09:32:46 -08:00
Jingtao Ren 88aab6f67b fix azure bazel BUILD 2017-11-20 09:32:46 -08:00
NIkhil Bhatia e8c65f7130 address more code review comments 2017-11-20 09:32:46 -08:00
Jingtao Ren 69abfa676d naming, comment, typo correction 2017-11-20 09:32:46 -08:00
NIkhil Bhatia 408f739618 code-review- add logs and comments (#11)
add logs and comments & fix getMasterNode
2017-11-20 09:32:46 -08:00
Jingtao Ren 585dabc279 rename azure interfaces to conform with golang convention 2017-11-20 09:32:46 -08:00
Jingtao Ren 443339da0a fix documents, and correct typo 2017-11-20 09:32:46 -08:00
Jingtao Ren edfb2ad552 Azure load balancer general improvement 2017-11-20 09:32:46 -08:00
Micah Hausler 502e8f8c29 Add aws elbv2 to vendor 2017-11-20 08:52:57 -05:00
Micah Hausler f9445b9dc7 Add Amazon NLB support 2017-11-20 08:52:57 -05:00
Kubernetes Submit Queue 142579c16d
Merge pull request #54260 from itowlson/azure-lb-session-affinity
Automatic merge from submit-queue (batch tested with PRs 55217, 54260). 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>.

Unit tests for Azure service session affinity

**What this PR does / why we need it**: We added session affinity support in the Azure load balancer in commit 8b50b83067. This PR adds unit tests for this behaviour.

**Which issue this PR fixes**: None

**Special notes for your reviewer**: None

**Release note**:

```release-note
NONE
```
2017-11-20 05:41:25 -08:00
andyzhangx 760cc6f78b search by accounttype in CreateVolume func
fix review comments
2017-11-19 11:18:08 +00:00
andyzhangx 310168c1d2 fix CreateVolume: search mode for Dedicated kind 2017-11-19 11:16:50 +00:00
xiangpengzhao 1d6fea99a7 Check if SleepDelay of AWS request is nil before sign. 2017-11-19 16:33:56 +08:00
Kubernetes Submit Queue e8df0042b6
Merge pull request #55927 from andyzhangx/init-storageaccount
Automatic merge from submit-queue (batch tested with PRs 55233, 55927, 55903, 54867, 55940). 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 azure disk storage account init issue

**What this PR does / why we need it**:
There are two issues for the original azure disk storage account initialaztion code:
1) wrong controller-master detection, see issue #54570, #55776 
2) should not initialize two storage account even if it's not necessary, see issue #50883

This PR would fix the above two issues:
For 1: remove the controller-master process binding
For 2: remove the storage account initialization process, just create on demand

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #54570
Fixes #55776
Fixes #50883

**Special notes for your reviewer**:
@rootfs @karataliu 

**Release note**:

```
fix azure disk storage account init issue
```
/sig azure
2017-11-18 12:26:09 -08:00
Kubernetes Submit Queue cf5d4011ac
Merge pull request #55731 from georgebuckerfield/elb-tagging
Automatic merge from submit-queue (batch tested with PRs 50457, 55558, 53483, 55731, 52842). 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>.

Ensure new tags are created on existing ELBs

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

When editing an existing service of type LoadBalancer in an AWS environment and adding the `service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags` annotation, you would expect the new tags to be set on the load balancer, however this doesn't happen currently. The annotation only takes effect if specified when the service is created.

This PR adds an AddTags method to the ELB interface and uses this to ensure tags set in the annotation are present on the ELB. If the tag key is already present, the value will be updated.

This PR does not remove tags that have been removed from the annotation, it only add/updates tags.

**Which issue(s) this PR fixes**:
Fixes #54642 

**Special notes for your reviewer**:
The change requires that the IAM policy of the master instance(s) has the `elasticloadbalancing:AddTags` permission.

**Release note**:

```release-note
Ensure additional resource tags are set/updated AWS load balancers
```
2017-11-18 11:36:22 -08:00
Kubernetes Submit Queue 1b3d880725
Merge pull request #55558 from gnufied/implement-node-taint-for-attaching-volumes
Automatic merge from submit-queue (batch tested with PRs 50457, 55558, 53483, 55731, 52842). 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>.

Apply taint when a volume is stuck in attaching state

When a volume is stuck in attaching state for too long on a node, it is best to make node unschedulable so as any other pod may not be scheduled on it.

Fixes https://github.com/kubernetes/kubernetes/issues/55502 

```release-note
AWS: Apply taint to a node if volumes being attached to it are stuck in attaching state
```
2017-11-18 11:36:16 -08:00
Kubernetes Submit Queue cb91e2d9b1
Merge pull request #55313 from petrutlucian94/openstack_hv_pv
Automatic merge from submit-queue (batch tested with PRs 55642, 55897, 55835, 55496, 55313). 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>.

OpenStack: fetch volume path from metadata service

**What this PR does / why we need it**:
Updates the OpenStack cloud provider to use the Nova metadata service as a fallback when retrieving mounted PV disk paths. Note that the Nova instance device metadata will contain the disk address and bus, which allows finding its path. 

This is needed as the *standard* mechanism of retrieving disk paths is not available when running k8s under OpenStack Hyper-V hosts.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-18 10:46:41 -08:00
andyzhangx d93f48adb9 add andyzhangx as reviewer 2017-11-18 04:56:39 +00:00
rohitjogvmw 79e1da68d2 Updating vSphere Cloud Provider (VCP) to support k8s cluster spead across multiple ESXi clusters, datacenters or even vSphere vCenters
- vsphere.conf (cloud-config) is now needed only on master node
   - VCP uses OS hostname and not vSphere inventory name
   - VCP is now resilient to VM inventory name change and VM migration
2017-11-17 14:49:32 -08:00
andyzhangx 3d60d18002 remove initialize storage account pool process
remove init func

allow getStorageAccounts failed
2017-11-17 11:55:39 +00:00
Kubernetes Submit Queue b223955c06
Merge pull request #54507 from micahhausler/aws-elb-security-policy
Automatic merge from submit-queue (batch tested with PRs 54134, 54507). 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 service annotation for AWS ELB SSL policy

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

This work adds a new supported service annotation for AWS clusters, `service.beta.kubernetes.io/aws-load-balancer-ssl-negotiation-policy`, which lets users specify which [predefined AWS SSL policy](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html) they would like to use.

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

Fixes #43744

**Special notes for your reviewer**:

While this PR doesn't allow users to define their own cipher policy in an annotation, a user could (out of band) create their own policy on an ELB with the naming convention `k8s-SSLNegotiationPolicy-<my-policy-name>` and specify it with the above annotation.

This is my second k8s PR, and I don't have experience with an e2e test, would that be required for this change? I did run this in a kubeadm cluster and it worked like a charm. I was able to choose different predefined policies, and revert to the default policy when I removed the annotation.

**Release note**:

```release-note
Added service annotation for AWS ELB SSL policy
```
2017-11-17 01:17:11 -08:00
Kubernetes Submit Queue bb82a3acad
Merge pull request #55491 from gnufied/fix-dangling-attach-errors
Automatic merge from submit-queue (batch tested with PRs 55392, 55491, 51914, 55831, 55836). 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 dangling attach errors

Detach volumes from shutdown nodes and ensure that
dangling volumes are handled correctly in AWS

Fixes https://github.com/kubernetes/kubernetes/issues/52573 

```release-note
Implement correction mechanism for dangling volumes attached for deleted pods
```
2017-11-17 00:18:20 -08:00
Hemant Kumar 5297c146c1 Fix dangling attach errors
Detach volumes from shutdown nodes and ensure that
dangling volumes are handled correctly in AWS
2017-11-16 08:43:36 -05:00
Jamie Hannaford 29855470e9 Allow use of Octavia endpoint 2017-11-16 10:55:59 +01:00
georgebuckerfield 36d59704d9 Modify the AWS cloud provider to ensure additional load balancer tags are added to existing load balancers 2017-11-14 21:47:50 +00:00
osoriano 58513b8c0b Ensure GCE AlphaFeatureGate initialized
If no config file is specified for the controller-manager,
the GCE CloudConfig.AlphaFeatureGate property is not initialized.

This can cause a panic when checking for alpha features in the GCE
provider.

Closes #55544
2017-11-14 16:20:23 +00:00
stewart-yu 1a11a1886f using regexp match achieve find efficiently 2017-11-14 12:56:56 +08:00
whateverv5 aafac9fec2 Using lower case of fmt.Errorf 2017-11-14 12:40:16 +08:00
Hemant Kumar 063cd2dfa5 Apply taint when a volume is stuck in attaching state on node 2017-11-13 12:30:52 -05:00
Kubernetes Submit Queue e686b63465
Merge pull request #47849 from tomerf/azure_dns_label
Automatic merge from submit-queue (batch tested with PRs 55594, 47849, 54692, 55478, 54133). 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 service annotation to set Azure DNS label for public IP

**What this PR does / why we need it**: Added a feature to set the DNS label for public IPs in the Azure cloud.
For example:
```
apiVersion: v1
kind: Service
metadata:
  annotations:
    service.alpha.kubernetes.io/label-name: myservice
...
```
Will resolve myservice.westus.cloudapp.azure.com to the service's IP.

**Which issue this PR fixes**: fixes #44775

**Special notes for your reviewer**: Note that this is defining a new annotation, so feel free to point out if there is a preferred convention or anything else that needs to be done.

**Release note**:
```release-note
New service annotation "service.beta.kubernetes.io/azure-dns-label-name" to set Azure DNS label name for public IP
```
2017-11-13 06:09:21 -08:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Lucian Petrut 559f83a93d openstack: fetch volume path from metadata service
The OpenStack cloud provider retrieves mounted Cinder volume paths
by looking in /dev/disk/by-id, expecting the disk serial IDs (e.g.
SCSI ID) to include the volume ID.

The issue is that not all hypervisors are able to expose this.
For example, Hyper-V will just preserve the original Cinder volume
lun SCSI ID (without setting the volume id). For this reason,
disk path lookups will fail.

In order to be able to leverage Hyper-V based OpenStack providers,
as a fallback, we're querying the metadata service, searching for
disk device metadata. Note that starting with Nova Queens, the Hyper-V
driver always provides disk address information through the instance
metadata.
2017-11-09 12:36:18 +02:00
andyzhangx bb42103fca move InitStorageAccount into azure disk provision func 2017-11-09 09:33:58 +00:00
Kubernetes Submit Queue 93ef57a11c
Merge pull request #54177 from itowlson/azure-lb-sg-restrict-dest-address
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>.

Restrict Azure NSG rules to allow external access only to load balancer IP

**What this PR does / why we need it**: On Azure, we create NSG (Network Security Group) rules on the vnet to allow external clients to access services exposed as type LoadBalancer.  At the moment, these rules have a destination of `Any`, which means that they will permit requests on the opened port to any IP within the vnet.  This PR restricts the security rules so that they admit external access only to the load balancer IP.

**Which issue this PR fixes**: None in upstream - reported as https://github.com/Azure/acs-engine/issues/1619 

**Special notes for your reviewer**: None

**Release note**: 

```release-note
Azure NSG rules for services exposed via external load balancer 
now limit the destination IP address to the relevant front end load 
balancer IP.
```
2017-11-08 18:27:09 -08:00
xiangpengzhao b44e4b4f86 Raise log level to avoid log spam 2017-11-07 15:19:20 +08:00
Kubernetes Submit Queue b458838350
Merge pull request #54971 from itowlson/azure-sdk-v11.1.1
Automatic merge from submit-queue (batch tested with PRs 55093, 54966, 55047, 54971, 54786). 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>.

Upgrade Azure SDK to v11.1.1

**What this PR does / why we need it**: This fixes various Azure SDK bugs per the Azure SDK for Go changelogs:

* Fixed bug in which blob types were unmarshaled incorrectly
* Fixed various package names
* Miscellaneous unspecified storage bug fixes

This is also a prerequisite for a bug fix for running out of firewall rules when exposing large numbers of services from an Azure cluster.

**Which issue(s) this PR fixes**: None

**Special notes for your reviewer**:

1. I inadvertently committed a compatibility fix along with the dependency upgrade (which the guidelines say should have been two separate commits).  The offending file is `pkg/cloudprovider/providers/azure.go`.

2. We require an urgent bug fix for the firewall rules limit so it would be great if we could get this agreed quickly.  I have struggled with the dependency upgrade process a bit so if it looks wrong, please let me know as soon as you can!  Thanks!

**Release note**:

```release-note
Upgraded Azure SDK to v11.1.1.
```
2017-11-06 20:39:00 -08:00
Kubernetes Submit Queue 01f205adf5
Merge pull request #54759 from sakshamsharma/remove-google-kms-in-tree
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>.

Remove Google Cloud KMS's in-tree integration

Removes the following introduced by #48574 and others:
* `kms.go` which contained the cloudkms-specific code for Google Cloud KMS service.
* Registering the Google Cloud KMS in the KMS plugin registry.
* Google's `cloudkms` API package from `vendor` folder. 

The following changes are upcoming:
* Removal of KMSPluginRegistry. This would not be needed anymore, since KMS providers will be out-of-tree from now on (so no need of registering them, an address of the process would be enough).
* A service which allows encrypt/decrypt functionality (satisfies `envelope.Service` interface) if initialized with an IP/Port of an out-of-tree process serving KMS requests. Will tentatively use gRPC requests to talk to this external service.

Reference: https://github.com/kubernetes/kubernetes/pull/54439#issuecomment-340062801 and https://github.com/kubernetes/kubernetes/issues/51965#issuecomment-339333937.

```release-note
Google KMS integration was removed from in-tree in favor of a out-of-process extension point that will be used for all KMS providers.
```
2017-11-06 14:10:43 -08:00
Hemant Kumar c00b136c74 Check for available volume before attach/delete in EBS
We should check for available volume before performing
attach or delete of EBS volume. This will make sure that
we do not blow up API quota of mutable operations in AWS and stay a
good citizen.
2017-11-02 13:36:21 -04:00
Ivan Towlson 14e134cec3 Rev Azure SDK to v11.1.1 2017-11-01 16:23:50 +13:00
Ivan Towlson ea1c5a4b38 Remove azure-sdk-for-go workaround that is no longer needed 2017-10-31 14:31:53 +13:00
Saksham Sharma 261772b65c Remove Google Cloud KMS integration for encryption-at-rest. 2017-10-29 17:40:15 +05:30
Zihong Zheng ae7290fb7a Don't log error in getInstanceFromProjectInZoneByName 2017-10-27 14:07:41 -07:00
Kubernetes Submit Queue 55e49ed554 Merge pull request #51409 from FengyunPan/implement-InstanceExistsByProviderID
Automatic merge from submit-queue (batch tested with PRs 51409, 54616). 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 InstanceExistsByProviderID() for cloud providers

Fix #51406
If cloud providers(like aws, gce etc...) implement ExternalID()
and support getting instance by ProviderID , they also implement
InstanceExistsByProviderID().

/assign wlan0
/assign @luxas

**Release note**:
```release-note
NONE
```
2017-10-27 06:16:20 -07:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Micah Hausler cb38293093 Added service annotation for AWS ELB SSL policy 2017-10-26 15:21:14 -04:00
Kubernetes Submit Queue b2b31ada14 Merge pull request #52717 from FengyunPan/remove-LbassV1
Automatic merge from submit-queue (batch tested with PRs 52717, 54568, 54452, 53997, 54237). 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>.

[OpenStack]Remove the LbaasV1 of OpenStack cloud provider

The Neutron LbaasV1 has been declared obsolete, LbaasV2 is a
better choice.
So let's remove the codes of LbaasV1, only support LbaasV2.
xref: #52609
Reference OpenStack doc:
https://docs.openstack.org/mitaka/networking-guide/config-lbaas.html

**Special notes for your reviewer**:
/assign @dims 
/assign @anguslees 

**Release note**:
```release-note
Remove the LbaasV1 of OpenStack cloud provider, currently only support LbaasV2.
```
2017-10-25 23:10:25 -07:00
Kubernetes Submit Queue 33e4f178f2 Merge pull request #54438 from vmware/canonical_name_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>.

Fixing usage of clustered datastore name to be absolute datastore name

**What this PR does / why we need it**:
This PR adds the step to convert the datastore name in form of a folder/cluster to absolute datastore name.

**Which issue this PR fixes**: fixes vmware#312 

**Special notes for your reviewer**:
Testing. All the clustered datastore tests pass now
```
root@k8s-dev-vm-01:~/shahzeb/k8s/kubernetes# export CLUSTER_DATASTORE=dscl1/sharedVmfs-0
root@k8s-dev-vm-01:~/shahzeb/k8s/kubernetes# export VSPHERE_SPBM_POLICY_DS_CLUSTER=gold_cluster
root@k8s-dev-vm-01:~/shahzeb/k8s/kubernetes# go run hack/e2e.go --check-version-skew=false --v --test  --test_args='--ginkgo.focus=Volume\sProvisioning\sOn\sClustered\sDatastore'
flag provided but not defined: -check-version-skew
Usage of /tmp/go-build641208048/command-line-arguments/_obj/exe/e2e:
  -get
    	go get -u kubetest if old or not installed (default true)
  -old duration
    	Consider kubetest old if it exceeds this (default 24h0m0s)
2017/10/18 17:29:39 e2e.go:55: NOTICE: go run hack/e2e.go is now a shim for test-infra/kubetest
2017/10/18 17:29:39 e2e.go:56:   Usage: go run hack/e2e.go [--get=true] [--old=24h0m0s] -- [KUBETEST_ARGS]
2017/10/18 17:29:39 e2e.go:57:   The separator is required to use --get or --old flags
2017/10/18 17:29:39 e2e.go:58:   The -- flag separator also suppresses this message
2017/10/18 17:29:39 e2e.go:77: Calling kubetest --check-version-skew=false --v --test --test_args=--ginkgo.focus=Volume\sProvisioning\sOn\sClustered\sDatastore...
2017/10/18 17:29:39 util.go:154: Running: ./cluster/kubectl.sh --match-server-version=false version
2017/10/18 17:29:39 util.go:156: Step './cluster/kubectl.sh --match-server-version=false version' finished in 286.302987ms
2017/10/18 17:29:39 util.go:154: Running: ./hack/e2e-internal/e2e-status.sh
Skeleton Provider: prepare-e2e not implemented
Client Version: version.Info{Major:"1", Minor:"6+", GitVersion:"v1.6.0-alpha.0.17675+2bfcf4a7d1d6d4-dirty", GitCommit:"2bfcf4a7d1d6d4f257fe7ee96dcb47484b8e3a5f", GitTreeState:"dirty", BuildDate:"2017-10-18T23:37:58Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"6+", GitVersion:"v1.6.0-alpha.0.17663+ba93892625a3e8", GitCommit:"ba93892625a3e8a246f3bc660d56a2635e7e7f9f", GitTreeState:"clean", BuildDate:"2017-10-18T20:57:49Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"linux/amd64"}
2017/10/18 17:29:40 util.go:156: Step './hack/e2e-internal/e2e-status.sh' finished in 296.318449ms
2017/10/18 17:29:40 util.go:154: Running: ./hack/ginkgo-e2e.sh --ginkgo.focus=Volume\sProvisioning\sOn\sClustered\sDatastore
Conformance test: not doing test setup.
Oct 18 17:29:41.634: INFO: Overriding default scale value of zero to 1
Oct 18 17:29:41.634: INFO: Overriding default milliseconds value of zero to 5000
I1018 17:29:41.829967   32645 e2e.go:383] Starting e2e run "98fbc41f-b464-11e7-8e40-0050569c27f6" on Ginkgo node 1
Running Suite: Kubernetes e2e suite
===================================
Random Seed: 1508372981 - Will randomize all specs
Will run 3 of 714 specs

Oct 18 17:29:41.889: INFO: >>> kubeConfig: /tmp/kube171.json
Oct 18 17:29:41.894: INFO: Waiting up to 4h0m0s for all (but 0) nodes to be schedulable
Oct 18 17:29:41.928: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready
Oct 18 17:29:42.057: INFO: 13 / 13 pods in namespace 'kube-system' are running and ready (0 seconds elapsed)
Oct 18 17:29:42.057: INFO: expected 4 pod replicas in namespace 'kube-system', 4 are Running and Ready.
Oct 18 17:29:42.063: INFO: Waiting for pods to enter Success, but no pods in "kube-system" match label map[name:e2e-image-puller]
Oct 18 17:29:42.063: INFO: Dumping network health container logs from all nodes...
Oct 18 17:29:42.076: INFO: Client version: v1.6.0-alpha.0.17675+2bfcf4a7d1d6d4-dirty
Oct 18 17:29:42.079: INFO: Server version: v1.6.0-alpha.0.17663+ba93892625a3e8
SSSS
------------------------------
[sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  verify static provisioning on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:70
[BeforeEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:133
STEP: Creating a kubernetes client
Oct 18 17:29:42.079: INFO: >>> kubeConfig: /tmp/kube171.json
STEP: Building a namespace api object
STEP: Waiting for a default service account to be provisioned in namespace
[BeforeEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:50
[It] verify static provisioning on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:70
STEP: creating a test vsphere volume
W1018 17:29:43.087373   32645 datacenter.go:156] QueryVirtualDiskUuid failed for diskPath: "[sharedVmfs-0] kubevols/kube-dummyDisk.vmdk". err: ServerFaultCode: File [sharedVmfs-0] kubevols/kube-dummyDisk.vmdk was not found
STEP: Creating pod
STEP: Waiting for pod to be ready
STEP: Verifying volume is attached
STEP: Deleting pod
Oct 18 17:30:07.268: INFO: Deleting pod "vsphere-e2e-vtzbg" in namespace "e2e-tests-volume-provision-bchh4"
Oct 18 17:30:07.301: INFO: Wait up to 5m0s for pod "vsphere-e2e-vtzbg" to be fully deleted
STEP: Waiting for volumes to be detached from the node
Oct 18 17:30:49.429: INFO: Volume "[dscl1/sharedVmfs-0] kubevols/e2e-vmdk-e2e-tests-volume-provision-bchh4.vmdk" appears to have successfully detached from "kubernetes-node4".
STEP: Deleting the vsphere volume
[AfterEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:134
Oct 18 17:30:49.774: INFO: Waiting up to 3m0s for all (but 0) nodes to be ready
STEP: Destroying namespace "e2e-tests-volume-provision-bchh4" for this suite.
Oct 18 17:30:58.203: INFO: namespace: e2e-tests-volume-provision-bchh4, resource: bindings, ignored listing per whitelist
Oct 18 17:30:58.225: INFO: namespace e2e-tests-volume-provision-bchh4 deletion completed in 8.444766463s

• [SLOW TEST:76.146 seconds]
[sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/framework.go:22
  verify static provisioning on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:70
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
------------------------------
[sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  verify dynamic provision with spbm policy on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:131
[BeforeEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:133
STEP: Creating a kubernetes client
Oct 18 17:30:58.231: INFO: >>> kubeConfig: /tmp/kube171.json
STEP: Building a namespace api object
STEP: Waiting for a default service account to be provisioned in namespace
[BeforeEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:50
[It] verify dynamic provision with spbm policy on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:131
STEP: Creating Storage Class With storage policy params
STEP: Creating PVC using the Storage Class
STEP: Waiting for claim to be in bound phase
Oct 18 17:30:58.402: INFO: Waiting up to 5m0s for PersistentVolumeClaim pvc-6dwrm to have phase Bound
Oct 18 17:30:58.410: INFO: PersistentVolumeClaim pvc-6dwrm found but phase is Pending instead of Bound.
Oct 18 17:31:00.416: INFO: PersistentVolumeClaim pvc-6dwrm found but phase is Pending instead of Bound.
Oct 18 17:31:02.430: INFO: PersistentVolumeClaim pvc-6dwrm found and phase=Bound (4.027818895s)
STEP: Creating pod to attach PV to the node
STEP: Verify the volume is accessible and available in the pod
Oct 18 17:31:26.666: INFO: Running '/root/shahzeb/k8s/kubernetes/_output/dockerized/bin/linux/amd64/kubectl --server=https://10.160.141.5 --kubeconfig=/tmp/kube171.json exec pvc-tester-hgcj6 --namespace=e2e-tests-volume-provision-sfbcf -- /bin/touch /mnt/volume1/emptyFile.txt'
Oct 18 17:31:27.171: INFO: stderr: ""
Oct 18 17:31:27.171: INFO: stdout: ""
STEP: Deleting pod
Oct 18 17:31:27.171: INFO: Deleting pod "pvc-tester-hgcj6" in namespace "e2e-tests-volume-provision-sfbcf"
Oct 18 17:31:27.202: INFO: Wait up to 5m0s for pod "pvc-tester-hgcj6" to be fully deleted
STEP: Waiting for volumes to be detached from the node
Oct 18 17:32:11.324: INFO: Volume "[sharedVmfs-0] kubevols/kubernetes-dynamic-pvc-c6d8e174-b464-11e7-8b86-005056b7d4e9.vmdk" appears to have successfully detached from "kubernetes-node2".
Oct 18 17:32:11.324: INFO: Deleting PersistentVolumeClaim "pvc-6dwrm"
[AfterEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:134
Oct 18 17:32:11.393: INFO: Waiting up to 3m0s for all (but 0) nodes to be ready
STEP: Destroying namespace "e2e-tests-volume-provision-sfbcf" for this suite.
Oct 18 17:32:19.867: INFO: namespace: e2e-tests-volume-provision-sfbcf, resource: bindings, ignored listing per whitelist
Oct 18 17:32:19.876: INFO: namespace e2e-tests-volume-provision-sfbcf deletion completed in 8.460287539s

• [SLOW TEST:81.645 seconds]
[sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/framework.go:22
  verify dynamic provision with spbm policy on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:131
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
------------------------------
[sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  verify dynamic provision with default parameter on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:121
[BeforeEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:133
STEP: Creating a kubernetes client
Oct 18 17:32:19.878: INFO: >>> kubeConfig: /tmp/kube171.json
STEP: Building a namespace api object
STEP: Waiting for a default service account to be provisioned in namespace
[BeforeEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:50
[It] verify dynamic provision with default parameter on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:121
STEP: Creating Storage Class With storage policy params
STEP: Creating PVC using the Storage Class
STEP: Waiting for claim to be in bound phase
Oct 18 17:32:20.024: INFO: Waiting up to 5m0s for PersistentVolumeClaim pvc-zrcmm to have phase Bound
Oct 18 17:32:20.034: INFO: PersistentVolumeClaim pvc-zrcmm found but phase is Pending instead of Bound.
Oct 18 17:32:22.040: INFO: PersistentVolumeClaim pvc-zrcmm found and phase=Bound (2.016093024s)
STEP: Creating pod to attach PV to the node
STEP: Verify the volume is accessible and available in the pod
Oct 18 17:32:30.266: INFO: Running '/root/shahzeb/k8s/kubernetes/_output/dockerized/bin/linux/amd64/kubectl --server=https://10.160.141.5 --kubeconfig=/tmp/kube171.json exec pvc-tester-2hns4 --namespace=e2e-tests-volume-provision-llvbq -- /bin/touch /mnt/volume1/emptyFile.txt'
Oct 18 17:32:30.774: INFO: stderr: ""
Oct 18 17:32:30.774: INFO: stdout: ""
STEP: Deleting pod
Oct 18 17:32:30.774: INFO: Deleting pod "pvc-tester-2hns4" in namespace "e2e-tests-volume-provision-llvbq"
Oct 18 17:32:30.806: INFO: Wait up to 5m0s for pod "pvc-tester-2hns4" to be fully deleted
STEP: Waiting for volumes to be detached from the node
Oct 18 17:33:20.972: INFO: Volume "[dscl1/sharedVmfs-0] kubevols/kubernetes-dynamic-pvc-f77fba36-b464-11e7-8b86-005056b7d4e9.vmdk" appears to have successfully detached from "kubernetes-node4".
Oct 18 17:33:20.972: INFO: Deleting PersistentVolumeClaim "pvc-zrcmm"
[AfterEach] [sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:134
Oct 18 17:33:21.100: INFO: Waiting up to 3m0s for all (but 0) nodes to be ready
STEP: Destroying namespace "e2e-tests-volume-provision-llvbq" for this suite.
Oct 18 17:33:29.490: INFO: namespace: e2e-tests-volume-provision-llvbq, resource: bindings, ignored listing per whitelist
Oct 18 17:33:29.554: INFO: namespace e2e-tests-volume-provision-llvbq deletion completed in 8.444585266s

• [SLOW TEST:69.676 seconds]
[sig-storage] Volume Provisioning On Clustered Datastore [Feature:vsphere]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/framework.go:22
  verify dynamic provision with default parameter on clustered datastore
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere_volume_cluster_ds.go:121
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSOct 18 17:33:29.559: INFO: Running AfterSuite actions on all node
Oct 18 17:33:29.559: INFO: Running AfterSuite actions on node 1

Ran 3 of 714 Specs in 227.670 seconds
SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 711 Skipped PASS

Ginkgo ran 1 suite in 3m48.395491704s
Test Suite Passed
```


**Release note**:

```release-note
```
2017-10-24 17:33:38 -07:00
Kubernetes Submit Queue ee9983355e Merge pull request #54500 from MrHohn/service-controller-more-logging
Automatic merge from submit-queue (batch tested with PRs 54366, 54500). 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>.

Service controller / gce loadbalancer logging cleanup

**What this PR does / why we need it**:
From https://github.com/kubernetes/kubernetes/issues/52495, while looking into the potential scalability issue service controller may have, I found it really hard to debug as the log sometimes doesn't reference which LB it is for, or sometimes it just doesn't log at all. It get even harder that in correctness CIs we reduce verbose level to v1:
67bc30718f/jobs/env/ci-kubernetes-e2e-gce-scale-correctness.env (L16).

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

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

**Release note**:

```release-note
NONE
```
2017-10-24 16:54:02 -07:00
Zihong Zheng d6e8920a00 gce_loadbalancer_external: Critical path logging cleanup 2017-10-24 10:52:14 -07:00
Kubernetes Submit Queue 1213f9112b Merge pull request #54176 from gonzolino/os-lbaas-provider
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>.

Make OpenStack LBaaS v2 Provider configurable

Add option 'lb-provider' to the Loadbalancer section of the OpenStack
cloudprovider configuration to allow using a different LBaaS v2
provider than the default.



**What this PR does / why we need it**:
This PR allows to use a different OpenStack LBaaS v2 provider than the default of the OpenStack cloud.

**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
Added option lb-provider to OpenStack cloud provider config
```
2017-10-23 08:08:10 -07:00
Daniel Gonzalez 62b8a62844 Make OpenStack LBaaS v2 Provider configurable
Add option 'lb-provider' to the Loadbalancer section of the OpenStack
cloudprovider configuration to allow using a different LBaaS v2
provider than the default.
2017-10-23 12:27:10 +02:00
FengyunPan bf7f1a0610 Update gophercloud: cleanup lbaas v1 2017-10-23 18:01:03 +08:00
FengyunPan b308e36819 [OpenStack]Remove the LbaasV1 of OpenStack cloud provider
The Neutron LbaasV1 has been declared obsolete, LbaasV2 is a
better choice.
So let's remove the codes of LbaasV1, only support LbaasV2.
Talked at: #52609
Related to: #52821
Reference OpenStack doc:
https://docs.openstack.org/mitaka/networking-guide/config-lbaas.html
2017-10-23 17:59:20 +08:00
Kubernetes Submit Queue 0ee76d0258 Merge pull request #52437 from erikmcc/master
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>.

Update the Google API clients used by the GCE provider to identify Kubernetes as the origin of GCP API calls.

**What this PR does / why we need it**:
This modifies the Google API clients used for the GCE provider to identify GCP API calls as originating from Kubernetes.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
`NONE`
```
2017-10-23 00:28:08 -07:00
Kubernetes Submit Queue 25b44648e1 Merge pull request #54280 from NickrenREN/remove-dup-log
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>.

Let the caller log error message

Talk to @anguslees offline and in resize pr, we should let the caller log the error message and in those functions, just return err.
Also error string should not be capitalized or end with punctuation

**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
```

/assign @anguslees
2017-10-22 23:22:32 -07:00
NickrenREN 8af03d0fae let the caller log error message 2017-10-23 11:12:04 +08:00
FengyunPan 462087fd74 Implement InstanceExistsByProviderID() for cloud providers
Fix #51406
If cloud providers(like aws, gce etc...) implement ExternalID()
and support getting instance by ProviderID , they also implement
InstanceExistsByProviderID().
2017-10-20 14:59:28 +08:00
Unknown 79273adb52 Unit tests for Azure service session affinity 2017-10-19 21:10:19 +00:00
Unknown be42a972f4 Use RFC1918 addresses in tests 2017-10-19 19:03:09 +00:00
Jing Ai 4a522820df Revert pkg/cloudprovider/providers/gce/BUILD made by GoSublime, which is irrelevant to the fix. 2017-10-18 20:22:29 -07:00
Jing Ai 36dff9fc64 Pass zone name instead of zone url to GCE API to update NIC setting for alias range. 2017-10-18 20:02:26 -07:00
pshahzeb a842ee9694 Fixing usage of clustered datastore to be absolute datastore 2017-10-18 17:37:53 -07:00
Unknown 1397235ffa Restrict Azure NSG rules to allow external access only to load balancer IP 2017-10-18 22:51:03 +00:00
nikhiljindal 4303611ba5 Fixing a glog message to not print managed zones when it is empty 2017-10-17 22:46:58 -07:00
Kubernetes Submit Queue 6118a4b9af Merge pull request #53694 from andyzhangx/azure-avset-nil-fix
Automatic merge from submit-queue (batch tested with PRs 53694, 53919). 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 controller manager crash issue on a manually created k8s cluster

**What this PR does / why we need it**:
fix controller manager crash issue on a manually created k8s cluster, it's due to availability set nil issue in azure loadbalancer

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
In the testing of a manually created k8s cluster, I found controller manager on master would crash in current scenario:
1. Use acs-engine to set up k8s 1.7.7 cluster (it's with an availability set)
2. Manually add a node to the k8s cluster (without an availibity set in this VM)
3. Set up a service and schedule the pod onto this newly added node
4. controller manager would crash on master because although this k8s cluster has an availability set, the newly added node's `machine.AvailabilitySet` is nil which would cause controller manager crash

**Special notes for your reviewer**:
@brendanburns @karataliu @JiangtianLi 

**Release note**:

```
fix controller manager crash issue on a manually created k8s cluster
```
/sig azure
2017-10-16 10:58:27 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
FengyunPan 30e7a5c118 Volunteer to help with sig/openstack
I would like to do some code review/approve for OpenStack cloud
provider and cinder volume.
2017-10-13 16:49:59 +08:00
Kubernetes Submit Queue f60b92a26a Merge pull request #50836 from FengyunPan/auto-get-NodeSecurityGroupID
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>.

Support autoprobing node-security-group for openstack cloud provider

1. Support autoprobing node-security-group
2. Support multiple Security Groups for cluster's nodes
3. Fix recreating Security Group for cluster's nodes

This is a part of #50726

**Special notes for your reviewer**:
/assign @anguslees 
/assign @dims 

**Release note**:
```release-note
Support autoprobing node-security-group for openstack cloud provider, Support multiple Security Groups for cluster's nodes.
```
2017-10-11 21:40:16 -07:00
Kubernetes Submit Queue cea1af38e2 Merge pull request #53714 from FengyunPan/fix-SecurityGroupName
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>.

The Securty Group name must be unique

Currently the service's name is not unique, and the Securty Group
name is not unique too. openstack cloud provider will delete the
Securty Group of other loadbalancer service when do a deletion.

OpenStack cloud provider get the ID of Securty Group by name, so the Securty Group name must be unique.
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go#L1262

**Release note**:
```release-note
NONE
```
2017-10-11 18:49:21 -07:00
Kubernetes Submit Queue 40e6a6b7ad Merge pull request #51677 from itowlson/azure-cloud-provider-vet
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 format specifiers in Azure cloud provider

**What this PR does / why we need it**: Fixes invalid/mismatched format specifiers in Azure cloud provider logging statements (`glog...Infof(...)`) that would cause information to be lost in logging output, as flagged by `go vet`.

**Which issue this PR fixes**: None

**Special notes for your reviewer**: None

**Release note**:

```release-note
NONE
```
2017-10-11 08:41:07 -07:00
FengyunPan 5af6a0b4de The Securty Group name should be unique
Currently the service's name is not unique, and the Securty Group
name is not unique too. openstack cloud provider will delete the
Securty Group of other loadbalancer service when do a deletion.
2017-10-11 19:20:36 +08:00
Kubernetes Submit Queue e57accbd03 Merge pull request #51072 from hchenxa/hchenxa_typoFix
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 minor typo

**What this PR does / why we need it**:
Typo error
**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
```
2017-10-10 22:21:06 -07:00
andyzhangx 6920141e4f fix avset nil issue in azure loadbalancer 2017-10-11 03:10:55 +00:00
Kubernetes Submit Queue 299beb228e Merge pull request #53182 from itowlson/azure-blobdiskcontroller-retry-logic
Automatic merge from submit-queue (batch tested with PRs 53444, 52067, 53571, 53182). 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>.

Retry when checking  Azure storage account readiness

**What this PR does / why we need it**: When the Azure cloud provider ensures that a default storage container exists, if the storage account exists but is still provisioning, it exits without retrying.  This is a bug as the code is wrapped in a backoff policy but never signals the policy to retry.  This PR fixes this behaviour by returning values which allow the backoff policy to operate.

**Which issue this PR fixes**: fixes #53052

**Special notes for your reviewer**: Not sure how to test this - I have done a deployment using acs-engine and it seems to work but I am not sure of the best way to exercise the failure path.

**Release note**:

```release-note
NONE
```
2017-10-10 00:33:29 -07:00
FengyunPan 04dbfe67d6 Support autoprobing node-security-group for openstack cloud provider
1. Support autoprobing node-security-group
2. Support multiple Security Groups for cluster's nodes
3. Fix recreating Security Group for cluster's nodes

This is a part of #50726
2017-10-10 15:04:32 +08:00
Kubernetes Submit Queue e8ee831abf Merge pull request #53588 from NickrenREN/openstack-deletevolume
Automatic merge from submit-queue (batch tested with PRs 52662, 53547, 53588, 53573, 53599). 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>.

Return err when delete volume failed

Return err when delete volume failed

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

/kind bug
/sig openstack
2017-10-09 12:51:19 -07:00
Kubernetes Submit Queue 1dc1eb7373 Merge pull request #53197 from FengyunPan/node-0
Automatic merge from submit-queue (batch tested with PRs 53567, 53197, 52944, 49593). 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>.

[OpenStack]Add codes to check the count of nodes(members)

After merging this PR(#53146), if there is no available nodes for
the loadbalancer service, UpdateLoadBalancer() will run panic.

**Release note**:
```release-note
NONE
```
2017-10-09 11:18:46 -07:00
Kubernetes Submit Queue 92210a7d76 Merge pull request #53523 from zetaab/ignore_volume_label
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>.

add possibility to ignore volume label in dynamic provisioning

**What this PR does / why we need it**: this is needed if openstack cinder zone name does not match to compute zone names. For instance if there is only one cinder zone and many compute zones.

**Which issue this PR fixes**: fixes #53488

**Special notes for your reviewer**: 

```release-note
NONE
```
2017-10-09 09:17:04 -07:00
NickrenREN dca4732145 Return err when delete volume failed 2017-10-09 21:32:45 +08:00
Jesse Haka e45457b0d8 add possibility to ignore volume label in dynamic provisioning
ignorelabel -> addlabel

FIX tests

small fix to test

fixes according what was asked

fix test

fix test
2017-10-09 09:52:42 +03:00
FengyunPan 370ad205b7 [OpenStack]Add codes to check the count of nodes(members)
After merging this PR(#53146), if there is no available nodes for
the loadbalancer service, UpdateLoadBalancer() will run panic.
2017-10-09 10:01:49 +08:00
Kubernetes Submit Queue 6e7989e652 Merge pull request #53510 from dims/run-tests-with-devstack
Automatic merge from submit-queue (batch tested with PRs 52768, 51898, 53510, 53097, 53058). 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>.

Ability to run the openstack tests against DevStack

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

Some of the environment variables have changed as devstack defaults
have changed. So look for the older env variables first and try the
newer ones later.

At a minimum you need the following for v3 authentication which is
the default with latest devstack. If you miss the Tenant information
then the token issued will be a unscoped token (and will not have any
service catalog information).

OS_AUTH_URL=http://192.168.0.42/identity
OS_REGION_NAME=RegionOne
OS_USERNAME=demo
OS_PASSWORD=supersecret
OS_TENANT_NAME=demo
OS_USER_DOMAIN_ID=default


**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-10-06 13:16:42 -07:00
Kubernetes Submit Queue 5d3a0f069a Merge pull request #53471 from cheftako/owners
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>.

Add cheftako to CP reviewers and wlan0 to approvers.

**What this PR does / why we need it**: wlan0 is helping to lead the separate cloud providers effort and so should be an approver. I am helping to do the gce effort and should probably be a reviewer.

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

**Special notes for your reviewer**:

**Release note**:
```release-note NONE
```
2017-10-06 09:56:32 -07:00
Kubernetes Submit Queue 536f9ac1d8 Merge pull request #53115 from FengyunPan/fix-auto
Automatic merge from submit-queue (batch tested with PRs 53418, 53366, 53115, 53402, 53130). 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 the version detection of OpenStack Cinder

**What this PR does / why we need it**:
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.

There are two case should be fixed in other PR:
1. revisit the version detection after supporting Cinder V3 API.
2. add codes to support MicroVersion after gophercloud supports MicroVersion.

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

**Special notes for your reviewer**:
/assign @dims 
/assign @xsgordon 

**Release note**:
```release-note
Using OpenStack service catalog to do version detection
```
2017-10-05 17:31:21 -07:00
Walter Fender 2a58152fdb Add cheftako to CP reviewers and wlan0 to approvers. 2017-10-05 14:44:07 -07:00
Davanum Srinivas c04f04c229 Ability to run the openstack tests against DevStack
Some of the environment variables have changed as devstack defaults
have changed. So look for the older env variables first and try the
newer ones later.

At a minimum you need the following for v3 authentication which is
the default with latest devstack. If you miss the Tenant information
then the token issued will be a unscoped token (and will not have any
service catalog information).

OS_AUTH_URL=http://192.168.0.42/identity
OS_REGION_NAME=RegionOne
OS_USERNAME=demo
OS_PASSWORD=supersecret
OS_TENANT_NAME=demo
OS_USER_DOMAIN_ID=default
2017-10-05 17:31:20 -04:00
Kubernetes Submit Queue 9af339885b Merge pull request #53410 from nicksardo/gce-hack-subnet
Automatic merge from submit-queue (batch tested with PRs 51750, 53195, 53384, 53410). 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>.

GCE: Handle missing subnet for legacy networks and auto networks with unique subnet names

Fixes #53409

/assign @bowei 

Tested on three GKE clusters with automatic, manual, and legacy networks.

**Release note**:
```release-note
GCE: Fixes ILB sync on legacy networks and auto networks with unique subnet names
```
2017-10-05 06:09:04 -07:00
Kubernetes Submit Queue 9e9ebc04fb Merge pull request #53195 from dixudx/add_timeout_for_openstack_cloudprovider
Automatic merge from submit-queue (batch tested with PRs 51750, 53195, 53384, 53410). 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>.

add http request timeout for OpenStack cloud provider

**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 #53191

**Special notes for your reviewer**:
/assign @NickrenREN @dims @FengyunPan 

**Release note**:

```release-note
None
```
2017-10-05 06:08:58 -07:00
Nick Sardo 995dd32a87 Handle missing subnet for auto networks and legacy networks 2017-10-04 17:53:17 -07:00
Kubernetes Submit Queue a5ad6b5ab6 Merge pull request #52945 from dims/volunteer-external-cp
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>.

volunteer to help with external cloud providers

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

Looks like we have a single approver in Mike. Throwing my hat in
to help with approvals etc.


**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-10-04 17:11:47 -07:00
Kubernetes Submit Queue e557f184e2 Merge pull request #53450 from nicksardo/fix-ilb-teardown
Automatic merge from submit-queue (batch tested with PRs 51754, 53261, 53450). 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>.

GCE: Ignore notFound when deleting firewall

**What this PR does / why we need it**:
Ignores a not found error when deleting a firewall on line 220. 

**Which issue this PR fixes**:
Fixes #53411

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

**Release note**:
```release-note
NONE
```
2017-10-04 13:13:20 -07:00
Nick Sardo 171c9702c5 Ignore notFound when deleting firewall 2017-10-04 10:46:14 -07:00
Kubernetes Submit Queue c746bd3c8a Merge pull request #53355 from mikedanese/satnam
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>.

stop assigning satnam reviews

we should automate this.
2017-10-03 23:05:52 -07:00
Kubernetes Submit Queue 31697a27f9 Merge pull request #53071 from tpepper/trivial
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 broken cloud provider info urls

kubernetes/community repo's commit 3034683c5997474d9f59ef722c8ee9c1f1e58f07
started a re-org of the design-proposals directory to have hierarchical
structure and subdirectories.  This in turn broke the urls in the
kubernetes/kubernetes/pkg/cloud-provider/README.md file.  This patch adds
the appropriate subdirectories into the urls in the readme.

Signed-off-by: Tim Pepper <tpepper@vmware.com>

```release-note
NONE
```
2017-10-03 10:50:22 -07:00
Kubernetes Submit Queue b4dd4edfae Merge pull request #52656 from rrati/aws-fake
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>.

Move AWS Fake implementations out of test 

The AWS fake implementations are in a test file and can't be imported into any other tests.  This makes integration testing difficult.  This PR moves the fake implementations such that they can be used by other entities.

@kubernetes/sig-aws-misc @justinsb
2017-10-02 22:35:33 -07:00
Di Xu fe92a55425 add timeout for Openstack cloud provider 2017-10-03 10:11:54 +08:00
Mike Danese 9de1d1f577 stop assigning satnam reviews 2017-10-02 18:12:15 -07:00
Kubernetes Submit Queue 0ca0d76da1 Merge pull request #53276 from freehan/alpha-backendservice
Automatic merge from submit-queue (batch tested with PRs 53234, 53252, 53267, 53276, 53107). 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>.

add get alpha backend service into cloud provider

```release-note
NONE
```
2017-09-29 20:17:43 -07:00
Minhan Xia 43f20bd57f add get alpha backend service into cloud provider 2017-09-29 14:57:08 -07:00
Kubernetes Submit Queue 56cff3fc26 Merge pull request #53101 from FengyunPan/default-external
Automatic merge from submit-queue (batch tested with PRs 53101, 53158, 52165). 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>.

[OpenStack] Service LoadBalancer defaults to external

**What this PR does / why we need it**:
Let "service.beta.kubernetes.io/openstack-internal-load-balancer" default to false.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-09-29 14:36:16 -07:00
Erik McClenney 7aa9a46067 Fix merge conflicts. 2017-09-29 13:55:54 -07:00
Erik McClenney 15816b382e Merge branch 'master' into master 2017-09-29 12:36:07 -07:00
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
Tim Pepper 8b35044159 fix broken cloud provider info urls
kubernetes/community repo's commit 3034683c5997474d9f59ef722c8ee9c1f1e58f07
started a re-org of the design-proposals directory to have hierarchical
structure and subdirectories.  This in turn broke the urls in the
kubernetes/kubernetes/pkg/cloud-provider/README.md file.  This patch adds
the appropriate subdirectories into the urls in the readme.

While the kubernetes/kubernetes/pkg/cloud-provider/cloud-provider
directory represents an area that's deprecated now, this patch isn't
introducing anything new, but rather fixes the broken links to
information on the deprecation and info on the evolving forward
path for the cloud providers.

Signed-off-by: Tim Pepper <tpepper@vmware.com>
2017-09-27 08:49:33 -07: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
Tomer Froumin 188db6f844 Added service annotation to set Azure DNS label for public IP 2017-09-24 11:46:24 +03: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
Davanum Srinivas 536ce664df volunteer to help with external cloud providers
Looks like we have a single approver in Mike. Throwing my hat in
to help with approvals etc.
2017-09-23 12:47:25 -04: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
Josh Horwitz 2f1ea47c83 Add InstanceExists* methods to cloud provider interface for CCM 2017-08-24 20:41:28 -04:00
Yu-Ju Hong 359fc7a4f4 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 07:43:29 -07:00
Bowei Du 1f4dc5559d 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-23 23:10:20 -07:00
Kubernetes Submit Queue 5cb1cccd40 Merge pull request #51138 from yujuhong/alpha-calls
Automatic merge from submit-queue

GCE: Add functions for Alpha address and forwarding rules
2017-08-23 21:17:07 -07:00
Kubernetes Submit Queue 6bb928a3df Merge pull request #50931 from jrperritt/fix-pool-panic
Automatic merge from submit-queue

cloudprovider/openstack bug fix: don't try to append pool id if pool doesn't exist

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

This fixes a bug in the OpenStack cloud provider that could cause a panic.

Consider what will happen in the current `LbaasV2.EnsureLoadBalancerDeleted` code if `nil, ErrNotFound` is returned by `getPoolByListenerID`.
2017-08-23 16:23:29 -07:00
Kubernetes Submit Queue 012e94b6be Merge pull request #50239 from FengyunPan/fix-no-exist-node
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Mark the volumes as detached when node does not exist

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and do not return err.

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

**Release note**:
```release-note
NONE
```
2017-08-23 08:41:04 -07:00
Kubernetes Submit Queue 33821862ce Merge pull request #50973 from FengyunPan/fix-legacy-floatingip
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084)

Fix legacy floatingip

Fix #50974
If user specify floating-network-id by annotation rather than cloud
provider file, openstack cloud provider don't delete floatingip when
deleting LoadBalancer service.

**Release note**:
```release-note
NONE
```
2017-08-23 03:36:05 -07:00
Yu-Ju Hong 0d1efd5e78 GCE: add a new label "version" for metrics 2017-08-22 17:37:50 -07:00
Yu-Ju Hong 84c9c25edf GCE: Add functions for Alpha address and forwarding rules 2017-08-22 16:37:36 -07:00
Minhan Xia c04ba4eab5 add alpha api gate at gce cloud provider 2017-08-22 11:05:06 -07:00