Commit Graph

2163 Commits (b43cd7307dfe81476795bbaecc409238d9bf1669)

Author SHA1 Message Date
Brendan Burns b23bdf787f Add more tests. 2018-01-29 20:50:36 +00:00
zhangmingld 5a5f7fc42c use info instead of infof when no format 2018-01-29 14:37:08 +08:00
Kubernetes Submit Queue 0726f8c726
Merge pull request #58798 from feiskyer/cleanup
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>.

Clean up unused functions and consts

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

Clean up unused functions and consts.

**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-01-28 20:52:42 -08:00
Minhan Xia eeae81619b fix url parsing for staging/dev endpoint 2018-01-26 11:27:57 -08:00
Pengfei Ni 6c2c5c2614 Clean up unused functions and consts 2018-01-26 17:05:56 +08:00
WanLinghao 70ef581ecc fix some log param error
modified:   pkg/cloudprovider/providers/vsphere/vsphere_util.go
	modified:   pkg/controller/certificates/cleaner/cleaner.go
	modified:   pkg/controller/volume/pvcprotection/pvc_protection_controller.go
	modified:   pkg/volume/azure_dd/azure_mounter.go
2018-01-26 12:16:00 +08:00
jianglingxia 0e1972a82e Add UT test to openstack_test.go 2018-01-25 16:25:35 +08:00
Kubernetes Submit Queue 876292f9ee
Merge pull request #58368 from MrHohn/gce-externalLB-update-host
Automatic merge from submit-queue (batch tested with PRs 58661, 58764, 58368, 58739, 58773). 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 cloud provider] Ensure hosts are updated in EnsureLoadBalancer()

**What this PR does / why we need it**:
From https://github.com/kubernetes/kubernetes/issues/56527, the `EnsureLoadBalancer()` implementation in GCE external LB doesn't always update the hosts (nodes). This PR makes it to do so.

Previously, the only situation where `ensureExternalLoadBalancer()` will not update hosts is when hosts are updated but there is no other changes that trigger target pool update (for which we delete&recreate target pool and hence updates the hosts). So the main change here is detecting that condition and call `updateTargetPool()`.

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

**Special notes for your reviewer**:
Turned out it could be a small change, so I gave it a try.
/assign @nicksardo @bowei 

**Release note**:

```release-note
NONE
```
2018-01-24 16:38:39 -08:00
Kubernetes Submit Queue f53c26a7fb
Merge pull request #58661 from brendandburns/ut2
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 some more azure unit tests.

moar coverage!
2018-01-24 15:52:04 -08:00
Andrew Garrett 20a682b643 Tag Security Group created for AWS ELB with same additional tags as ELB
Reuse the
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags
annotation for these tags.

We think that this is a simpler and less intrusive approach than adding
a new annotation, and most users will want the same set of tags applied.

Signed-off-by: Brett Kochendorfer <brett.kochendorfer@gmail.com>
2018-01-24 20:16:45 +00:00
Brendan Burns f28db5a897 Add some more azure unit tests. 2018-01-23 21:46:38 +00:00
Doug MacEachern 2c640f7d0b vclib: update bazel 2018-01-23 12:25:51 -08:00
Doug MacEachern bfc283f052 vclib: add VirtualMachine tests 2018-01-23 12:25:23 -08:00
Doug MacEachern 0d7c50dd69 vclib: add Folder tests 2018-01-23 12:25:23 -08:00
Doug MacEachern 76f768b397 vclib: add Datastore tests 2018-01-23 12:25:23 -08:00
Doug MacEachern 48f989092d vclib: add test constants for use with vcsim 2018-01-23 12:25:23 -08:00
Kubernetes Submit Queue 7652c252d4
Merge pull request #58674 from bowei/cp-expose
Automatic merge from submit-queue (batch tested with PRs 58697, 58658, 58676, 58674). 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>.

Expose the generate stub for compute API

This allows clients such as Ingress to begin migration to the newly
generated stubs.

```release-note
NONE
```
2018-01-23 10:27:41 -08:00
Kubernetes Submit Queue dc1843ebe4
Merge pull request #58676 from feiskyer/fix-58675
Automatic merge from submit-queue (batch tested with PRs 58697, 58658, 58676, 58674). 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 possible panic when getting Azure primary IPConfig

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

kube-controller-manager panic when removing a lot of nodes from kubernetes cluster (see #58675). 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-23 10:27:38 -08:00
Tomas Smetana 11081acd86 Openstack: Fill size attribute for the V3 API volumes
The getVolume method in OpenStack provider is not
filling the Size for the V3 API type volumes. This
breaks the PV resizing of Cinder volumes.
2018-01-23 13:10:17 +01:00
Kubernetes Submit Queue 5edcb692df
Merge pull request #58667 from feiskyer/fmt
Automatic merge from submit-queue (batch tested with PRs 58590, 58667). 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 logs message formating

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

Fix logs message formating.

**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-01-23 01:14:28 -08:00
Pengfei Ni c0e6296377 Fix possible panic when getting primary IPConfig 2018-01-23 16:57:45 +08:00
Pengfei Ni 5d14ab37af Reduce verbose logs 2018-01-23 16:51:44 +08:00
Bowei Du 2514774707 Expose the generate stub for compute API
This allows clients such as Ingress to begin migration to the newly
generated stubs.
2018-01-23 00:21:42 -08:00
Kubernetes Submit Queue 6afa03fcb8
Merge pull request #58134 from brendandburns/ut
Automatic merge from submit-queue (batch tested with PRs 57867, 58490, 58502, 58134). 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 additional unit tests for Azure cloud provider.

@feiskyer @andyzhangx @khenidak
2018-01-23 00:06:34 -08:00
Kubernetes Submit Queue 998490d4b8
Merge pull request #58502 from dixudx/register_openstack_hostname
Automatic merge from submit-queue (batch tested with PRs 57867, 58490, 58502, 58134). 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: register metadata.hostname as node name

**What this PR does / why we need it**:
Currently Openstack can boot up instances with the name like `xyz/abc`, which is not a valid kubelet node name. While `hostname` retrieved from `meta_data.json` has already been sanitized 
 by Openstack to valid DNS-1123 format string. It's safe to register this `metadata.hostname` as valid kubelet node name.

/kind bug
/sig openstack

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

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

**Release note**:

```release-note
Openstack: register metadata.hostname as node name
```
2018-01-23 00:06:31 -08:00
Kubernetes Submit Queue 8a05e2d7d4
Merge pull request #58490 from bowei/cp-neg
Automatic merge from submit-queue (batch tested with PRs 57867, 58490, 58502, 58134). 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: neg to use generated code

GCE: neg to use generated code

```release-note
NONE
```
2018-01-23 00:06:28 -08:00
Kubernetes Submit Queue bd269d7a18
Merge pull request #58506 from bowei/cp-instances
Automatic merge from submit-queue (batch tested with PRs 58412, 56132, 58506, 58542, 58394). 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 Instances to use generated code

```release-note
NONE
```
2018-01-22 22:57:41 -08:00
Pengfei Ni d6c9b49bdc Fix logs message formating 2018-01-23 14:38:20 +08:00
FengyunPan 2520d4be44 Fix non-interface type ErrResourceNotFound on left
Related to #58145
The gophercloud.ErrResourceNotFound is not a interface, so should
use reflect to get its type then do a check.
2018-01-23 13:24:17 +08:00
Kubernetes Submit Queue f7fa53e691
Merge pull request #58499 from FengyunPan/remove-OldSecurityGroupName
Automatic merge from submit-queue (batch tested with PRs 58547, 57228, 58528, 58499, 58618). 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 getOldSecurityGroupName() from OpenStack cloud provider

Related to #53764
The getOldSecurityGroupName() is used to get the old security
group name, we can remove it now.

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

**Release note**:
```release-note
NONE
```
2018-01-22 20:49:38 -08:00
Brendan Burns 1217395b5a Add additional unit tests. 2018-01-23 04:37:31 +00:00
Bowei Du 02e52da702 Update Instances to use generated code
Update LoadBalancer to use generated code
2018-01-22 16:59:51 -08:00
Bowei Du 7ebc34fea9 Remove op field as it is no longer needed
Key is used instead
2018-01-20 09:44:52 -08:00
Bowei Du 76c796ffa4 GCE: invalid location was used in regional and zonal operations
Location was set to the full URL instead of the short name. Adds
logging to the operations to make future issues easier to debug.
2018-01-20 00:50:22 -08:00
Kubernetes Submit Queue b7b5bbb20f
Merge pull request #58556 from bowei/cp-logging
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 copious logging to the GCE calls

Add copious logging to the GCE calls
```release-note
NONE
```
2018-01-19 21:31:26 -08:00
Bowei Du 6cd1eda2d2 Update NEG to use generated code 2018-01-19 20:03:23 -08:00
Kubernetes Submit Queue 35840bf71e
Merge pull request #58300 from dims/specify-auth-info-as-environment-variables
Automatic merge from submit-queue (batch tested with PRs 58300, 58530, 57942, 58543). 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 specify OS_* variables for OpenStack configuration

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

When we convert the OpenStack cloud provider to run in an external
process, we should be able to use kubernetes Secrets capability to
inject the OS_* variables. This way we can specify the cloud
configuration as a configmap, specify secrets for the userid/password
information. The configmap can be mounted as a file. the secrets can
be made available as environment variables. the external controller
itself can run as a pod/daemonset.

For backward compat, we preload all the OS_* variables, if anything
is in the config file, then that overrides the environment variables.


**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
Authentication information for OpenStack cloud provider can now be specified as environment variables
```
2018-01-19 20:00:31 -08:00
Bowei Du 31be3a37f8 Fixes some typos/spaces in the GCE cloudprovider 2018-01-19 18:13:45 -08:00
Bowei Du f8776f8f0c Resulting generated code 2018-01-19 18:13:42 -08:00
Bowei Du 3ea2f3e9f2 Add logging in all generated GCE calls 2018-01-19 18:13:38 -08:00
Bowei Du aaa3dfd695 GCE: Check that the key is valid for each call 2018-01-19 12:03:43 -08:00
Bowei Du a2b222c94e GCE: Fix Valid() to check for proper region/zone names 2018-01-19 12:03:39 -08:00
Kubernetes Submit Queue 47b89aaf8f
Merge pull request #58493 from bowei/cp-firewall
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>.

GCE: firewall

GCE: firewalls to use generated code

```release-note
NONE
```
2018-01-19 10:35:20 -08:00
Kubernetes Submit Queue a8a418b0ae
Merge pull request #58504 from bowei/cp-targetpool
Automatic merge from submit-queue (batch tested with PRs 58053, 58504). 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 TargetPool to use generated code

```release-note
NONE
```
2018-01-19 05:11:27 -08:00
Kubernetes Submit Queue 49c729eef4
Merge pull request #58501 from bowei/cp-zones
Automatic merge from submit-queue (batch tested with PRs 56948, 58365, 58501). 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 Zones to use generated code

Update Zones to use generated code
```release-note
NONE
```
2018-01-19 01:12:33 -08:00
Kubernetes Submit Queue 6b57037432
Merge pull request #58489 from bowei/cp-routes
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>.

GCE: Change routes to use the generated code

GCE: Change routes to use the generated code

```release-note
NONE
```
2018-01-18 23:49:37 -08:00
Bowei Du 87355e4aed Update TargetPool to use generated code 2018-01-18 23:10:39 -08:00
Kubernetes Submit Queue e5216fe1ed
Merge pull request #58436 from bowei/cp-ingress
Automatic merge from submit-queue (batch tested with PRs 57908, 58436). 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>.

Updates UrlMap, BackendService, Healthcheck, Certs, InstanceGroup to use the generated code

Updates UrlMap, BackendService, Healthcheck, Certs, InstanceGroup to use the generated code

```release-note
NONE
```
2018-01-18 23:03:30 -08:00
Di Xu eaac0f5489 Openstack: register metadata.hostname as node name 2018-01-19 15:01:45 +08:00
Bowei Du 20bace876b Update Zones to use generated code 2018-01-18 22:15:58 -08:00
Bowei Du b239257a83 Update bazel 2018-01-18 22:06:34 -08:00
Kubernetes Submit Queue e056dde7ea
Merge pull request #58491 from bowei/cp-forwarding
Automatic merge from submit-queue (batch tested with PRs 58104, 58492, 58491). 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: forwarding rules to use generated code

GCE: forwarding rules to use generated code

```release-note
NONE
```
2018-01-18 21:57:34 -08:00
Kubernetes Submit Queue 165d1f6e6f
Merge pull request #58492 from bowei/cp-address
Automatic merge from submit-queue (batch tested with PRs 58104, 58492, 58491). 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: addresses to use generated code

GCE: addresses to use generated code

```release-note
NONE
```
2018-01-18 21:57:32 -08:00
Bowei Du f249968df6 Update Routes to use generated code 2018-01-18 21:39:33 -08:00
FengyunPan 5613dec9cf Remove getOldSecurityGroupName() from OpenStack cloud provider
Related to #53764
The getOldSecurityGroupName() is used to get the old security
group name, we can remove it now.
2018-01-19 11:14:25 +08:00
Kubernetes Submit Queue 5d8a2b9e0f
Merge pull request #57258 from vmware/multi-vc-e2e-test
Automatic merge from submit-queue (batch tested with PRs 55918, 57258). 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 multi-vc configuration for e2e tests

**What this PR does / why we need it**:
Currently, we accept configuration for only single VC in e2e tests. This PR adds support for multiple VC configuration for e2e tests.

**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/vmware/kubernetes/issues/412

**Special notes for your reviewer**:
Internally reviewed here: https://github.com/vmware/kubernetes/pull/418

**Release note**:

```release-note
NONE
```
// cc @divyenpatel @shaominchen
2018-01-18 18:04:33 -08:00
Bowei Du 8de8a6d8f2 Remove ignoring of object not found on deletion
This is all handled properly at the caller sites
2018-01-18 17:48:01 -08:00
Bowei Du 9710da8be5 Fix reference to Items in internal load balancer 2018-01-18 17:44:30 -08:00
Bowei Du 0fbfc23b26 Update bazel 2018-01-18 17:34:21 -08:00
Bowei Du 81725cab34 Update Forwarding rules to use generated code 2018-01-18 17:34:15 -08:00
Bowei Du c9cfea68ad Update bazel 2018-01-18 17:32:25 -08:00
Bowei Du e4e7c0a215 Update Firewall to use generated code 2018-01-18 17:31:42 -08:00
Kubernetes Submit Queue c1f2da78ac
Merge pull request #55918 from dougm/vcp-vcsim
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 vSphere Cloud Provider simulator based tests

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

Initial set of vSphere Cloud Provider functional tests against the vCenter simulator, provides test coverage without having to run against a real vCenter instance.

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

The vsphere simulator recently moved from vmware/vic to govmomi, I had discussed the idea of introducing it for testing with vSphere Cloud Provider maintainers.  These tests provide 90%+ coverage for vclib/datacenter.go, but we can expand further of course.

**Release note**:

```release-note
NONE
```
2018-01-18 17:31:04 -08:00
Bowei Du 5ac26ac46f Update bazel builds 2018-01-18 17:25:14 -08:00
Zihong Zheng 687e593601 [GCE cloud provider] external lb - move target pool operation into
its own function
2018-01-18 17:24:18 -08:00
Zihong Zheng 1c7d9e152f [GCE cloud provider] Update hosts in EnsureLoadBalancer() 2018-01-18 17:24:18 -08:00
Bowei Du 67c34edbb3 Update TargetProxy to use generated code 2018-01-18 17:22:34 -08:00
Bowei Du 2556e01142 Update InstanceGroup to use generated code 2018-01-18 17:21:55 -08:00
Bowei Du 271935d7d9 Update Certs to use generated code 2018-01-18 17:21:55 -08:00
Bowei Du f83c5379dc Update Healthcheck to use generated code 2018-01-18 17:21:55 -08:00
Bowei Du 48ad2eed8e Update BackendService to use generated code 2018-01-18 17:21:55 -08:00
Bowei Du fa3e0af5ac Update UrlMap to use generated code 2018-01-18 17:21:55 -08:00
Bowei Du 93bb60e07f Update Addresses to use generated code 2018-01-18 17:20:54 -08:00
Kubernetes Submit Queue fa094e6672
Merge pull request #58435 from bowei/cp-gen-method-pages
Automatic merge from submit-queue (batch tested with PRs 58422, 58229, 58421, 58435, 58475). 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 handling for method that use Pages() to retrieve results

- Add handling for method that use Pages() to retrieve results
- Make functions take in *Key rather than value type.

```release-note
NONE
```
2018-01-18 16:36:41 -08:00
Kubernetes Submit Queue 10334c9575
Merge pull request #58422 from MrHohn/gce-call-ext-lb
Automatic merge from submit-queue (batch tested with PRs 58422, 58229, 58421, 58435, 58475). 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 gce call to use wrapper in gce_loadbalancer_external

**What this PR does / why we need it**:
Ack https://github.com/kubernetes/kubernetes/pull/58368#discussion_r162139441, replacing some direct compute api calls to use wrapper.

**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 @nicksardo 

**Release note**:

```release-note
NONE
```
2018-01-18 16:36:32 -08:00
Balu Dontu 4683a9471f Add multi-vc configuration for e2e tests 2018-01-18 15:29:27 -08:00
Bowei Du d3a1b4b255 Update code for GCE cloud provider 2018-01-18 13:33:34 -08:00
Bowei Du 447823b4a1 Add handling for method that use Pages() to retrieve results
Make functions take in *Key rather than value type.
2018-01-18 13:33:34 -08:00
Kubernetes Submit Queue 40b0c5516a
Merge pull request #56258 from databus23/patch-1
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>.

openstack: remove orphaned routes from terminated instances

**What this PR does / why we need it**:
At the moment the openstack cloudprovider only returns routes where the `NextHop` address points to an existing openstack instance. This is a problem when an instance is terminated before the corresponding node is removed from k8s. The existing route is not returned by the cloudprovider anymore and therefore never considered for deletion by the route controller. When the route's `DestinationCIDR` is reassigned to a new node the router ends up with two routes pointing to a different `NextHop` leading to broken networking.

This PR removes skipping routes pointing to unknown next hops when listing routes. This should cause [this conditional](93dc3763b0/pkg/controller/route/route_controller.go (L208)) in the route controller to succeed and have the route removed if the route controller [feels responsible](93dc3763b0/pkg/controller/route/route_controller.go (L206)).

```release-note
OpenStack cloudprovider: Ensure orphaned routes are removed.
```
2018-01-18 06:53:15 -08:00
Davanum Srinivas f8aef8b911 Ability to specify OS_* variables for OpenStack configuration
When we convert the OpenStack cloud provider to run in an external
process, we should be able to use kubernetes Secrets capability to
inject the OS_* variables. This way we can specify the cloud
configuration as a configmap, specify secrets for the userid/password
information. The configmap can be mounted as a file. the secrets can
be made available as environment variables. the external controller
itself can run as a pod/daemonset.

For backward compat, we preload all the OS_* variables, if anything
is in the config file, then that overrides the environment variables.
2018-01-18 09:52:35 -05:00
Kubernetes Submit Queue 44d0ba29d3
Merge pull request #56960 from islinwb/remove_unused_code_ut_pkg
Automatic merge from submit-queue (batch tested with PRs 53631, 56960). 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 unused code in UT files in pkg/

**What this PR does / why we need it**:
Remove unused code in UT files in pkg/ .

**Release note**:

```release-note
NONE
```
2018-01-18 02:41:29 -08:00
Zihong Zheng 5b97e1b375 Update gce call to use wrapper in gce_loadbalancer_external 2018-01-17 18:22:09 -08:00
Huamin Chen a8f7404a13 azure disk: if the disk is not found, immediately detach it. This prevents azure keeps the bad request and stops issuing new request
Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-01-16 16:43:10 +00:00
hzxuzhonghu d77d20dd54 fix azure TestGetInstanceIDByNodeName data race 2018-01-16 17:01:48 +08:00
Kubernetes Submit Queue bc361fae40
Merge pull request #58276 from feiskyer/vmss-name
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>.

Convert ComputerName to lower case

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

When instances count is greater than 10, azure will generate instance hostname with upper cases. But kubelet always converts hostname to lower case.

So azure cloud provider should also covert OsProfile.ComputerName to lower case.

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

**Special notes for your reviewer**:

This PR also adds more unit tests for scale sets.

**Release note**:

```release-note
NONE
```
2018-01-15 22:27:41 -08:00
Kubernetes Submit Queue 62e33e0e2b
Merge pull request #58304 from dims/better-log-level-for-claiming-support-for-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>.

Log message at a better level

**What this PR does / why we need it**:
We don't really need to log this meessage at level 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
NONE
```
2018-01-15 19:03:49 -08:00
Pengfei Ni 2e646b0e12 Add more unit tests 2018-01-16 10:08:14 +08:00
Pengfei Ni 66b023110f Fix azure fake clients: use pointers 2018-01-16 10:08:14 +08:00
Pengfei Ni 79da10fb90 Rename filenames for clear 2018-01-16 10:06:03 +08:00
Pengfei Ni ef93e0f426 Convert nodeName to lower case for vmss instances
This is because Kubelet always converts hostname to lower case.
2018-01-16 10:06:03 +08:00
Kubernetes Submit Queue 638822fd0f
Merge pull request #58241 from huzhengchuan/bug/easy-bug-10
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 typeos in cloud-controller-manager

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

**Release note**:

```
NONE
```
2018-01-15 13:06:24 -08:00
Davanum Srinivas aeb7428c89 Log message at a better level
We don't really need to log this meessage at level 1.
2018-01-15 15:06:47 -05:00
Kubernetes Submit Queue 590d9fcdf1
Merge pull request #58204 from cosmincojocar/monitoring_wrapped_azure_clients
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>.

Instrument the Azure API calls for Prometheus monitoring

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

Instruments the Azure API calls for Prometheus monitoring.

**Special notes for your reviewer**:

This is version 2 based on the wrapped clients.

**Release note**:

```release-note
Instrument the Azure cloud provider for Prometheus monitoring.
```

cc @feiskyer @andyzhangx @jdumars @khenidak
2018-01-15 06:37:24 -08:00
Cosmin Cojocar 32520e0985 Review fixes 2018-01-15 13:32:42 +01:00
Cosmin Cojocar 24762b9f43 Extend the ListNextResults methods with the resource group and instrument them 2018-01-15 10:02:00 +01:00
Kubernetes Submit Queue a698bc73eb
Merge pull request #58230 from vmware/deprecateVMUUIDK8S
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 vmUUID check in VSphere cloud provider

This PR addresses issue mentioned in https://github.com/vmware/kubernetes/issues/419.

The fix is to remove the check for vvmUUID in entirety from 1.9 branch - https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/vsphere/vsphere.go#L378 as it is not longer needed. The NodeInfo object by default provides this information.

This fix will this enable:
- Enable e2e test cases to be executed locally on development envt. (Mac in particular)
- Remove unnecessary vmUUID code in 1.9 branch.

@prashima @divyenpatel
2018-01-15 00:46:36 -08:00
linweibin fa8afc1d39 Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
zhengchuan hu 22592c8cda fix typeos in cloud-controller-manager 2018-01-13 23:00:03 +08:00
Kubernetes Submit Queue 2b764d7b62
Merge pull request #58208 from FengyunPan/fix-autoprobe-subnet
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 lbaas.opts.SubnetId should be set by subnet id.

Fix #58145
The getSubnetIDForLB() should return subnet id rather than net id.

**Release note**:
```release-note
NONE
```
2018-01-13 00:36:23 -08:00
Kubernetes Submit Queue 75e50a3779
Merge pull request #58113 from bowei/cloud
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 `cloud` for the generated GCE interfaces, support structs

Note: this does not wire the generated code.

```release-note
NONE
```
2018-01-12 19:03:00 -08:00
Balu Dontu 63826000c5 Remove vmUUID check in VSphere cloud provider 2018-01-12 16:40:08 -08:00
FengyunPan 9958389eb9 The lbaas.opts.SubnetId should be set by subnet id.
Fix #58145
The getSubnetIDForLB() should return subnet id rather than net id.
2018-01-12 18:59:53 +08:00
Cosmin Cojocar 50444800b1 Instrument the Azure API calls for Prometheus monitoring 2018-01-12 11:10:40 +01:00
Kubernetes Submit Queue 091794c087
Merge pull request #58046 from feiskyer/azure-client
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>.

Wrap azure client calls

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

This is a clean up for azure client calls. It adds wrappers over azure clients and moves verbose logs and rate limiter inside.

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

/cc @cosmincojocar  @andyzhangx
2018-01-11 05:10:39 -08:00
Kubernetes Submit Queue 53a8ac753b
Merge pull request #56846 from zetaab/fixvolumeattached
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 cinder detach problems

**What this PR does / why we need it**: We have currently huge problems in cinder volume detach. This PR tries to fix these issues.

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

**Special notes for your reviewer**: 
**Release note**:

```release-note
openstack cinder detach problem is fixed if nova is shutdowned
```
2018-01-11 04:24:09 -08:00
Bowei Du ac48b1b075 Add `cloud` for the generated GCE interfaces, support structs
Note: this does not wire the generated code.
2018-01-10 15:10:21 -08:00
Kubernetes Submit Queue 8c22277f4c
Merge pull request #57861 from nicksardo/existing-sub
Automatic merge from submit-queue (batch tested with PRs 54230, 58100, 57861, 54752). 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: Use existing subnetwork of ILB forwarding rule

Fixes #57860

**Test Cases**:
Clusters using auto network with existence of a manual subnet in same region.
- [x] Upgrade 1.7 cluster with existing ILBs to latest. Confirm existing ILBs still are synced.
  Version 1.7 does not attempt to fill in the subnetwork, so the forwarding rule was created with the correct subnetwork. 
- [x] Upgrade 1.8 cluster with existing ILBs to latest. Confirm existing ILBs (using wrong subnet) still are synced. 
- [x]  Latest version creates ILBs using the correct subnet.


Clusters with manual subnets have always and will continue to use the subnet specified in gce.conf.
- [x] Upgrade 1.8 cluster with existing ILBs to latest. Confirm existing ILBs (using manual subnet) still are synced. 


Clusters with legacy networks have always and will continue to use an empty subnet. 
- [x] Upgrade 1.8 cluster with existing ILBs to latest. Confirm existing ILBs (using legacy network) still are synced. 


**Release note**:
```release-note
GCE: Allows existing internal load balancers to continue using an outdated subnetwork 
```
2018-01-10 13:29:36 -08:00
Jesse Haka 4e1b5c6a32 move detach out of os volumes attach
add test

add test

fix bazel

fix tests

change loglevel, remove else statement
2018-01-10 19:09:32 +02:00
Pengfei Ni c3a885353b Add azClientConfig to pass all essential information to create clients 2018-01-10 17:19:35 +08:00
Bowei Du 3cde2613ff Fix lint and bazel 2018-01-09 23:09:08 -08:00
Pengfei Ni 2423e7c52b Clean up azure rateLimiter and verbose logs 2018-01-10 14:02:08 +08:00
Pengfei Ni d2d48cddf8 Add wrappers for azure clients 2018-01-10 14:01:47 +08:00
Bowei Du 8cdfe36267 Update generated code to stable order 2018-01-09 17:10:05 -08:00
Bowei Du 5abf80718e Remove glog dependency in the generator 2018-01-09 16:57:15 -08:00
Bowei Du c3e23b1b14 Fix gofmt 2018-01-09 16:40:15 -08:00
Bowei Du 2aaf8b47b2 Clean up documentation. 2018-01-09 16:40:15 -08:00
Bowei Du 9a70885559 BUILD 2018-01-09 16:40:15 -08:00
Bowei Du f076f4fa0b Hand written unit test for exercising the mock 2018-01-09 16:40:15 -08:00
Bowei Du a0adc1bb19 Special custom code for handling the Projects resource 2018-01-09 16:40:15 -08:00
Bowei Du e230bd967b Generated code (see gen/main.go for the source) 2018-01-09 16:40:14 -08:00
Bowei Du 329e0b1cb5 support interfaces for the generated code 2018-01-09 16:40:14 -08:00
Bowei Du 968cce929c code generation 2018-01-09 16:40:14 -08:00
Bowei Du 75bff35884 long running operation support 2018-01-09 16:40:14 -08:00
Bowei Du 8250950d15 documentation 2018-01-09 16:40:14 -08:00
Bowei Du 94ddfd17e7 Implementation of the compute "filter" handling for List() 2018-01-09 16:40:14 -08:00
Bowei Du b19149406e "meta" type descriptions used for code generation 2018-01-09 16:40:14 -08:00
Bowei Du 6894e3d32b Support utilities 2018-01-09 16:40:14 -08:00
Kubernetes Submit Queue d40cd36513
Merge pull request #57978 from vmware/fix-vsphere-connection
Automatic merge from submit-queue (batch tested with PRs 57511, 57978). 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>.

Renews cached NodeInfo with new vSphere connection

**What this PR does / why we need it**:
This PR modifies two public functions of nodemanager.go- GetNodeInfo and GetNodeDetails. For both these functions NodeInfo object is renewed with new GoVmomiClient and new vclib VirtualMachine and Datacenter.

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

**Special notes for your reviewer**:
Code has been structured to minimize impact on existing 1.9 release code and any side-effects due to NodeInfo modification. This is a quick solution for vSphere connection renewal  problem. A more enhanced solution is target for upcoming major release.

Testing:

- [x] Successfully tried out pod creation, deletion with dynamic volume.
- [x] Successfully ran e2e tests.
 

**Release note**:
```release-note
Fixes authentication problem faced during various vSphere operations.
```
2018-01-09 15:19:32 -08:00
Kubernetes Submit Queue eff07b6f55
Merge pull request #56759 from aledbf/fix-nlb-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>.

Fix NLB icmp permission duplication

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

Fixes an issue with the ICMP rule for MTU during the creation of a NLB

**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 #56703
2018-01-09 12:20:29 -08:00
Kubernetes Submit Queue 0820d4c3d0
Merge pull request #57991 from karataliu/azure_lb_exists
Automatic merge from submit-queue (batch tested with PRs 57991, 57789). 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 exists status for azure GetLoadBalancer

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

We see a lot of log indicating load balancer not found in azure:
```
E0109 07:00:31.126306       1 service_controller.go:776] Failed to process service kube-system/heapster. Retrying in 5m0s: error getting LB for service kube-system/heapster: Service(kube-system/heapster) - Loadbalancer not found
I0109 07:00:31.126384       1 event.go:218] Event(v1.ObjectReference{Kind:"Service", Namespace:"kube-system", Name:"heapster", UID:"400266e7-f507-11e7-bbc2-000d3af86f66", APIVersion:"v1", ResourceVersion:"450", FieldPath:""}): type: 'Warning' reason: 'CreatingLoadBalancerFailed' Error creating load balancer (will retry): error getting LB for service kube-system/heapster: Service(kube-system/heapster) - Loadbalancer not found
I0109 07:00:31.158858       1 azure_backoff.go:177] LoadBalancerClient.List(name) - backoff: success
E0109 07:00:31.158930       1 service_controller.go:776] Failed to process service kube-system/kubernetes-dashboard. Retrying in 5m0s: error getting LB for service kube-system/kubernetes-dashboard: Service(kube-system/kubernetes-dashboard) - Loadbalancer not found
I0109 07:00:31.158988       1 event.go:218] Event(v1.ObjectReference{Kind:"Service", Namespace:"kube-system", Name:"kubernetes-dashboard", UID:"4052f12b-f507-11e7-bbc2-000d3af86f66", APIVersion:"v1", ResourceVersion:"498", FieldPath:""}): type: 'Warning' reason: 'CreatingLoadBalancerFailed' Error creating load balancer (will retry): error getting LB for service kube-system/kubernetes-dashboard: Service(kube-system/kubernetes-dashboard) - Loadbalancer not found
```

It's interesting that those service does not need loadbalancer, and caller is just checking whether one loadbalancer exists.
009701f181/pkg/controller/service/service_controller.go (L287)

And in we can see when err is not nil, it will not check exists value. Thus we should not return error when exists=false.

This was changed in:
edfb2ad552 (diff-c901394068476b4ccb003a6c6efad57cR63)

The PR removes the error when exists=false.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-01-09 07:31:31 -08:00
Dong Liu 0eb19a0040 Fix vm cache in concurrent case 2018-01-09 16:43:43 +08:00
Dong Liu e2b6b1d7eb Fix exists status for azure GetLoadBalancer 2018-01-09 15:22:54 +08:00
prashima 25b1cd4958 Renews cached NodeInfo with new vSphere connection 2018-01-08 11:09:47 -08:00
Doug MacEachern a8180d6fe0 Add vSphere Cloud Provider simulator based tests
Initial set of vcsim based tests.
2018-01-08 09:16:03 -08:00
Doug MacEachern 09da53c8e9 Update vmware/govmomi godeps 2018-01-08 09:16:03 -08:00
Jan Safranek 1a2e651a1c Add gnufied as AWS approver. 2018-01-08 14:21:24 +01:00
Kubernetes Submit Queue df080693ad
Merge pull request #57920 from feiskyer/baseuri
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>.

Do not set BaseURI twice

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

Do not set BaseURI again. BaseURI has been set by NewAccountsClientWithBaseURI and NewDisksClientWithBaseURI method.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @karataliu
2018-01-08 00:14:09 -08:00
Kubernetes Submit Queue 21a15c5673
Merge pull request #50923 from rowleyaj/typo_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 typo in comment
2018-01-07 09:03:45 -08:00
Jesse Haka bac270533e use danglingerror
add getNodeNameByID and use volume.AttachedDevice as devicepath

use uppercase functionname

do not delete automatically nodes if node is shutdowned in openstack

do not delete node

fix gofmt

fix cinder detach if instance is not in active state

fix gofmt
2018-01-07 18:50:42 +02:00
Kubernetes Submit Queue 7d39bf1469
Merge pull request #57827 from feiskyer/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>.

Ensure Azure LB removable when VMSS is enabled

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

When VMSS enabled, Azure LB not removed after all LoadBalancer services deleted.

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

**Special notes for your reviewer**:

This PR upgrades Azure GO SDK to latest release and adds a workaround to fix the problem.

**Release note**:

```release-note
NONE
```
2018-01-05 17:05:25 -08:00
Pengfei Ni a69db7104d Do not set BaseURI again
BaseURI has been set by NewAccountsClientWithBaseURI method.
2018-01-06 07:56:10 +08:00
Nick Sardo 64c20676ac Use existing subnetwork of forwarding rule 2018-01-05 10:15:33 -08:00
Kubernetes Submit Queue 1e0c0e2044
Merge pull request #57875 from feiskyer/az-interface
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 generic interface for azure clients

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

Continue of #43287. Moving remaining clients to generic interfaces.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-05 05:19:34 -08:00
Kubernetes Submit Queue 411881803f
Merge pull request #57835 from cimomo/azure-provider-fixes
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>.

Minor commenting fixes for Azure Disk Controllers from CR

**What this PR does / why we need it**:
Minor commenting fixes for Azure Disk Controllers from code review.

**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-01-04 23:38:57 -08:00
Pengfei Ni 61d6084c97 Add fake clients 2018-01-05 14:24:44 +08:00
Kubernetes Submit Queue 8b5d1f91db
Merge pull request #57777 from karataliu/azure_vm_get
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>.

Uniform Azure VM api calls

**What this PR does / why we need it**:
There is still a call to 'VirtualMachinesClient.Get' directly in azure_backoff, which does not go through the cache approach.

This PR uniforms all calls for getting azure vm to use 'getVirtualMachine'. Also refine unused 'exists' return value.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-01-04 19:54:04 -08:00
Pengfei Ni fd16e37f44 Add generic interface for Azure clients 2018-01-05 11:44:22 +08:00
Kubernetes Submit Queue b57b253594
Merge pull request #57696 from apilloud/bloat
Automatic merge from submit-queue (batch tested with PRs 57696, 57821, 56317). 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 DefaultMaxEBSVolumes constant into scheduler

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

A constant only used by the scheduler lives in the aws cloudprovider package. Moving the constant into the only package where it is used reduces import bloat. Testing with the dockerized build environment, the kube-scheduler binary went from 61748499 bytes to 47339144 bytes on amd64 with this change.

**Release note**:

```release-note
NONE
```
2018-01-04 03:22:36 -08:00
Kai Chen 083671dfa0 Minor commenting fixes for Azure Disk Controllers from CR 2018-01-04 01:29:46 -08:00
Pengfei Ni 86dc79373b Add workaround for removing VMSS reference from LB 2018-01-04 14:19:03 +08:00
Dong Liu 1836e567a9 Return actual error when backoff fails 2018-01-04 11:46:29 +08:00
Kai Chen 2a401c7ec7 Improve comments for Azure Blob Disk Controller 2018-01-03 12:34:15 -08:00
Andrew Pilloud a57d492713 Move DefaultMaxEBSVolumes constant into scheduler
A constant only used by the scheduler lives in the aws cloudprovider
package. Moving the constant into the only package where it is used
reduces import bloat.
2018-01-03 08:19:38 -08:00
Dong Liu 71d3cffd1f Remove VirtualMachineClientGetWithRetry 2018-01-03 15:16:16 +08:00
Dong Liu 1ac4be5841 Remove exists return value from getVirtualMachine 2018-01-03 15:14:20 +08:00
Dong Liu 7eafa215f5 Split auth related config for Azure 2018-01-03 10:23:26 +08:00
Kubernetes Submit Queue f918d18acb
Merge pull request #57432 from karataliu/azure_vmget_cache
Automatic merge from submit-queue (batch tested with PRs 49856, 56257, 57027, 57695, 57432). 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 cache for VirtualMachinesClient.Get in azure cloud provider

**What this PR does / why we need it**:
Add a timed cache for 'VirtualMachinesClient.Get'

Currently cloud provider will send several get calls to same URL in short period, which is not necessary.

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

**Special notes for your reviewer**:

**Release note**:
NONE
2018-01-02 13:15:52 -08:00
Kubernetes Submit Queue ff9b21192f
Merge pull request #57695 from feiskyer/vmss
Automatic merge from submit-queue (batch tested with PRs 49856, 56257, 57027, 57695, 57432). 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 vmss listing for Azure cloud provider

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

Fix a stupid bug of vmss listing: if there is only one instance, listScaleSetsWithRetry  and listScaleSetVMsWithRetry will return empty list.

This PR also adds more verbose logs.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-02 13:15:49 -08:00
Kubernetes Submit Queue da9a4d5da9
Merge pull request #57286 from vmware/controller-mgr-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 vSphere Cloud Provider to use "vsphere-cloud-provider" to create ClientBuilder

**What this PR does / why we need it**:
vSphere cloud Provider is not using lower case naming while creating clientBuilder.
With this fix, ClientBuilder is created using lowercase naming.
With mixed upper-lower case name, controller manager is crashing.

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

**Special notes for your reviewer**:
None

**Release note**:
```release-note
This fixes controller manager crash in certain vSphere cloud provider environment.
```
2017-12-29 23:15:59 -08:00
Pengfei Ni 5805a7fefb Add more verbose logs 2017-12-29 21:08:10 +08:00
Kubernetes Submit Queue aec4d16ba4
Merge pull request #57647 from feiskyer/metadata
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 useInstanceMetadata param from Azure cloud provider

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

With out-of-tree Azure cloud provider (#50752), metadata won't work any more (kubelet won't call those metadata functions any more). 

This PR removes the parameter useInstanceMetadata from Azure 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 #57646.

**Special notes for your reviewer**:

**Release note**:

```release-note
Remove useInstanceMetadata parameter from Azure cloud provider.
```
2017-12-29 04:24:07 -08:00
Pengfei Ni 6dd9cc6dbf Fix vmss listing for Azure cloud provider 2017-12-29 11:10:09 +08:00
Kubernetes Submit Queue 746464bc16
Merge pull request #57644 from feiskyer/vmss-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>.

 Reduce VirtualMachineScaleSetsClient#List calls for Azure cloud provider

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

For master nodes not managed by VMSS, current cloud provider would updateCaches each time when finding master nodes info. This could result in call limits of `VirtualMachineScaleSetsClient#List`. 

This PR adds a caches to those nodes which reduces the cache updating significantly.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-27 19:06:06 -08:00
Nick Sardo d6ed5d3107 Use GA API for managing addresses 2017-12-27 11:27:43 -08:00
Pengfei Ni 5614b7fc61 update bazel build files 2017-12-27 16:32:32 +08:00
Pengfei Ni bb1e797b28 Remove useInstanceMetadata param from Azure cloud provider 2017-12-27 16:20:54 +08:00
Pengfei Ni 80d89e0221 Reduce VirtualMachineScaleSetsClient#List calls 2017-12-27 13:50:49 +08:00
Pengfei Ni c690ab8cd0 Fix typo of compute.VirtualMachinesClient 2017-12-27 13:40:33 +08:00
Kubernetes Submit Queue b047e8ea0d
Merge pull request #57543 from feiskyer/vmss-cache
Automatic merge from submit-queue (batch tested with PRs 57502, 57543). 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 multiple scale sets in Azure cloud provider

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

This PR adds multiple scale sets support in Azure 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)*:
Continue of #43287.

**Special notes for your reviewer**:

- Adds a local cache of basic scale sets information
- Update the cache when new nodes are not found or periodically
- Since azure doesn't support getting the scale set which contains the node, the cache is updated via listing all scale sets and their virtual machines

**Release note**:

```release-note
Support multiple scale sets in Azure cloud provider.
```

/assign @brendandburns @andyzhangx
2017-12-24 20:14:27 -08:00
Pengfei Ni c07ab68005 Support multiple scale sets in same cluster 2017-12-25 10:30:54 +08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Kubernetes Submit Queue 6937763331
Merge pull request #57351 from nicksardo/auto-sub
Automatic merge from submit-queue (batch tested with PRs 57351, 55654). 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: Get automatically created subnetwork if none is specified for auto network

Fixes #57350 

**Release note**:
```release-note
GCE: Fixes ILB creation on automatic networks with manually created subnetworks.
```
2017-12-22 23:11:36 -08:00
Micah Hausler 4fa5be320b Fix AWS NLB delete error 2017-12-22 17:10:36 -05:00
Bowei Du 301488b235 Expose all GCE cloud proivder services versions, not just the GA API 2017-12-22 11:24:10 -08:00
Dong Liu a8cdeb4681 Add cache for VirtualMachinesClient.Get in azure cloud provider 2017-12-22 17:11:30 +08:00
Pengfei Ni 11fae2186b Add fake clients for VirtualMachineScaleSetsClient and VirtualMachineScaleSetVMsClient 2017-12-22 15:10:30 +08:00
Pengfei Ni 068564a876 Add generic interface for VirtualMachineScaleSetsClient and VirtualMachineScaleSetVMsClient 2017-12-22 15:10:20 +08:00
Kubernetes Submit Queue 5001198f0e
Merge pull request #57387 from andyzhangx/add-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 Dong Liu as approver and add OWNERS in credentialprovider

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

**Special notes for your reviewer**:

**Release note**:

```
none
```

/sig azure
/assign @brendandburns
2017-12-21 22:32:56 -08:00
Kubernetes Submit Queue 02be3eb07c
Merge pull request #53557 from yolo3301/az_lb_pipid
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>.

Allow use resource ID to specify public IP address in azure_loadbalancer

**What this PR does / why we need it**: Currently the Azure load balancer assumes that a Public IP address is in the same resource group as the cluster. This is not necessarily true in all environments, in addition to accepting a Public IP, we should allow an annotation to the `Service` object that indicates what resource group the IP is present in.

**Which issue this PR fixes**: fixes #53274 #52129

**Special notes for your reviewer**: *first time golang user, please forgive the amateurness*

Release note
```release-note
Allow use resource ID to specify public IP address in azure_loadbalancer
```
2017-12-21 12:11:31 -08:00
Tomer Froumin 80cee97f0c Fixed typos and made documentation more consistent 2017-12-21 15:49:02 +02:00
Kubernetes Submit Queue 1bcf0b0a22
Merge pull request #57484 from brendandburns/azure
Automatic merge from submit-queue (batch tested with PRs 57282, 57484). 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 a bug in validating node existence.

**What this PR does / why we need it**:
Fixes an bug where if an error was returned that was not an `autorest.DetailedError` we would return `"not found", nil` which would result in Nodes going `NotReady`

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

**Release note**:
```release-note
Fixes an bug where if an error was returned that was not an `autorest.DetailedError` we would return `"not found", nil` which caused nodes to go to `NotReady` state.
```

@feiskyer @khendiak
2017-12-20 23:06:41 -08:00
Kubernetes Submit Queue f3da0d58ef
Merge pull request #57282 from stewart-yu/removeDeadCodeInCloudProvider
Automatic merge from submit-queue (batch tested with PRs 57282, 57484). 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 dead code in cloudprovider

**What this PR does / why we need it**:
Remove dead code in `cloudprovider`

**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-12-20 23:06:38 -08:00
Nick Sardo c893ce8c95 Get automatically created subnetwork if none is specified 2017-12-20 17:48:32 -08:00
Brendan Burns c0eee2950f Fix a bug in validating node existence. 2017-12-21 00:30:16 +00:00
Kubernetes Submit Queue c273ad5aa5
Merge pull request #56681 from stewart-yu/deleteWhiteSpace
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>.

Do not log trailing whitespace

**What this PR does / why we need it**:
Follow [https://github.com/kubernetes/kubernetes/pull/56409](https://github.com/kubernetes/kubernetes/pull/56409)

**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-12-20 04:22:05 -08:00
andyzhangx 8d99c55bba add Dong Liu as approver and add OWNERS in credentialprovider 2017-12-19 09:31:43 +00:00
Pengfei Ni 477def0b4d Add azure owners 2017-12-19 11:42:02 +08:00
Kubernetes Submit Queue 58ccf1e84e
Merge pull request #56406 from stewart-yu/cloudprovide-refactorfunction
Automatic merge from submit-queue (batch tested with PRs 55751, 57337, 56406, 56864, 57347). 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>.

should reuse code rather than rewrite it

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

should reuse `dc.GetDatastoreByName()`, instead of rewrite 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
NONE
```
2017-12-18 18:50:42 -08:00
Kubernetes Submit Queue 8a5fa5f74f
Merge pull request #56407 from bugosiphionah/cider_volumeresize_test
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 test for Cider ExpandVolume

Add test for Cinder Volume Resize for this [commit](270de26987).
2017-12-18 05:42:44 -08:00
Phionah Bugosi 30ab605d85 Add test for Cider ExpandVolume 2017-12-18 13:59:14 +03:00
chshou 9c83e800fb reapplied the changes after merge 2017-12-17 11:27:13 -08:00
chshou 6b8ff76500 minor fixes 2017-12-17 11:26:30 -08:00
chshou 9f26becae1 get rg inside 'ensure' methods 2017-12-17 11:26:30 -08:00
chshou 03730a3e90 delete pip by matching name and rg 2017-12-17 11:26:30 -08:00
chshou 9054137d05 annotate service with resource group 2017-12-17 11:25:07 -08:00
chshou 540baa9796 Allow use resource ID to specify public IP address in azure_loadbalancer 2017-12-17 11:24:11 -08:00
rohitjogvmw a043d45152 COntroller-manager is crashing in customer environment as vSphere Cloud Provider
is not using lower case naming while creating clientBuilder.
With this fix, ClientBuilder is created using lowercase naming.
2017-12-17 08:49:13 -08:00
Kubernetes Submit Queue adc648da59
Merge pull request #57053 from prashima/static-provisioning-fix
Automatic merge from submit-queue (batch tested with PRs 56375, 56872, 57053, 57165, 57218). 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>.

Compare correct file names for volume detach operation

**What this PR does / why we need it**:
Current volume detach code compares volume path with disk path, as it is. This PR removes '.vmdk' extension from both paths and then compares them. This makes sure that correct comparison is done irrespective of a missing '.vmdk' extension from one of the paths.

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

**Special notes for your reviewer**:
Deployed cluster on vSphere and provisioned a static volume. Verified that a statically provisioned volume gets detached even when volume path didn't contain any .vmdk extension and disk path had .vmdk extension.

**Release note**:
```vSphere cloud provider: Fix detach operation for volumes, when .vmdk extension is not specified in volume path.```
2017-12-17 05:33:43 -08:00
stewart-yu 2ab0e3217e remove unuse code in cloudprovider 2017-12-17 17:21:14 +08:00
stewart-yu 386258b07a [cloudprovider]should reuse code rather than rewrite it 2017-12-17 17:00:52 +08:00