Commit Graph

1537 Commits (13b12e89408869c5b560a81e95bca33267bdb8e1)

Author SHA1 Message Date
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
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
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
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
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
Bowei Du 301488b235 Expose all GCE cloud proivder services versions, not just the GA API 2017-12-22 11:24:10 -08:00