Commit Graph

2716 Commits (c2b771d5c46ca3b2f58f72595fe07a4e56a63762)

Author SHA1 Message Date
andyzhangx 815d4ba740 add mixed protocol support for azure load balancer
add logging

fix lb issue

fix comments

make code more clean
2018-08-30 08:42:17 +00:00
Jesse Haka a68cbd65b7 implement InstanceShutdownByProviderID to aws cloudprovider
changes according what was asked

use string

do not delete instance if it is in any other state than running

use constants

fix
2018-08-30 08:51:26 +03:00
Kubernetes Submit Queue 8aea674681
Merge pull request #67984 from feiskyer/on-prem
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Add support for unmanaged nodes for Azure cloud provider

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

Continue of [Azure cross resource groups feature](https://github.com/kubernetes/features/issues/604).

This PR adds support for unmanaged nodes (such as on-prem or on other clouds) that are labeled with `alpha.service-controller.kubernetes.io/exclude-balancer=true` and `kubernetes.azure.com/managed=false`. Azure cloud provider would exclude such nodes from LoadBalancer backends and always assumes they are existing.

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

See KEP [here](https://github.com/kubernetes/community/blob/master/keps/sig-azure/0025-20180809-cross-resource-group-nodes.md).

**Special notes for your reviewer**:

Azure cloud provider won't provision network routes for on-prem nodes, so cluster admins should ensure the network (including pod-to-pod, pod-to-node and node-to-node connectivity) has been set up properly.

**Release note**:

```release-note
Azure cloud provider now supports unmanaged nodes (such as on-prem) that are labeled with `kubernetes.azure.com/managed=false` and `alpha.service-controller.kubernetes.io/exclude-balancer=true`
```

/assign @khenidak @andyzhangx
/sig azure
/kind feature
/milestone v1.12
2018-08-29 21:41:54 -07:00
Kubernetes Submit Queue e41d9f1553
Merge pull request #67982 from zetaab/isshut
Automatic merge from submit-queue (batch tested with PRs 66577, 67948, 68001, 67982). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

implement InstanceShutdownByProviderID to openstack

**What this PR does / why we need it**: without this openstack cannot get shutdown taint when instance is shutdown (original pr where this feature was added https://github.com/kubernetes/kubernetes/pull/60009)

**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
Openstack supports now node shutdown taint. Taint is added when instance is shutdown in openstack.
```
2018-08-29 16:33:40 -07:00
hui luo ce15129b9e add test to verify vsphere cloud provider report node hostname
as in pull #67922 has modify vsphere cloud provider to report
node hostname, this patch is to add the test for it.

also fix an issue at InstanceID(), it suppose to return
cloudprovider.InstanceNotFound when vm not found, after the fix,
test TestInstance() can pass
2018-08-29 11:46:24 -07:00
Jesse Haka 66b0ac4f57 implement InstanceShutdownByProviderID
return error if instance does not exist

do not export instanceshutoff
2018-08-29 14:35:20 +03:00
Jesse Haka c4ff3d0593 remove : 2018-08-29 14:28:07 +03:00
Jesse Haka 7062cd5700 backport https://github.com/kubernetes/cloud-provider-openstack/pull/43 2018-08-29 14:22:53 +03:00
Pengfei Ni 9bbd5043ea Add unit tests 2018-08-29 15:02:56 +08:00
Pengfei Ni 919058b315 Compose routes for on-prem nodes
Compose faked routes for unmanaged nodes so that node controller would
assume the routes for them have already been created.
2018-08-29 14:28:30 +08:00
Pengfei Ni 19d7d85a67 Add on-prem nodes support to Azure cloud provider
On-prem nodes should register themselves with required labels, e.g.

kubelet --node-labels=alpha.service-controller.kubernetes.io/exclude-balancer=true,kubernetes.azure.com/managed=false ...
2018-08-29 14:27:24 +08:00
Kubernetes Submit Queue 113872798d
Merge pull request #67922 from liggitt/vsphere-hostname
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Report Hostname node address for vsphere

xref https://github.com/kubernetes/kubernetes/issues/67714

```release-note
NONE
```
2018-08-28 20:28:32 -07:00
Kubernetes Submit Queue 2eb14e3007
Merge pull request #64973 from nokia/k8s-sctp
Automatic merge from submit-queue (batch tested with PRs 67694, 64973, 67902). 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>.

SCTP support implementation for Kubernetes

**What this PR does / why we need it**: This PR adds SCTP support to Kubernetes, including Service, Endpoint, and NetworkPolicy.

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

**Special notes for your reviewer**:

**Release note**:

```release-note

SCTP is now supported as additional protocol (alpha) alongside TCP and UDP in Pod, Service, Endpoint, and NetworkPolicy.  

```
2018-08-28 07:21:18 -07:00
Jordan Liggitt 722e0bca2e
Report Hostname node address for vsphere 2018-08-27 23:32:09 -04:00
Yang Guo 8b6b81c7c9 GCE: Add ListLocations to Cloud TPU API 2018-08-27 16:56:18 -07:00
Kubernetes Submit Queue 5299470152
Merge pull request #67719 from liggitt/cloudstack-hostname
Automatic merge from submit-queue (batch tested with PRs 67447, 67719). 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>.

Report cloudstack hostname address

Cloud providers are now authoritative for the addresses reported by the kubelet. Cloud providers that have hostname information available via metadata should report it for use by the apiserver

```release-note
The cloudstack cloud provider now reports a `Hostname` address type for nodes based on the `local-hostname` metadata key.
```
2018-08-27 12:20:06 -07:00
Kubernetes Submit Queue d661a83b06
Merge pull request #67787 from dougm/vcp-zones
Automatic merge from submit-queue (batch tested with PRs 54935, 67768, 67896, 67787). 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>.

vsphere: support zone tags at any level in the hierarchy

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

Rather than just looking for zone tags at the VM's Host level, traverse up the hierarchy.
This allows zone tags to be attached at host level, along with cluster, datacenter, root folder
and any inventory folders in between.

Issue #64021

Example log output from the tests, with tags attached at host level:
```console
Found "k8s-region" tag (k8s-region-US) for e85df495-93b9-4b0e-96f1-dc9d56e97263 attached to HostSystem:host-19
Found "k8s-zone" tag (k8s-zone-US-CA1) for e85df495-93b9-4b0e-96f1-dc9d56e97263 attached to HostSystem:host-19
```
And region tag at Datacenter level and zone tag at Cluster level:
```console
Found "k8s-zone" tag (k8s-zone-US-CA1) for e85df495-93b9-4b0e-96f1-dc9d56e97263 attached to ComputeResource:computeresource-21
Found "k8s-region" tag (k8s-region-US) for e85df495-93b9-4b0e-96f1-dc9d56e97263 attached to Datacenter:datacenter-2
```

**Release note**:

```release-note
NONE
```
2018-08-27 10:53:24 -07:00
Kubernetes Submit Queue 91e37eeb92
Merge pull request #67772 from andyzhangx/azuredisk-volumelimits2
Automatic merge from submit-queue (batch tested with PRs 67766, 67642, 67772). 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>.

Enable dynamic azure disk volume limits

**What this PR does / why we need it**:
Enable dynamic azure disk volume limits,
This is an azure cloud provider implementation related to feature: [Dynamic Maximum volume count](https://github.com/kubernetes/features/issues/554)

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

**Special notes for your reviewer**:
This PR use `az.VirtualMachineSizesClient.List` to list all vm sizes under region, match vm size with current node size, and then got `MaxDataDiskCount`, the `GetVolumeLimits` happens in kubelet and will return `attachable-volumes-azure-disk` in node status as following example:
```
agentpool-22082114-0
    ...
    allocatable:
      attachable-volumes-azure-disk: "8"
      cpu: "2"
      ephemeral-storage: "28043041951"
      hugepages-1Gi: "0"
      hugepages-2Mi: "0"
      memory: 7034772Ki
      pods: "30"
```

**Release note**:

```
Enable dynamic azure disk volume limits
```

/sig azure
/kind feature
2018-08-27 06:14:17 -07:00
Kubernetes Submit Queue a431feb24e
Merge pull request #66322 from tanshanshan/fixunused
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>.

ignore unused variable

**What this PR does / why we need it**:
ignore unused variable 

unused err
162655f42f/pkg/cloudprovider/providers/openstack/openstack_routes_test.go (L89)

and
unused instanceId
162655f42f/pkg/cloudprovider/providers/photon/photon_test.go (L143)

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


**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-27 02:48:52 -07:00
Laszlo Janosi cbe94df8c6 gofmt update 2018-08-27 05:59:50 +00:00
Laszlo Janosi a6da2b1472 K8s SCTP support implementation for the first pull request
The requested Service Protocol is checked against the supported protocols of GCE Internal LB. The supported protocols are TCP and UDP.

SCTP is not supported by OpenStack LBaaS. If SCTP is requested in a Service with type=LoadBalancer, the request is rejected. Comment style is also corrected.

SCTP is not allowed for LoadBalancer Service and for HostPort. Kube-proxy can be configured not to start listening on the host port for SCTP: see the new SCTPUserSpaceNode parameter

changed the vendor github.com/nokia/sctp to github.com/ishidawataru/sctp. I.e. from now on we use the upstream version.

netexec.go compilation fixed. Various test cases fixed

SCTP related conformance tests removed. Netexec's pod definition and Dockerfile are updated to expose the new SCTP port(8082)

SCTP related e2e test cases are removed as the e2e test systems do not support SCTP

sctp related firewall config is removed from cluster/gce/util.sh. Variable name sctp_addr is corrected to sctpAddr in pkg/proxy/ipvs/proxier.go

cluster/gce/util.sh is copied from master
2018-08-27 05:56:27 +00:00
andyzhangx dd63d407a4 Enable dynamic azure disk volume limits
use API to get max disk num

use continue when got exception

add logging

add cache and unit test

fix comments
2018-08-27 02:41:45 +00:00
Walter Fender c0b7c42461 Added support to get clusters in gce cloud provider.
Implemented the call to get all cluster objects in a zone for a project.
Also added code to allow the container api to be set in the gce.conf
file.
Requested fix for @lavalamp. Fixed GetClusters to be GetManagedClusters.
Leaving ListClusters as ListClusters as it is part of the Cloud Clusters
interface, despite also being a "managed" call.
Remove copy pasta :D
Fixed method variable name.
2018-08-24 13:41:45 -07:00
Jordan Liggitt 7078bfed58
Report cloudstack hostname address 2018-08-24 00:10:38 -04:00
Raffaele Di Fazio b1cb64952a Fixes #49445 by introducing a new annotation to attach SG to ELB. 2018-08-24 05:03:27 +02:00
Doug MacEachern ec732d8aab vsphere: support zone tags at any level in the hierarchy
Rather than just looking for zone tags at the VM's Host level, traverse up the hierarchy.
This allows zone tags to be attached at host level, along with cluster, datacenter, root folder
and any inventory folders in between.

Issue #64021
2018-08-23 14:57:21 -07:00
Kubernetes Submit Queue d68e1fc9d6
Merge pull request #67748 from FengyunPan2/report-hostname
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 cloud provider report a node hostname address

Related to: #67714
Cloud-provider-reported addresses are authoritative in 1.12, this
preserves default behavior that used the internal dns name as
the "Hostname" address on Node status.

**Release note**:

```release-note
The OpenStack cloud provider now reports a `Hostname` address type for nodes
```
2018-08-23 09:15:41 -07:00
Kubernetes Submit Queue f15fe93384
Merge pull request #67715 from liggitt/aws-hostname
Automatic merge from submit-queue (batch tested with PRs 66980, 67604, 67741, 67715). 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 aws cloud provider report a node hostname address

Cloud-provider-reported addresses are authoritative in 1.12, this preserves default behavior that used the internal dns name as the "Hostname" address on Node status

/sig aws
/sig cloud-provider

```release-note
The aws cloud provider now reports a `Hostname` address type for nodes based on the `local-hostname` metadata key.
```
2018-08-23 03:14:14 -07:00
Kubernetes Submit Queue e991f4723c
Merge pull request #67741 from dougm/vcp-zones
Automatic merge from submit-queue (batch tested with PRs 66980, 67604, 67741, 67715). 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>.

vsphere: add tests for Cloud Provider Zones implementation

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

- Add tests for GetZones()

- Fix bug where a host tag other than region or zone caused an error

- Fix bug where GetZones() errored if zone tag was set, but region was not

Follow up to PR #66795 / towards #64021

**Release note**:

```release-note
NONE
```
2018-08-23 03:14:11 -07:00
Kubernetes Submit Queue 82924e71cd
Merge pull request #67604 from feiskyer/cross-rg-nodes
Automatic merge from submit-queue (batch tested with PRs 66980, 67604, 67741, 67715). 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 support of Azure cross resource group nodes

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

Part of feature [Cross resource group nodes](https://github.com/kubernetes/features/issues/604).

This PR adds support of Azure cross resource group nodes that are labeled with `kubernetes.azure.com/resource-group=<rg-name>` and `alpha.service-controller.kubernetes.io/exclude-balancer=true`

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

See designs [here](https://github.com/kubernetes/community/pull/2479).

**Release note**:

```release-note
Azure cloud provider now supports cross resource group nodes that are labeled with `kubernetes.azure.com/resource-group=<rg-name>` and `alpha.service-controller.kubernetes.io/exclude-balancer=true`
```

/sig azure
/kind feature
2018-08-23 03:14:07 -07:00
Kubernetes Submit Queue 78fc9bfd40
Merge pull request #67478 from feiskyer/zone-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>.

 Reduce API calls for Azure instance metadata

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

Azure cloud provider gets a lot of `"Too many requests"` error when getting availability zones, instance types and node addresses. Hence kubelet won't be able to initialize itself sometimes.

This PR reduces such calls and alos switches to json API which is more stable.

**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 https://github.com/Azure/acs-engine/issues/3681

**Special notes for your reviewer**:

**Release note**:

```release-note
Reduce API calls for Azure instance metadata.
```

cc @ritazh @khenidak @andyzhangx
2018-08-23 01:26:29 -07:00
FengyunPan2 641693ad05 Make OpenStack cloud provider report a node hostname address
Related to: #67714
Cloud-provider-reported addresses are authoritative in 1.12, this
preserves default behavior that used the internal dns name as
the "Hostname" address on Node status.
2018-08-23 13:20:47 +08:00
Pengfei Ni 5b5101b563 Add unit tests for GetNodeResourceGroup and GetResourceGroups 2018-08-23 10:38:40 +08:00
Doug MacEachern 191d9ced30 update bazel 2018-08-22 18:49:15 -07:00
Doug MacEachern 11af6932e5 vsphere: add tests for Cloud Provider Zones implementation
- Add tests for GetZones()

- Fix bug where a host tag other than region or zone caused an error

- Fix bug where GetZones() errored if zone tag was set, but region was not

Follow up to PR #66795 / towards #64021
2018-08-22 18:47:30 -07:00
Kubernetes Submit Queue 70e7a7d189
Merge pull request #63512 from awly/gce-provider-dns-names
Automatic merge from submit-queue (batch tested with PRs 66973, 67704, 67722, 67723, 63512). 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>.

Populate internal DNS names in GCE provider

Both VM name and hostname are internally routable.

**What this PR does / why we need it**: GCE cloud provider only populated IP addresses for instances. This PR adds internal DNS names. DNS names are used e.g. in kubelet server certificates (5b77996433/pkg/kubelet/kubelet.go (L385))

**Release note**:
```release-note
NONE
```
2018-08-22 18:20:34 -07:00
Andrew Lytvynov 50e9407951 Populate internal DNS names in GCE provider
Both VM name and hostname are internally routable.
2018-08-22 16:12:51 -04:00
Doug MacEachern d4d5c1e7db vsphere: adjust to govmomi tags API changes 2018-08-22 11:22:24 -07:00
Doug MacEachern 5816a8bc18 godeps: update vmware/govmomi
Update required to continue work on #64021

- The govmomi tag API changed

- Pulling in the new vapi/simulator package for testing the VCP Zones impl
2018-08-22 11:11:11 -07:00
Jordan Liggitt 0a5f0127e1
Make aws cloud provider report a node hostname address 2018-08-22 13:29:56 -04:00
Davanum Srinivas 9b43d97cd4
Add Labels to various OWNERS files
Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b
2018-08-21 13:59:08 -04:00
Kubernetes Submit Queue c9b79da757
Merge pull request #66737 from hanxiaoshuai/cleanup07281
Automatic merge from submit-queue (batch tested with PRs 67332, 66737, 67281, 67173). 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 aws.StringSlice replace of deprecated func stringPointerArray

**What this PR does / why we need it**:
use aws.StringSlice replace of deprecated func stringPointerArray

```
// stringPointerArray creates a slice of string pointers from a slice of strings
// Deprecated: consider using aws.StringSlice - but note the slightly different behaviour with a nil input
func stringPointerArray(orig []string) []*string {
       if orig == nil {
               return nil
       }
       return aws.StringSlice(orig)
}
```

**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
```
2018-08-21 05:25:06 -07:00
Pengfei Ni 8aaeafa166 Get VirtualMachineScaleSets and VirtualMachineScaleSetVMs from cached resource groups 2018-08-20 23:21:06 +08:00
Pengfei Ni f83fb14452 Get VirtualMachines with cached resource groups 2018-08-20 23:21:06 +08:00
Pengfei Ni d499855ba2 Add caches for cross node resource groups and unmanaged nodes. 2018-08-20 23:21:03 +08:00
Kubernetes Submit Queue c927968903
Merge pull request #67405 from MorrisLaw/default_load_balancer_name_comment
Automatic merge from submit-queue (batch tested with PRs 66793, 67405, 67068, 67501, 67484). 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 comment for DefaultLoadBalancerName to provide further context

**What this PR does / why we need it**:
Updates the comment for DefaultLoadBalancerName to provide better context and also as a reminder that it should eventually be removed.

**Release note**:

```release-note
NONE
```
2018-08-17 05:05:13 -07:00
Xinhe Li 006310b78e fix load balancer IP change when updating service 2018-08-16 16:49:07 +08:00
Kubernetes Submit Queue 59fdc02b13
Merge pull request #67353 from yguo0905/tpu-api-timeout
Automatic merge from submit-queue (batch tested with PRs 67375, 67353). 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 passing timeout on TPU API operations via context

The caller will provide a context with timeout attached.

**Release note**:

```release-note
None
```

/assign @vishh
2018-08-16 00:54:59 -07:00
Pengfei Ni 680e64f6ae Add unit tests for InstanceID 2018-08-16 14:38:30 +08:00
Pengfei Ni a09bcb20c7 Reduce API calls for Azure instance metadata 2018-08-16 14:38:04 +08:00
morrislaw df4f26ef39 Updated cloud providers with todo comment if using DefaultLoadBalancerName 2018-08-15 21:03:44 -04:00
morrislaw 4f8fe9d922 Update DefaultLoadBalancerName method and add that its deprecated 2018-08-15 20:54:29 -04:00
Kubernetes Submit Queue 8f63f7b010
Merge pull request #67254 from andrewsykim/doc-instance-stopped
Automatic merge from submit-queue (batch tested with PRs 62441, 66702, 67254, 67421, 65309). 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>.

document expectations for stopped/shutdown instances in cloudprovider.Instances interface

**What this PR does / why we need it**:
Add comments which outline expectations for how cloud providers should handle nodes that are stopped/shutdown/sleeping. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
It doesn't fix https://github.com/kubernetes/kubernetes/issues/46442 since some providers still delete node resources for stopped instances (though there are PRs already open to fix this) but we've (mostly?) agreed that not deleting node resources for stopped instances is the correct behavior, or at least the behavior that we want consistent across providers at the moment. 

**Special notes for your reviewer**:

```release-note
NONE
```

/sig cloud-provider
2018-08-15 15:30:21 -07:00
andrewsykim 6ea5053531 document expectations for stopped/shutdown instances in cloudprovider.Instances interface 2018-08-15 09:15:24 -04:00
morrislaw 522db8fce8 Updated comment for DefaultLoadBalancerName to provide further context 2018-08-14 18:20:03 -04:00
Pengfei Ni 028f155b9e Add node affinity for unzoned managed disks 2018-08-14 14:14:01 +08:00
Yang Guo c776cf4296 Allow passing timeout on TPU API operations via context 2018-08-13 16:08:10 -07:00
Doug MacEachern 35c37d5584 vsphere: enable TestInvalidCaCert
This test can be enabled now with the govmomi vendor update in 5c44fd871f
2018-08-11 10:39:20 -07:00
andyzhangx 292226195b fix azure disk create failure due to sdk upgrade 2018-08-10 05:35:50 +00:00
Kubernetes Submit Queue e59c09e07d
Merge pull request #67177 from justaugustus/azure-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>.

Update `pkg/cloudprovider/providers/azure/OWNERS`

* Remove Jaice
* Remove Cole
* Add Stephen as reviewer

Signed-off-by: Stephen Augustus <foo@agst.us>

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

/sig azure
2018-08-08 22:43:46 -07:00
Kubernetes Submit Queue c343fa4937
Merge pull request #66917 from dougm/cloud-doc
Automatic merge from submit-queue (batch tested with PRs 67026, 62945, 66917). 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 Zones doc fixups

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

A few godoc fixups for Cloud Provider Zones.

```release-note
NONE
```
2018-08-08 20:53:06 -07:00
Stephen Augustus ac920453ff Update `pkg/cloudprovider/providers/azure/OWNERS`
* Remove Jaice
* Remove Cole
* Add Stephen as reviewer

Signed-off-by: Stephen Augustus <foo@agst.us>
2018-08-08 23:32:18 -04:00
Kubernetes Submit Queue ae351f1184
Merge pull request #67121 from feiskyer/azdisk-affinity
Automatic merge from submit-queue (batch tested with PRs 67061, 66589, 67121, 67149). 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 DynamicProvisioningScheduling and VolumeScheduling support for Azure managed disks

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

Continue of [Azure Availability Zone feature](https://github.com/kubernetes/features/issues/586).

This PR adds `VolumeScheduling` and `DynamicProvisioningScheduling` support to Azure managed disks.

When feature gate `VolumeScheduling` disabled, no NodeAffinity set for PV:

```yaml
kubectl describe pv
Name:              pvc-d30dad05-9ad8-11e8-94f2-000d3a07de8c
Labels:            failure-domain.beta.kubernetes.io/region=southeastasia
                   failure-domain.beta.kubernetes.io/zone=southeastasia-2
Annotations:       pv.kubernetes.io/bound-by-controller=yes
                   pv.kubernetes.io/provisioned-by=kubernetes.io/azure-disk
                   volumehelper.VolumeDynamicallyCreatedByKey=azure-disk-dynamic-provisioner
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      default
Status:            Bound
Claim:             default/pvc-azuredisk
Reclaim Policy:    Delete
Access Modes:      RWO
Capacity:          5Gi
Node Affinity:
  Required Terms:
    Term 0:        failure-domain.beta.kubernetes.io/region in [southeastasia]
                   failure-domain.beta.kubernetes.io/zone in [southeastasia-2]
Message:
Source:
    Type:         AzureDisk (an Azure Data Disk mount on the host and bind mount to the pod)
    DiskName:     k8s-5b3d7b8f-dynamic-pvc-d30dad05-9ad8-11e8-94f2-000d3a07de8c
    DiskURI:      /subscriptions/<subscription-id>/resourceGroups/<rg-name>/providers/Microsoft.Compute/disks/k8s-5b3d7b8f-dynamic-pvc-d30dad05-9ad8-11e8-94f2-000d3a07de8c
    Kind:         Managed
    FSType:
    CachingMode:  None
    ReadOnly:     false
Events:           <none>
```

When feature gate `VolumeScheduling` enabled, NodeAffinity will be populated for PV:

```yaml
kubectl describe pv
Name:              pvc-0284337b-9ada-11e8-a7f6-000d3a07de8c
Labels:            failure-domain.beta.kubernetes.io/region=southeastasia
                   failure-domain.beta.kubernetes.io/zone=southeastasia-2
Annotations:       pv.kubernetes.io/bound-by-controller=yes
                   pv.kubernetes.io/provisioned-by=kubernetes.io/azure-disk
                   volumehelper.VolumeDynamicallyCreatedByKey=azure-disk-dynamic-provisioner
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      default
Status:            Bound
Claim:             default/pvc-azuredisk
Reclaim Policy:    Delete
Access Modes:      RWO
Capacity:          5Gi
Node Affinity:
  Required Terms:
    Term 0:        failure-domain.beta.kubernetes.io/region in [southeastasia]
                   failure-domain.beta.kubernetes.io/zone in [southeastasia-2]
Message:
Source:
    Type:         AzureDisk (an Azure Data Disk mount on the host and bind mount to the pod)
    DiskName:     k8s-5b3d7b8f-dynamic-pvc-0284337b-9ada-11e8-a7f6-000d3a07de8c
    DiskURI:      /subscriptions/<subscription-id>/resourceGroups/<rg-name>/providers/Microsoft.Compute/disks/k8s-5b3d7b8f-dynamic-pvc-0284337b-9ada-11e8-a7f6-000d3a07de8c
    Kind:         Managed
    FSType:
    CachingMode:  None
    ReadOnly:     false
Events:           <none>
```

When both  `VolumeScheduling` and `DynamicProvisioningScheduling` are enabled, storage class also supports `allowedTopologies` and `volumeBindingMode: WaitForFirstConsumer` for volume topology aware dynamic provisioning:

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
  name: managed-disk-dynamic
parameters:
  cachingmode: None
  kind: Managed
  storageaccounttype: Standard_LRS
provisioner: kubernetes.io/azure-disk
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowedTopologies:
- matchLabelExpressions:
  - key: failure-domain.beta.kubernetes.io/zone
    values:
    - southeastasia-2
    - southeastasia-1
```

**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
DynamicProvisioningScheduling and VolumeScheduling is not supported for Azure managed disks. Feature gates DynamicProvisioningScheduling and VolumeScheduling should be enabled before using this feature.
```

/kind feature
/sig azure
/cc @brendandburns @khenidak @andyzhangx
/cc @ddebroy @msau42 @justaugustus
2018-08-08 16:32:10 -07:00
Kubernetes Submit Queue dd4ab76f05
Merge pull request #66589 from MorrisLaw/get_load_balancer_name_per_provider
Automatic merge from submit-queue (batch tested with PRs 67061, 66589, 67121, 67149). 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>.

Get load balancer name per provider

**What this PR does / why we need it**:
GetLoadBalancerName() should be implemented per cloud provider as opposed to one neutral implementation.

This PR will address this by moving `cloudprovider.GetLoadBalancerName()` to the `LoadBalancer interface` and then provide an implementation for each cloud provider, while maintaining previously expected functionality.

**Which issue(s) this PR fixes**:
Fixes  [#43173](https://github.com/kubernetes/kubernetes/issues/43173)

**Special notes for your reviewer**:
This is a work in progress. Looking for feedback as I work on this, from any interested parties.

**Release note**:

```release-note
NONE
```
2018-08-08 16:32:07 -07:00
Pengfei Ni 30fe79d63f Add DynamicProvisioningScheduling and VolumeScheduling support for AzureDisk 2018-08-08 17:05:46 +08:00
Kubernetes Submit Queue fc89a80934
Merge pull request #63572 from haz-mat/aws-lb-sg-scope-icmp
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>.

scope AWS LoadBalancer security group ICMP rules to spec.loadBalancerSourceRanges

/sig aws
**What this PR does / why we need it**:
Make the client CIDR ranges for MTU consistent with what [the documentation appears to describe](https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer), where the ranges should be equal to `spec.loadBalancerSourceRanges` if supplied.

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

**Release note**:
```release-note
scope AWS LoadBalancer security group ICMP rules to spec.loadBalancerSourceRanges
```
2018-08-07 20:49:15 -07:00
Kubernetes Submit Queue 9d260ff163
Merge pull request #66795 from jiatongw/zones_vendor
Automatic merge from submit-queue (batch tested with PRs 67052, 67094, 66795). 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 zones support for vSphere cloud provider(in-tree)

**What this PR does / why we need it**:
This PR added zones(built-in node labels) support for vSphere cloud provider(in-tree).  More details can be found in the issue as below.

**Which issue(s) this PR fixes** :
Partially fixes phase 1 of issue #64021 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-07 17:16:04 -07:00
Kubernetes Submit Queue 83f6efcec0
Merge pull request #66736 from hanxiaoshuai/cleanup0728
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 func WaitForCompletionRef replace of deprecated func WaitForCompletion

**What this PR does / why we need it**:
use func WaitForCompletionRef replace of deprecated func WaitForCompletion

```
// WaitForCompletion will return when one of the following conditions is met: the long
// running operation has completed, the provided context is cancelled, or the client's
// polling duration has been exceeded.  It will retry failed polling attempts based on
// the retry value defined in the client up to the maximum retry attempts.
// Deprecated: Please use WaitForCompletionRef() instead.
func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) error {
	return f.WaitForCompletionRef(ctx, client)
}
```

**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
```
2018-08-07 03:34:28 -07:00
jiatongw af5084ea75 Add TestZone() 2018-08-06 15:19:10 -07:00
Kubernetes Submit Queue 14bcbb9450
Merge pull request #66553 from feiskyer/azure-disk-availablity-zone
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 availability zones support to Azure managed disks

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

Continue of [Azure Availability Zone feature](https://github.com/kubernetes/features/issues/586).

This PR adds availability zone support for Azure managed disks and its storage class. Zoned managed disks is enabled by default if there are zoned nodes in the cluster.

The zone could also be customized by `zone` or `zones` parameter, e.g.

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
  name: managed-disk-zone-1
parameters:
  zone: "southeastasia-1"
  # zones: "southeastasia-1,"southeastasia-2"
  cachingmode: None
  kind: Managed
  storageaccounttype: Standard_LRS
provisioner: kubernetes.io/azure-disk
reclaimPolicy: Delete
volumeBindingMode: Immediate
```

All zoned AzureDisk PV will also be labeled with its availability zone, e.g.

```sh
$ kubectl get pvc pvc-azuredisk-az-1
NAME                 STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS          AGE
pvc-azuredisk-az-1   Bound     pvc-5ad0c7b8-8f0b-11e8-94f2-000d3a07de8c   5Gi        RWO            managed-disk-zone-1   2h

$ kubectl get pv pvc-5ad0c7b8-8f0b-11e8-94f2-000d3a07de8c --show-labels
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS    CLAIM                        STORAGECLASS          REASON    AGE       LABELS
pvc-5ad0c7b8-8f0b-11e8-94f2-000d3a07de8c   5Gi        RWO            Delete           Bound     default/pvc-azuredisk-az-1   managed-disk-zone-1             2h        failure-domain.beta.kubernetes.io/region=southeastasia,failure-domain.beta.kubernetes.io/zone=southeastasia-1
```

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

See also the [KEP](https://github.com/kubernetes/community/pull/2364).

DynamicProvisioningScheduling feature would be added in a following PR.

**Release note**:

```release-note
Azure managed disks now support availability zones and new parameters `zoned`, `zone` and `zones` are added for AzureDisk storage class.
```

/kind feature
/sig azure
/assign @brendandburns @khenidak @andyzhangx
2018-08-06 02:02:54 -07:00
jiatongw 5c44fd871f Update vmware/govmomi vendor: add vapi package
Zones implementation for vSphere cloud provider needs dependencies
which are not included in current vmware/govmomi vendor. So this
update added "vapi" package to support zones.
2018-08-03 22:11:42 -07:00
morrislaw 6ecec23690 Implement GetLoadBalancerName per provider and add DefaultLoadBalancerName. 2018-08-04 00:36:48 -04:00
jiatongw 99abd4bc79 Add zones support for vSphere cloud provider (in-tree) 2018-08-03 13:24:42 -07:00
Doug MacEachern 8e82db428b Cloud Provider Zones doc fixups 2018-08-02 08:18:01 -07:00
Kubernetes Submit Queue 22d0ef2a8e
Merge pull request #65730 from ddebroy/ebs-affinity1
Automatic merge from submit-queue (batch tested with PRs 65730, 66615, 66684, 66519, 66510). 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 DynamicProvisioningScheduling support for EBS

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

This PR adds support for the DynamicProvisioningScheduling feature in EBS. With this in place, if VolumeBindingMode: WaitForFirstConsumer is specified in a EBS storageclass and DynamicProvisioningScheduling is enabled, EBS provisioner will use the selected node's LabelZoneFailureDomain as the zone to provision the EBS volume in.

**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**:
Related to #63232

Sample `describe pv` output with NodeAffinity populated:

```
~$ kubectl describe pv pvc-f9d2138b-7e3e-11e8-a4ea-064124617820
Name:              pvc-f9d2138b-7e3e-11e8-a4ea-064124617820
Labels:            failure-domain.beta.kubernetes.io/region=us-west-2
                   failure-domain.beta.kubernetes.io/zone=us-west-2a
Annotations:       kubernetes.io/createdby=aws-ebs-dynamic-provisioner
                   pv.kubernetes.io/bound-by-controller=yes
                   pv.kubernetes.io/provisioned-by=kubernetes.io/aws-ebs
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      slow3
Status:            Bound
Claim:             default/pvc3
Reclaim Policy:    Delete
Access Modes:      RWO
Capacity:          6Gi
Node Affinity:     
  Required Terms:  
    Term 0:        failure-domain.beta.kubernetes.io/zone in [us-west-2a]
                   failure-domain.beta.kubernetes.io/region in [us-west-2]
Message:           
Source:
    Type:       AWSElasticBlockStore (a Persistent Disk resource in AWS)
    VolumeID:   aws://us-west-2a/vol-0fc1cdae7d10860f6
    FSType:     ext4
    Partition:  0
    ReadOnly:   false
Events:         <none>
```

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

/sig storage
/assign @msau42 @jsafrane
2018-08-01 15:52:07 -07:00
Deep Debroy 217a3d8902 Add DynamicProvisioningScheduling support for EBS
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-08-01 09:00:03 -07:00
Kubernetes Submit Queue 1f8b3fded9
Merge pull request #66728 from gnufied/fix-volume-modifition-aws
Automatic merge from submit-queue (batch tested with PRs 66489, 66728, 66739). 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>.

Speed up volume modifications on AWS

Volume becomes reusable after it reached optimizing state.

/sig storage
/sig aws


```release-note
Make EBS volume expansion faster
```

cc @d-nishi @kokhang
2018-07-30 17:10:04 -07:00
Pengfei Ni 6bfd2be2ea Add documentation and unit tests 2018-07-30 13:32:57 +08:00
Pengfei Ni 811e831b0a Chose availability zones from active nodes 2018-07-30 13:31:12 +08:00
Pengfei Ni 74813d0d26 Add availability zone support for dynamic provisioning Azure managed disks 2018-07-30 13:31:12 +08:00
Pengfei Ni 87c5883337 Implement GetLabelsForVolume for AzureDisk 2018-07-30 13:31:12 +08:00
hangaoshuai 47c753aa18 use aws.StringSlice replace of deprecated func stringPointerArray 2018-07-28 16:57:36 +08:00
hangaoshuai 5fe4a1f24e use func WaitForCompletionRef replace of deprecated func WaitForCompletion 2018-07-28 15:45:59 +08:00
Kubernetes Submit Queue c7603b069d
Merge pull request #66619 from w-leads/feature/vcp-shutdown-taint
Automatic merge from submit-queue (batch tested with PRs 66225, 66648, 65799, 66630, 66619). 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 InstanceShutdownByProviderID for vSphere CP

**What this PR does / why we need it**:
To detach volumes from shutdown nodes #66181

**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
```
2018-07-27 16:42:18 -07:00
Kubernetes Submit Queue c2cbe86f7d
Merge pull request #66648 from feiskyer/azure-sdk-update
Automatic merge from submit-queue (batch tested with PRs 66225, 66648, 65799, 66630, 66619). 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 Azure Go SDK to v19.0.0 and get availability zone for VirtualMachineScaleSetVM

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

Continue of #66242. This PR updates Azure Go SDK to v19.0.0 (with compute API 2018-04-01) and gets availability zones for VirtualMachineScaleSetVM.

**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
Azure Go SDK has been upgraded to v19.0.0 and VirtualMachineScaleSetVM now supports availability zones.
```

/sig azure
/assign @brendandburns @khenidak @andyzhangx
2018-07-27 16:42:08 -07:00
Hemant Kumar d0c2d3fe89 Speed up volume modifications on AWS
Volume becomes reusable after it reached optimizing state
2018-07-27 17:44:05 -04:00
Ryo Nishikawa 3c50f3d447 Remove verbose code in VCP 2018-07-27 10:56:10 -07:00
Tardis Xu f2b0bb9073 Fix that fails to resize pvc of cinder volume. 2018-07-27 16:36:53 +08:00
Ryo Nishikawa 059daa6de9 Remove unnecessary context in VCP 2018-07-26 10:25:08 -07:00
Pengfei Ni 1e01eab0bf Add unit tests for GetZoneByNodeName 2018-07-25 18:16:36 +08:00
Pengfei Ni a29fabe20d Get availability zone for VirtualMachineScaleSetVM 2018-07-25 18:16:21 +08:00
Pengfei Ni 5bf3b2119b Update compute API to 2018-04-01 2018-07-25 17:39:32 +08:00
Kubernetes Submit Queue 35c3764bbb
Merge pull request #66464 from wongma7/round-overflow
Automatic merge from submit-queue (batch tested with PRs 66464, 66488). 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 overflowing int64 in RoundUpSize and return error if overflow int

**What this PR does / why we need it**:
There are many places in plugins (some I may have missed) that we naively convert a resource.Quantity.Value() which is an int64, to an int, which may be only 32 bits long.

Background, optional to read :): Kubernetes canonicalizes resource.Quantities, and from what I have seen testing creating PVCs, decimalSI is the default. If a quantity is in `decimalSI` format and its value in bytes would overflow an int64, e.g. `10E`, nothing happens. If it is in binarySI and its value in bytes would overflow an int64, e.g. `10Ei`, it is set down to 2^63-1 and there's no overflow of the field value. But there may be overflow later in the code which is what this PR is addressing.

* Change `RoundUpSize` implementation to avoid overflowing `int64`
* Add `RoundUp*Int` functions for use when an `int` is expected instead of an `int64`, because `int` may be 32bits and naively doing `int($INT64_VALUE)` can lead to silent overflow. These functions return an error if overflow has occurred.
* Rename `*GB` variables to `*GiB` where appropriate for maximum clarity
* Use `RoundUpToGiB` instead of `RoundUpSize` where possible

**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**: please review carefully as we don't have e2e tests for most plugins!

**Release note**:

```release-note
NONE
```
edit: remove 'we do not need to worry about...'. yes we do, i worded that badly :))
2018-07-24 19:03:01 -07:00
Ryo Nishikawa 5e81dcd4f0 Implement InstanceShutdownByProviderID for vSphere CP 2018-07-24 10:51:17 -07:00
Kubernetes Submit Queue 2beab8623c
Merge pull request #66180 from kkmsft/user_assigned_msi
Automatic merge from submit-queue (batch tested with PRs 62423, 66180, 66492, 66506, 65242). 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 user assigned MSI support

**What this PR does / why we need it**:
Adds the support for generating tokens via user assigned MSI. 

**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
Add support for using User Assigned MSI (https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/overview) with Kubernetes cluster on Azure.
```
2018-07-23 12:32:06 -07:00
Kubernetes Submit Queue d244fa9441
Merge pull request #62423 from nckturner/eks-approvers-reviewers
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 myself, Micah to reviewers

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

Signed-off-by: Nick Turner <nic@amazon.com>
2018-07-23 11:21:37 -07:00
Matthew Wong 093e231289 Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
Krishnakumar R 2554c53bb3 Add user assigned MSI support for azure cloudprovider. 2018-07-20 08:39:16 -07:00
Kubernetes Submit Queue a4a2e6d61e
Merge pull request #66400 from nicksardo/fix-err-code
Automatic merge from submit-queue (batch tested with PRs 66098, 66389, 66400, 66413, 66378). 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: Return correct error type and HTTP Status code for operation errors

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

**Special notes for your reviewer**:
/assign bowei, zihongz, rramkumar
/cc bowei

**Release note**:
```release-note
GCE: Fixes loadbalancer creation and deletion issues appearing in 1.10.5.
```
2018-07-20 05:30:12 -07:00
Kubernetes Submit Queue b68c9440da
Merge pull request #66242 from feiskyer/instance-az
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 initial availability zones support for Azure nodes

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

The first part of [Azure Availability Zone feature](https://github.com/kubernetes/features/issues/586).

This PR adds initial availability zone (AZ) support for Azure nodes. With this PR, Azure nodes with AZ will have label `failure-domain.beta.kubernetes.io/zone=<region>-<zoneID>`, e.g. `southeastasia-1`.

It also updates instance metadata api-version to 2017-12-01, which is required for AZ.

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

VirtualMachineScaleSetVM doesn't have AZ info yet. It will be supported later after new Azure Go SDK releases.

**Release note**:

```release-note
Azure nodes with availability zone now will have label `failure-domain.beta.kubernetes.io/zone=<region>-<zoneID>`.
```

/kind feature
/sig azure

/assign @brendandburns @khenidak @andyzhangx
2018-07-20 00:18:47 -07:00
Nick Sardo 808bc227ae Return correct error type and HTTP Status code for operation errors 2018-07-19 13:18:29 -07:00
Kubernetes Submit Queue 041ba05514
Merge pull request #66324 from krunaljain/bugfix/revert_pd_size_rounding_to_GB
Automatic merge from submit-queue (batch tested with PRs 66175, 66324, 65828, 65901, 66350). 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 E2E tests for disk resizing

What this PR does / why we need it:
This PR fixed the E2E test failure due to [this](539b3693f4) commit. The case of disk resizing was not handled which is fixed in this commit. 

Issues Fixed:
[#66295
](https://github.com/kubernetes/kubernetes/issues/66295)
```release-note
none
```
2018-07-18 16:42:11 -07:00
tanshanshan 5dd20996af session.New is deprecated and remove unused variable 2018-07-18 17:48:21 +08:00
tanshanshan 3676a08690 clean unused variable 2018-07-18 14:39:36 +08:00
Krunal Jain d5db363faa Fixing E2E tests for disk resizing 2018-07-17 18:52:13 -07:00
Kubernetes Submit Queue 1a538daf44
Merge pull request #66304 from jiatongw/gocheck
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 error check and ignore unused variable (SA4006)

**What this PR does / why we need it**:
Fix some bugs in cloud provider vsphere, issue can be found here #66303
```pkg/cloudprovider/providers/vsphere/nodemanager.go:176:5: defers in this range loop won't run unless the channel gets closed (SA9001)
pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vmdm.go:129:8: this value of err is never used (SA4006)
pkg/cloudprovider/providers/vsphere/vsphere.go:596:34: argument ctx is overwritten before first use (SA4009)
pkg/cloudprovider/providers/vsphere/vsphere_test.go:360:2: this value of instanceID is never used (SA4006)
pkg/cloudprovider/providers/vsphere/vsphere_util.go:301:3: defers in this infinite loop will never run (SA5003)
```
**Special notes for your reviewer**:
I fixed ```SA4006``` report in that issue, but there are still other code needed to discuss and fix.

**Release note**:
```release-note
NONE
```
2018-07-17 16:45:59 -07:00
Kubernetes Submit Queue cdc411edf0
Merge pull request #66261 from vmware/fix-locate-resource-pool
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 locating resourcepool-path specified in the vsphere.conf file

**What this PR does / why we need it**:
When volume is provisioned using the vsphere storage policy, `resourcepool-path` specified in the `vsphere.conf` file is used for creating a shadow/dummy VM.  Dummy VM is temporarily created and then deleted once volume is created on the compatible Datastore.

At present If user specifies `resourcepool-path` in the `vsphere.conf` file,  volume provisioner is not able to locate the compute resource for the given path. This is because look up is made using `finder.DefaultComputeResource(ctx)` and `finder.ComputeResource(ctx, computePath)`, which is not correct. If user specifies name of the cluster or cluster path then provisioning works.

This is resolved with using correct govmomi method - `func (f *Finder) ResourcePoolOrDefault(ctx context.Context, path string) (*object.ResourcePool, error)`


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

**Special notes for your reviewer**:
Following testing is performed for this change.

1) specified resource-pool path in the `vsphere.conf` file and verified VM is created under the specified resource pool.

```
resourcepool-path="ClusterFolder-1/cluster-vsan-1/Resources/ShadowVMPool"
```

2) If resource pool is not available, specified cluster's default resource pool path in the `vsphere.conf` file and verified volume provisioning works. For this case, VM is directly created under cluster.

```
resourcepool-path="ClusterFolder-1/cluster-vsan-1/Resources"
```

3) Verified above with having multiple clusters with the same name in one datacenter.
4) Verified with empty resource pool path in the vsphere.conf file. 

```
resourcepool-path=""
```
As expected, provisioning is failing with `Failed to provision volume with StorageClass "vsan-gold-policy": no default resource pool found`.

Refer to this datacenter inventory for the path specified in the `resourcepool-path` configuration.

![image](https://user-images.githubusercontent.com/22985595/42792922-738e3f9c-892c-11e8-9e51-32e2328b116b.png)

Current documentation describes `resourcepool-path`configuration is optional, which needs to be corrected once PR is merged. For policy based provisioning this is not an optional parameter.

Documentation link: https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/existing.html



**Release note**:

```release-note
Fix for resourcepool-path configuration in the vsphere.conf file.
```

cc: @kubernetes/vmware
2018-07-17 15:26:39 -07:00
Jiatong Wang 4d578d1389 Add error check and ignore unused variable (SA4006) 2018-07-17 10:41:06 -07:00
Pengfei Ni e593fb99a6 Fix unit tests for GetZone 2018-07-17 16:57:30 +08:00
Pengfei Ni 120055b3c7 Add availability zone support to Azure nodes 2018-07-17 16:57:27 +08:00
Krunal Jain 539b3693f4 Reverting commit #56600 as GCE PD is allocated in chunks of GiB instead of GBs
Fixing comments and importing constant from util

Importing constant from util

Fixing comment in volume_provisioning.go
2018-07-16 11:55:57 -07:00
Divyen Patel 6282a40530 Fix locating resporce-pool for volume provisioning 2018-07-16 10:19:32 -07:00
Kubernetes Submit Queue 16c5ba4114
Merge pull request #66045 from cpuguy83/az_lb_timeout
Automatic merge from submit-queue (batch tested with PRs 66121, 66140, 66045). 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 setting azure LB idle timeout

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

Adds a new annotation to allow users to configure the idle timeout of
the Azure LB.

**Release note**:

```release-note
Support configuring the Azure load balancer idle connection timeout for services
```
2018-07-12 23:05:09 -07:00
Brian Goff 55569494d6 Support setting azure LB idle timeout
Adds a new annotation to allow users to configure the idle timeout of
the Azure LB.
2018-07-12 10:41:13 -07:00
Kubernetes Submit Queue d2696d5612
Merge pull request #66007 from w-leads/bugfix/vcp-missing-vmuuid
Automatic merge from submit-queue (batch tested with PRs 66122, 66007). 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 vmUUID when renewing nodeinfo in VCP

**What this PR does / why we need it**:
This PR fixes an issue that VM UUID is removed when renewing node information in vSphere cloud provider

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

/sig vmware
2018-07-12 10:14:03 -07:00
Kubernetes Submit Queue 0972ce1acc
Merge pull request #65649 from rsc/fix-printf
Automatic merge from submit-queue (batch tested with PRs 66076, 65792, 65649). 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>.

kubernetes: fix printf format errors

These are all flagged by Go 1.11's
more accurate printf checking in go vet,
which runs as part of go test.

```release-note
NONE
```
2018-07-11 14:09:08 -07:00
Kubernetes Submit Queue 82c986ecbc
Merge pull request #65978 from sngchlko/labeling-region-to-cinder-pv
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 region label to dynamic provisioned cinder PVs

**What this PR does / why we need it**:
This PR adds region label to dynamic provisioned Cinder PVs at the time of the PV creation.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-07-11 05:28:02 -07:00
Russ Cox 2bd91dda64 kubernetes: fix printf format errors
These are all flagged by Go 1.11's
more accurate printf checking in go vet,
which runs as part of go test.

Lubomir I. Ivanov <neolit123@gmail.com>
applied ammend for:
  pkg/cloudprovider/provivers/vsphere/nodemanager.go
2018-07-11 00:10:15 +03:00
Kubernetes Submit Queue 0ff24a29c0
Merge pull request #65781 from zetaab/emptysection
Automatic merge from submit-queue (batch tested with PRs 65902, 65781). 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>.

if loadbalancer section is not defined in cloudconfig, do not init support

**What this PR does / why we need it**: if LoadBalancer section is not defined in cloudconfig, we should not initialize loadbalancer support for openstack cloudprovider.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
If LoadBalancer is not defined in cloud config, the loadbalancer is not initialized anymore in openstack. All setups must have some setting under that section
```
2018-07-09 23:07:04 -07:00
Ryo Nishikawa afcff6f2f7 Return vmUUID when renewing nodeinfo in VCP 2018-07-09 17:45:07 -07:00
Ashley Gau c20b3c25fd ensureInternalBackendServiceGroups inserts InstanceGroup links, not
nodes
2018-07-09 14:22:01 -07:00
Ashley Gau 27a453fc77 move t.Parallel() out of for loop 2018-07-09 12:58:19 -07:00
Kubernetes Submit Queue f70410959d
Merge pull request #65226 from ingvagabund/store-cloud-provider-latest-node-addresses
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>.

Store the latest cloud provider node addresses

**What this PR does / why we need it**:
Buffer the recently retrieved node address so they can be used as soon as the next node status update is run.


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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2018-07-09 10:47:07 -07:00
Seungcheol Ko 1df1181b4f Add region label to dynamic provisioned cinder PVs 2018-07-09 23:24:11 +09:00
Doug MacEachern dd8ff56eb8 Update bazel 2018-07-08 22:51:14 -07:00
Doug MacEachern b4976ecb17 vSphere: set vCenter client UserAgent
Setting the client UserAgent makes it easier to identify vCenter sessions
used by the vSphere Cloud Provider.  This is useful to remove sessions that
have leaked, such as when a VCP process goes away without calling Logout().
And to test that VCP properly re-authenticates when a session is removed.

Example use:
  govc session.ls | grep kubernetes-cloudprovider | awk '{print $1}' | xargs -n1 govc session.rm
2018-07-08 22:36:53 -07:00
Doug MacEachern 9a219513dc vSphere Cloud Provider: avoid read race during logout
The Client nil check was added in 6d1c4a3 , but there was not any
go test coverage of that code path until e22f9ca

Fixes #65696
2018-07-06 10:05:03 -07:00
Fabio Rapposelli a77f4b273e
Add new owners to vSphere cloud provider 2018-07-06 11:05:27 +02:00
andyzhangx b76a3a1ce8 fix azure storage account creation failure
fix comments
2018-07-06 06:16:19 +00:00
Jesse Haka 955d2c2dc2 fix gofmt 2018-07-04 08:46:41 +03:00
Jesse Haka a78fc5926d if loadbalancer section is not defined in cloudconfig, do not initialize lb support
use reflect because structs with []string cannot be compared
2018-07-03 23:45:42 +03:00
Jan Chaloupka 9d9fb4de29 Put all the node address cloud provider retrival complex logic into cloudResourceSyncManager 2018-07-03 20:11:35 +02:00
Kubernetes Submit Queue 36815869ad
Merge pull request #65412 from yastij/az-ignore-failed-nic
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>.

skip nic that are in failing state

**What this PR does / why we need it**: this fixes partially #65025. Currently when getting primary NIC for VMSS the provisioning state isn't returned.

**Which issue(s) this PR fixes** : Fixes partially (for VMAS) #65025

**Special notes for your reviewer**:

/assign @feiskyer 

**Release note**:

```release-note
skip nodes that have a primary NIC in a 'Failed' provisioningState
```
2018-07-01 20:25:04 -07:00
Kubernetes Submit Queue 64243d4806
Merge pull request #64758 from pivotal-k8s/64222-vcp-ca-cert
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>.

Setup TLS with CA Cert for vsphere cloud provider

- Extend config to take a path to a CA Certificate
- Use the CA Cert when establishing a connection with the SOAP client

Testing
We provide certs and keys for tests as fixtures, `vclib/fixtures`.
Those were created (and can be regenerated) using `vclib/fixtures/createCerts.sh`.

At the moment it's possible to configure a CA path and at the same time allow insecure
communication between vsphere cloud provider and vcenter. This may
change in the future; we might opt for overwriting the insecure
communication if a CA is configured / log and transparently pass the
arguments to the vcenter command / other. To be discussed.

At the moment the CA is a global level configuration. In other
words, all vcenter servers need to use certificates signed by the same
CA. There might be use cases for different CA per vcenter server; to be
discussed.





**What this PR does / why we need it**:
This PR adds the option of configuring a trusted CA for the communication between the vsphere cloud provider and the vcenter control plane.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
- Can configure the vsphere cloud provider with a trusted Root-CA
```
2018-06-30 03:29:24 -07:00
Yassine TIJANI 957b6be80d skip nic that are in failing state 2018-06-28 22:50:38 +02:00
Kubernetes Submit Queue 2a0ad6b987
Merge pull request #65120 from freehan/revendor
Automatic merge from submit-queue (batch tested with PRs 64575, 65120, 65463, 65434, 65522). 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>.

Revendor GCE Go Client

Revendor GCE API go client and switch to use beta neg api in gce cloud provider.

```release-note
None
```
2018-06-28 02:20:16 -07:00
Kubernetes Submit Queue 82ead19d5e
Merge pull request #65516 from andyzhangx/external-rg-azuredisk-fix
Automatic merge from submit-queue (batch tested with PRs 65492, 65516, 65447). 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 creation issue when specifying external resource group

**What this PR does / why we need it**:
fix azure disk creation issue when specifying external resource group, after azure disk creation succeeded, it fails to get azure disk state since it's still using original resource group

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

**Special notes for your reviewer**:
Together with https://github.com/kubernetes/kubernetes/pull/65443, this feature has been done, I will cherry-pick to prior versions later.
So in the end, we have two ways to make azure disk dynamic provision under an external resource group
 - specify `resourcegroup` parameter in azure disk storage class
```
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: hdd
provisioner: kubernetes.io/azure-disk
parameters:
  skuname: Standard_LRS
  kind: managed
  cachingmode: None
  resourcegroup: USER-SPECIFIED-RG
```

 - specify `volume.beta.kubernetes.io/resource-group` in PVC annotations
```
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: pvc-azuredisk
  annotations:
    volume.beta.kubernetes.io/resource-group: "USER-SPECIFIED-RG"  
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: hdd
```
**Release note**:

```
fix azure disk issue when specifying external resource group
```

/kind bug
/sig azure
@jsafrane @rootfs 
Just FYI @khenidak @brendandburns @feiskyer
2018-06-27 02:15:08 -07:00
Kubernetes Submit Queue 5f7f5c43d8
Merge pull request #65508 from w-leads/fix-typo-vsphere
Automatic merge from submit-queue (batch tested with PRs 65507, 65508, 65486). 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 typo in vsphere cloud provider comment

**What this PR does / why we need it**:
Fix typo in code of vsphere cloud provider
As far as I know, it's not purchased by Google right..?

**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
```
2018-06-26 23:17:02 -07:00
andyzhangx ccdb09fdde fix azure disk issue for external resource group 2018-06-27 02:20:01 +00:00
Ryo Nishikawa 0637d52128 Fix typo in comment 2018-06-26 17:04:25 -07:00
Minhan Xia 35fee75754 bug fix for cloud provider generator 2018-06-26 11:33:38 -07:00
Minhan Xia 232ebadc9e add beta healthcheck in gce cloud provider 2018-06-26 11:33:38 -07:00
Minhan Xia 3248fa2a89 swtich to use Beta 2018-06-26 11:33:38 -07:00
Minhan Xia 469ac167c1 regenerate GCE cloud provider 2018-06-26 11:29:55 -07:00
Kubernetes Submit Queue 3d694993d0
Merge pull request #65373 from multi-io/openstack_lbaas_node_secgroup_fix
Automatic merge from submit-queue (batch tested with PRs 65449, 65373, 49410). 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 LBaaS fix: must use ID, not name, of the node security group

This is a bugfix for the OpenStack LBaaS cloud provider security group management.

A bit of context: When creating a load balancer for a given `type: LoadBalancer` service, the provider will try to:

(see `pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go`/`EnsureLoadBalancer`)

1. create a load balancer (LB) in Openstack with listeners corresponding to the service's ports
2. attach a floating IP to the LB's network port

If `manage-security-groups` is enabled in controller-manager's cloud.conf:

3. create a security group with ingress rules corresponding to the LB's listeners, and attach it to the LB's network port
4. for all nodes of the cluster, pick an existing security group for the nodes ("node security group") and add ingress rules to it exposing the service's NodePorts to the security group created in step 3.

In the current upstream master, steps 1 through 3 work fine, step 4 fails, leading to a service that's not accessible via the LB without further manual intervention.

The bug is in the "pick an existing security group" operation (func `getNodeSecurityGroupIDForLB`), which, contrary to its name, will return the security group's name rather than its ID (actually it returns a list of names rather than IDs, apparently to cover some corner cases where you might have more than one node security group, but anyway). This will then be used when trying to add the ingress rules to the group, which the Openstack API will reject with a 404 (at least on our (fairly standard) Openstack Ocata installation) because we're giving it a name where it expects an ID.

The PR adds a "get ID given a name" lookup to the `getNodeSecurityGroupIDForLB` function, so it actually returns IDs. That's it. I'm not sure if the upstream code wasn't really tested, or maybe other people use other Openstacks with more lenient APIs. The bug and the fix is always reproducible on our installation.

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


**Special notes for your reviewer:**

Should we turn `getNodeSecurityGroupIDForLB` into a method with the lbaas as its receiver because it now requires two of the lbaas's attributes? I'm not sure what the conventions are here, if any. 

**Release note**:
```release-note
NONE
```
2018-06-26 02:52:06 -07:00
Kubernetes Submit Queue 732eca80cc
Merge pull request #65156 from agau4779/remove_neg_gate
Automatic merge from submit-queue (batch tested with PRs 65156, 65448). 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] move NEG out of featuregate

**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 # https://github.com/kubernetes/ingress-gce/issues/274
**Release note**:
-->
```release-note
NONE
```
2018-06-25 16:07:03 -07:00
Kubernetes Submit Queue 7f23a743e8
Merge pull request #65258 from ddebroy/ddebroy-ebs1
Automatic merge from submit-queue (batch tested with PRs 65164, 65258). 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>.

Query candidate zones for EBS when zone/zones not passed

**What this PR does / why we need it**:
This PR skips invoking `getCandidateZonesForDynamicVolume` to query EC2 zones of instances when zone/zones is present.

/sig storage

**Release note**:
```
none
```
2018-06-25 14:44:08 -07:00
Olaf Klischat 8ed735d104 BUGFIX: must use ID, not name, of the node security group when adding rules to it 2018-06-25 21:44:59 +02:00
Ashley Gau 7beefd0c9c move NEG out of featuregate 2018-06-25 09:47:39 -07:00
Hannes Hörl 7b8efe39c4 Update bazel
... after rebase
2018-06-24 17:08:40 +01:00
Hannes Hörl a536ebc580 Remove unused exported errors 2018-06-24 11:22:04 +01:00
Hannes Hörl 37e8c17041 Do not do noramlization of the fingerprint format 2018-06-24 11:07:23 +01:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Jeff Grafton a725660640 Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
Kubernetes Submit Queue b7b8e160a5
Merge pull request #64793 from MrHohn/gce-backend-service-beta-wrappers
Automatic merge from submit-queue (batch tested with PRs 61330, 64793, 64675, 65059, 65368). 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 provider ] Wrapper for beta backend service create/update

**What this PR does / why we need it**:
Feel free to wait after 1.11 code freeze.

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

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

**Release note**:

```release-note
NONE
```
2018-06-22 14:52:33 -07:00
Kubernetes Submit Queue 1996aa3e69
Merge pull request #65345 from nicksardo/target-proxy-set
Automatic merge from submit-queue (batch tested with PRs 65024, 65287, 65345, 64693, 64941). 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>.

Change signature of SetUrlMapForTargetHTTPProxy

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

**Release note**:
```release-note
NONE
```
2018-06-22 06:10:17 -07:00
Kubernetes Submit Queue 1b43cd1a62
Merge pull request #65292 from wgliang/master.azure-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>.

Change Azure ARM Rate limiting error message

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

Change Azure ARM Rate limiting error message

**Special notes for your reviewer**:
@khenidak 

**Release note**:

```release-note
Change Azure ARM Rate limiting error message.
```
2018-06-22 01:11:10 -07:00
Kubernetes Submit Queue 18b16be622
Merge pull request #65223 from jsafrane/aws-inaccessible-key
Automatic merge from submit-queue (batch tested with PRs 65187, 65206, 65223, 64752, 65238). 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>.

Fixed detection of inaccessible AWS encryption key.

AWS provisioner now checks if created encrypted volume gets "Available" or it gets silently deleted by AWS because StorageClass referenced invalid (e.g. non-existing) KMS key for encryption.

This seems to be the only way how to detect such invalid key, because Kubernetes may not have enough permission to check if the key exists.

**Which issue(s) this PR fixes**
Fixes #62171

**Special notes for your reviewer**:

**Release note**:

```release-note
AWS now checks for validity of ecryption key when creating encrypted volumes. Dynamic provisioning of encrypted volume may get slower due to these checks.
```

/sig aws
/sig storage
@kubernetes/sig-aws-misc
2018-06-21 19:48:10 -07:00
Kubernetes Submit Queue af1450df24
Merge pull request #65152 from alvaroaleman/vsphere-control-plane-on-cloud
Automatic merge from submit-queue (batch tested with PRs 65152, 65199, 65179, 64598, 65216). 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>.

Do not query for VMUUID in vsphere cloud provider if it was explicitly passed

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

It allows running the kube controller-manager with the vsphere cloudprovider enabled on a machine that is not a vmware VM

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

**Special notes for your reviewer**:

**Release note**:

```release-note
In the vSphere cloud provider the `Global.vm-uuid` configuration option is not deprecated anymore, it can be used to overwrite the VMUUID on the controller-manager
```

/sig vmware
2018-06-21 18:20:05 -07:00
Nick Sardo e7e28c2edf Change signature of SetUrlMapForTargetProxy 2018-06-21 17:41:12 -07:00
Zihong Zheng 5d02573e56 [gce provider] Ran hack/update-cloudprovider-gce.sh 2018-06-21 11:16:30 -07:00
Zihong Zheng c516a35d4d [gce provider] Wrapper for beta backend servvice create/update 2018-06-21 11:16:30 -07:00
Kubernetes Submit Queue 0f1b6ca986
Merge pull request #65037 from prameshj/ig-naming
Automatic merge from submit-queue (batch tested with PRs 64140, 64898, 65022, 65037, 65027). 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>.

Handle empty cluster UID in instance group name

**What this PR does / why we need it**:
This PR handles an empty cluster UID when generating InstanceGroupName. The current implementation will create a name ending in "--" which is invalid.
**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
```
2018-06-21 05:40:20 -07:00
Kubernetes Submit Queue 0765e0a6cc
Merge pull request #64957 from andyzhangx/azure-account-https
Automatic merge from submit-queue (batch tested with PRs 64895, 64938, 63700, 65050, 64957). 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>.

set EnableHTTPSTrafficOnly in azure storage account creation

**What this PR does / why we need it**:
Enforce azure storage account creation with https traffic only, this PR will apply for both azure disk & azure file features.

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

**Special notes for your reviewer**:
Tests with azure disk & azure file all pass

**Release note**:

```
Enforce azure storage account creation with https traffic only
```

/sig azure
/kind feature
/assign @khenidak
2018-06-21 04:15:20 -07:00
Guoliang Wang 6e6eaca393 Change Azure ARM Rate limiting error message 2018-06-21 12:12:15 +08:00
Kubernetes Submit Queue 3f581dc265
Merge pull request #64427 from andyzhangx/azuredisk-rg
Automatic merge from submit-queue (batch tested with PRs 65032, 63471, 64104, 64672, 64427). 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 external resource group support for azure disk

**What this PR does / why we need it**:
add external resource group support for azure disk, 
 - without this PR, user could only create dynamic azure disk in the same resource group as cluster
 - with this PR, user could specify external resource group in PVC:
```
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: pvc-azuredisk
  annotations:
    volume.beta.kubernetes.io/resource-group: "USER-SPECIFIED-RG"  
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: hdd
```

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

**Special notes for your reviewer**:
Pls note above config won't change resource group for azure disk forever, next time if user don't specify resource group, only default resource group will be used.

**Release note**:

```
add external resource group support for azure disk
```
/sig azure
/assign @feiskyer @karataliu 
/cc @khenidak
2018-06-20 04:23:24 -07:00
Deep Debroy 11821e23b4 Querry candidate zones for EBS when zone/zones not passed
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-06-19 21:11:48 -07:00
Kubernetes Submit Queue 24117bb05c
Merge pull request #65237 from andrewsykim/andrew-cloud-provider-approver
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 @andrewsykim as pkg/cloudprovider approver

**What this PR does / why we need it**:
adds myself as an approver for pkg/cloudprovider

```release-note
NONE
```
2018-06-19 18:48:56 -07:00
Kubernetes Submit Queue 781f93bc31
Merge pull request #65000 from karataliu/lbdoc_rm
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 out azure_loadbalancer.md to cloud provider repository

**What this PR does / why we need it**:
Move out doc to cloud provider repository.
The file 'azure_loadbalancer.md' has been moved to cloud provider repository in https://github.com/kubernetes/cloud-provider-azure/pull/23 , this PR is to remove it from upstream.

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

**Special notes for your reviewer**:

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

cc @feiskyer
2018-06-19 18:47:45 -07:00
andrewsykim e89c55c61c add @andrewsykim as pkg/cloudprovider approver 2018-06-19 15:46:51 -04:00
Jan Safranek 7bbe309d8d Fixed detection of inaccessible AWS encryption key. 2018-06-19 10:11:47 +02:00
andyzhangx ee290fe42e fix comments 2018-06-19 07:39:08 +00:00
Hannes Hörl 7c27cd08ad Check if the server actually configured with a certificate 2018-06-18 13:49:05 +01:00
Hannes Hörl 012910f76f Update copyright header 2018-06-18 13:37:03 +01:00
Alvaro Aleman 81e25c37be
Do not query for VMUUID if it was explicitly passed 2018-06-17 11:56:04 +02:00
Nick Sardo 787f3a6386 Use context with timeout instead of context.Background 2018-06-14 11:20:38 -07:00
Nick Sardo 115ddc5a8e Wait a minimum amount of time for polling operations 2018-06-14 11:20:34 -07:00
Pavithra Ramesh 2d10c8a066 Handle empty clusterID in loadbalancer naming 2018-06-12 10:45:34 -07:00
Dong Liu df494e924a Move out azure_loadbalancer.md to cloud provider repository 2018-06-12 10:11:26 +08:00
andyzhangx b9c07dc7a1 set EnableHTTPSTrafficOnly in storageAccount creation 2018-06-11 07:10:24 +00:00
Hannes Hörl bec497765a Create new certs & cleanup cert generation
The test certificates are now valid for 200 years.
The generation script has been cleaned up a bit.
2018-06-08 14:42:54 +01:00
Maria Ntalla ed4d445352 Check certificate thumbprint when configured 2018-06-08 12:00:11 +01:00
Maria Ntalla 9deaba0aa0 Use soap clients method to load root CAs 2018-06-08 12:00:11 +01:00
Maria Ntalla 64bc96baf9 Setup test for verifying by checking certificate fingerprints 2018-06-08 12:00:11 +01:00
Maria Ntalla 7ade8261f6 Pass through CA cert file to the connection when multiple vcenters are configured 2018-06-08 12:00:11 +01:00
Maria Ntalla b83028325c Introduce thumbprints per vcenter 2018-06-08 12:00:11 +01:00
Maria Ntalla 795e4c4254 Add godocs for fixtures
... and rename `InvalidCaCertPath` to `InvalidCertPath`.
2018-06-08 12:00:11 +01:00
Maria Ntalla 0cbe25436d Resolve paths of test fixtures at runtime
This will help with bazel tests, which seem to use a different working
directory from local test runs.
2018-06-08 12:00:11 +01:00
Maria Ntalla 90012e513a Fix spelling 2018-06-08 12:00:11 +01:00
Maria Ntalla f7e9b6a474 Add LICENCE header to createCerts.sh
Also remove comments that are not useful anymore.
2018-06-08 12:00:11 +01:00
Maria Ntalla b85d760011 Improve godocs and testcase naming 2018-06-08 12:00:11 +01:00
Maria Ntalla 64f13c265c Add LICENSE header 2018-06-08 12:00:11 +01:00
Maria Ntalla b3a1750afe Make bazel happy
./hack/update-bazel.sh
2018-06-08 12:00:11 +01:00
Maria Ntalla 9fc231e5c0 Setup TLS with CA Cert
- Extend config to take a path to a CA Certificate
- Use the CA Cert when establishing a connection with the SOAP client

Testing
We provide certs and keys for tests as fixtures, `vclib/fixtures`.
Those were created (and can be regenerated) using `vclib/fixtures/createCerts.sh`.

At the moment it's possible to configure a CA path and at the same time allow insecure
communication between vsphere cloud provider and vcenter. This may
change in the future; we might opt for overwriting the insecure
communication if a CA is configured / log and transparently pass the
arguments to the vcenter command / other. To be discussed.

At the moment the CA is a global level configuration. In other
words, all vcenter servers need to use certificates signed by the same
CA. There might be use cases for different CA per vcenter server; to be
discussed.
2018-06-08 12:00:11 +01:00
Kubernetes Submit Queue b4c206bd4a
Merge pull request #62297 from verult/gce-disks-refactor
Automatic merge from submit-queue (batch tested with PRs 63386, 64624, 62297, 64847). 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>.

Refactoring GCE Disk APIs to use generated client

**What this PR does / why we need it**: Improves maintainability and testing of GCE disks code.

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

Note that `gen.go` and `gen_test.go` are generated files.

I'm planning to do a more extensive refactor that takes advantage of the generated cloud provider mocks, but that'll be in a separate PR and will be a larger change.

/cc @davidz627
/assign @saad-ali 
/release-note-none
/sig storage
2018-06-06 19:56:29 -07:00
andyzhangx f533e378ec specify external resource group in ResizeDisk
fix issue
2018-06-06 05:39:53 +00:00
Kubernetes Submit Queue 81b5db9dcd
Merge pull request #64727 from yguo0905/tpu-v1-api
Automatic merge from submit-queue (batch tested with PRs 64009, 64780, 64354, 64727, 63650). 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: Update cloud provider to use TPU v1 API

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

**Special notes for your reviewer**:

**Release note**:

```release-note
GCE: Update cloud provider to use TPU v1 API
```

/assign @vishh 
/assign @cheftako
2018-06-05 22:24:51 -07:00
andyzhangx e6fdcb4af3 add external resource group support for azure disk
fix naming issue

fix comments
2018-06-06 05:19:32 +00:00
Cheng Xing 47f7672e2e Generated code for gce_disks refactor 2018-06-05 16:37:28 -07:00
Cheng Xing d33c1e3ba8 Refactored disk cloudprovider methods to use generated client; Refactored gce_disks unit tests; Removed unused gce_op.go and associated unit tests. 2018-06-05 16:37:18 -07:00