Commit Graph

2574 Commits (ce2dfac29619818bd06afbf2893a84aa501fba0b)

Author SHA1 Message Date
Minhan Xia 232ebadc9e add beta healthcheck in gce cloud provider 2018-06-26 11:33:38 -07:00
Minhan Xia 3248fa2a89 swtich to use Beta 2018-06-26 11:33:38 -07:00
Minhan Xia 469ac167c1 regenerate GCE cloud provider 2018-06-26 11:29:55 -07:00
Kubernetes Submit Queue 3d694993d0
Merge pull request #65373 from multi-io/openstack_lbaas_node_secgroup_fix
Automatic merge from submit-queue (batch tested with PRs 65449, 65373, 49410). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

OpenStack LBaaS fix: must use ID, not name, of the node security group

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

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

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

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

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

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

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

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

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

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

Fixes #58145


**Special notes for your reviewer:**

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

**Release note**:
```release-note
NONE
```
2018-06-26 02:52:06 -07:00
Kubernetes Submit Queue 732eca80cc
Merge pull request #65156 from agau4779/remove_neg_gate
Automatic merge from submit-queue (batch tested with PRs 65156, 65448). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[GCE] move NEG out of featuregate

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes # https://github.com/kubernetes/ingress-gce/issues/274
**Release note**:
-->
```release-note
NONE
```
2018-06-25 16:07:03 -07:00
Kubernetes Submit Queue 7f23a743e8
Merge pull request #65258 from ddebroy/ddebroy-ebs1
Automatic merge from submit-queue (batch tested with PRs 65164, 65258). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Query candidate zones for EBS when zone/zones not passed

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

/sig storage

**Release note**:
```
none
```
2018-06-25 14:44:08 -07:00
Olaf Klischat 8ed735d104 BUGFIX: must use ID, not name, of the node security group when adding rules to it 2018-06-25 21:44:59 +02:00
Ashley Gau 7beefd0c9c move NEG out of featuregate 2018-06-25 09:47:39 -07:00
Hannes Hörl 7b8efe39c4 Update bazel
... after rebase
2018-06-24 17:08:40 +01:00
Hannes Hörl a536ebc580 Remove unused exported errors 2018-06-24 11:22:04 +01:00
Hannes Hörl 37e8c17041 Do not do noramlization of the fingerprint format 2018-06-24 11:07:23 +01:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Jeff Grafton a725660640 Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
Kubernetes Submit Queue b7b8e160a5
Merge pull request #64793 from MrHohn/gce-backend-service-beta-wrappers
Automatic merge from submit-queue (batch tested with PRs 61330, 64793, 64675, 65059, 65368). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[gce provider ] Wrapper for beta backend service create/update

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

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

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

**Release note**:

```release-note
NONE
```
2018-06-22 14:52:33 -07:00
Kubernetes Submit Queue 1996aa3e69
Merge pull request #65345 from nicksardo/target-proxy-set
Automatic merge from submit-queue (batch tested with PRs 65024, 65287, 65345, 64693, 64941). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Change signature of SetUrlMapForTargetHTTPProxy

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

**Release note**:
```release-note
NONE
```
2018-06-22 06:10:17 -07:00
Kubernetes Submit Queue 1b43cd1a62
Merge pull request #65292 from wgliang/master.azure-log
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Change Azure ARM Rate limiting error message

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

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

Change Azure ARM Rate limiting error message

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

**Release note**:

```release-note
Change Azure ARM Rate limiting error message.
```
2018-06-22 01:11:10 -07:00
Kubernetes Submit Queue 18b16be622
Merge pull request #65223 from jsafrane/aws-inaccessible-key
Automatic merge from submit-queue (batch tested with PRs 65187, 65206, 65223, 64752, 65238). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixed detection of inaccessible AWS encryption key.

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

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

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

**Special notes for your reviewer**:

**Release note**:

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

/sig aws
/sig storage
@kubernetes/sig-aws-misc
2018-06-21 19:48:10 -07:00
Kubernetes Submit Queue af1450df24
Merge pull request #65152 from alvaroaleman/vsphere-control-plane-on-cloud
Automatic merge from submit-queue (batch tested with PRs 65152, 65199, 65179, 64598, 65216). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

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

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

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

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

**Special notes for your reviewer**:

**Release note**:

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

/sig vmware
2018-06-21 18:20:05 -07:00
Nick Sardo e7e28c2edf Change signature of SetUrlMapForTargetProxy 2018-06-21 17:41:12 -07:00
Zihong Zheng 5d02573e56 [gce provider] Ran hack/update-cloudprovider-gce.sh 2018-06-21 11:16:30 -07:00
Zihong Zheng c516a35d4d [gce provider] Wrapper for beta backend servvice create/update 2018-06-21 11:16:30 -07:00
Kubernetes Submit Queue 0f1b6ca986
Merge pull request #65037 from prameshj/ig-naming
Automatic merge from submit-queue (batch tested with PRs 64140, 64898, 65022, 65037, 65027). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Handle empty cluster UID in instance group name

**What this PR does / why we need it**:
This PR handles an empty cluster UID when generating InstanceGroupName. The current implementation will create a name ending in "--" which is invalid.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-06-21 05:40:20 -07:00
Kubernetes Submit Queue 0765e0a6cc
Merge pull request #64957 from andyzhangx/azure-account-https
Automatic merge from submit-queue (batch tested with PRs 64895, 64938, 63700, 65050, 64957). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

set EnableHTTPSTrafficOnly in azure storage account creation

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

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

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

**Release note**:

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

/sig azure
/kind feature
/assign @khenidak
2018-06-21 04:15:20 -07:00
Guoliang Wang 6e6eaca393 Change Azure ARM Rate limiting error message 2018-06-21 12:12:15 +08:00
Kubernetes Submit Queue 3f581dc265
Merge pull request #64427 from andyzhangx/azuredisk-rg
Automatic merge from submit-queue (batch tested with PRs 65032, 63471, 64104, 64672, 64427). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add external resource group support for azure disk

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

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

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

**Release note**:

```
add external resource group support for azure disk
```
/sig azure
/assign @feiskyer @karataliu 
/cc @khenidak
2018-06-20 04:23:24 -07:00
Deep Debroy 11821e23b4 Querry candidate zones for EBS when zone/zones not passed
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-06-19 21:11:48 -07:00
Kubernetes Submit Queue 24117bb05c
Merge pull request #65237 from andrewsykim/andrew-cloud-provider-approver
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add @andrewsykim as pkg/cloudprovider approver

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

```release-note
NONE
```
2018-06-19 18:48:56 -07:00
Kubernetes Submit Queue 781f93bc31
Merge pull request #65000 from karataliu/lbdoc_rm
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move out azure_loadbalancer.md to cloud provider repository

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

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

**Special notes for your reviewer**:

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

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

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

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

At the moment the CA is a global level configuration. In other
words, all vcenter servers need to use certificates signed by the same
CA. There might be use cases for different CA per vcenter server; to be
discussed.
2018-06-08 12:00:11 +01:00
Kubernetes Submit Queue b4c206bd4a
Merge pull request #62297 from verult/gce-disks-refactor
Automatic merge from submit-queue (batch tested with PRs 63386, 64624, 62297, 64847). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactoring GCE Disk APIs to use generated client

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

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

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

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

/cc @davidz627
/assign @saad-ali 
/release-note-none
/sig storage
2018-06-06 19:56:29 -07:00
andyzhangx f533e378ec specify external resource group in ResizeDisk
fix issue
2018-06-06 05:39:53 +00:00
Kubernetes Submit Queue 81b5db9dcd
Merge pull request #64727 from yguo0905/tpu-v1-api
Automatic merge from submit-queue (batch tested with PRs 64009, 64780, 64354, 64727, 63650). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

GCE: Update cloud provider to use TPU v1 API

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

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

**Special notes for your reviewer**:

**Release note**:

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

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

fix comments
2018-06-06 05:19:32 +00:00
Cheng Xing 47f7672e2e Generated code for gce_disks refactor 2018-06-05 16:37:28 -07:00
Cheng Xing d33c1e3ba8 Refactored disk cloudprovider methods to use generated client; Refactored gce_disks unit tests; Removed unused gce_op.go and associated unit tests. 2018-06-05 16:37:18 -07:00
Kubernetes Submit Queue 2bb6fdc675
Merge pull request #63322 from verult/pv-attach-repd
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 PD plugin now prevents attaching a regional PD PV with pdName of …

…a regular PD



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

/sig storage
/sig gcp
/assign @msau42 @saad-ali
2018-06-05 13:40:39 -07:00
Kubernetes Submit Queue def5179c66
Merge pull request #64739 from feiskyer/az-nsg
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 panic while provisioning Azure security group rules

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

 kube-controller-manager panic when  provisioning Azure security group rules, especially when securityGroupName is wrong configured. This PR fixes the issue.

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

**Special notes for your reviewer**:

Should also cherry pick to release-1.10.

**Release note**:

```release-note
Fix kube-controller-manager panic while provisioning Azure security group rules
```
2018-06-05 05:11:41 -07:00
Pengfei Ni 8f52d8232b Fix panic while provisioning Azure security group rules 2018-06-05 13:41:23 +08:00
Yang Guo a7474e8059 Update dependency 2018-06-04 14:54:06 -07:00
Yang Guo 5014881054 Update GCE cloud provider to use Cloud TPU v1 API 2018-06-04 14:53:54 -07:00
andyzhangx 880b7a3bda azuredisk size grow feature
fix comments

fix comments
2018-06-03 13:55:49 +00:00
Kubernetes Submit Queue d02cf08e27
Merge pull request #64528 from MrHohn/gce-backend-service-beta
Automatic merge from submit-queue (batch tested with PRs 64364, 64369, 63819, 64528). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[gce provider] More wrappers for alpha/beta backend service

**What this PR does / why we need it**:
Sorry, some more wrapper functions I missed last time.

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

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

**Release note**:

```release-note
NONE
```
2018-05-30 22:54:15 -07:00
Kubernetes Submit Queue 887f8ecf4e
Merge pull request #64338 from agau4779/deprecate-gce-addr-fakes
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] use fakeGCECloud instead of gce address fakes

**What this PR does / why we need it**:
Use the fakeGCECloud mock instead of FakeCloudAddressService.

**Release note**:
```release-note
NONE
```
2018-05-30 20:09:15 -07:00
Kubernetes Submit Queue a1c8d3f5f3
Merge pull request #64403 from jsafrane/aws-read-only-attach
Automatic merge from submit-queue (batch tested with PRs 57082, 64325, 64016, 64443, 64403). 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 AWS EBS volumes to be attached as ReadOnly.

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

**Special notes for your reviewer**:
This follows logic e.g. in Cinder volume plugin.

**Release note**:

```release-note
AWS EBS volumes can be now used as ReadOnly in pods.
```

/sig storage
/sig aws
2018-05-30 18:49:23 -07:00
Kubernetes Submit Queue 53fd4cd46d
Merge pull request #58327 from sharmaansh/patch-2
Automatic merge from submit-queue (batch tested with PRs 58920, 58327, 60577, 49388, 62306). 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>.

Replace error string with const
2018-05-30 16:09:24 -07:00
Zihong Zheng fdc58eb891 [gce provider] More wrappers for alpha/beta backend service 2018-05-30 12:29:42 -07:00
Kubernetes Submit Queue 5aa513429b
Merge pull request #64318 from gonzolino/os-lbaas-addresses
Automatic merge from submit-queue (batch tested with PRs 64318, 64269, 64438, 64516, 64311). 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 that only IPs are used as node addresses in OpenStack LBs

**What this PR does / why we need it**:
ATM, when no InternalIP can be found for a node, the openstack cloud provider tries to create a LB with whatever is the first address it can find for the node. This could also be the hostname or a dns name.
However, LBaaS will reject anything that is not an IP address for pool members. Therefore a meaningful error should be returned instead of just returning the first address of the node, even if it is clear that this will lead to an error in LBaaS.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Provide a meaningful error message in openstack cloud provider when no valid IP address can be found for a node
```
2018-05-30 11:25:12 -07:00
Jan Safranek 8ff0fff065 Allow AWS EBS volumes to be attached as ReadOnly. 2018-05-28 16:24:19 +02:00
Nick Turner a51399714b Add myself, Micah to reviewers
Signed-off-by: Nick Turner <nic@amazon.com>
2018-05-27 23:06:06 +00:00
Justin Santa Barbara 3988331c6c Restore InstanceNotFound comment & logic
Otherwise node registration is broken on AWS.
2018-05-26 21:54:15 -07:00
Kubernetes Submit Queue 39be1048f6
Merge pull request #64343 from MrHohn/security-policy-wrapper
Automatic merge from submit-queue (batch tested with PRs 64288, 64343). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[gce provider] Add more wrappers for security policy

**What this PR does / why we need it**:
Adding more wrappers for security policy, mostly for implementing the e2e test.

**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-05-26 02:11:04 -07:00
Zihong Zheng 19d7006d6b [gce provider] Update auto-generated codes 2018-05-25 16:43:28 -07:00
Zihong Zheng 332a3e8467 [gce provider] Add more wrapper for securiti policy 2018-05-25 16:43:28 -07:00
Ashley Gau cf393d7a7b remove gce_address_fakes.go from BUILD file 2018-05-25 15:24:17 -07:00
Ashley Gau a96c5f2884 mocks must return true in order to trigger err 2018-05-25 14:33:33 -07:00
Ashley Gau 069062365a use fakeGCECloud instead of gce address fakes 2018-05-25 14:19:00 -07:00
Kubernetes Submit Queue 880dbd339b
Merge pull request #64231 from twilfong/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>.

Update function hasClusterTag to fix issue #64230

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

Fixes issue #64230, by changing function hasClusterTag, in aws/tags.go, to ensure that, when called with a list of tags containing a tag with a key which matches clusterTagKey, function will return true even if a tag with key TagNameKubernetesClusterLegacy also exists in the list with a value other than the ClusterID.

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

**Special notes for your reviewer**:
Notes are in issue

**Release note**:
```release-note
NONE
```
2018-05-25 09:01:00 -07:00
Daniel Gonzalez 7b5f3a1dc5 Ensure that only IPs are used as node addresses in OpenStack LBs 2018-05-25 16:34:31 +02:00
Kubernetes Submit Queue 696430dd51
Merge pull request #64248 from feiskyer/exact-err-msg
Automatic merge from submit-queue (batch tested with PRs 63319, 64248, 64250, 63890, 64233). 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 reason message logs for non-exist Azure resources

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

In azure_wrap.go the function checkResourceExistsFromError() looks at a received error and determines it to be a ResourceNotFound if the HTTP status is http.StatusNotFound. However, the HTTP status also equals http.StatusNotFound in case of SubscriptionNotFound.

this PR adds logs to indict the real error messages for such 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 #64220 

**Special notes for your reviewer**:

**Release note**:

```release-note
Add reason message logs for non-exist Azure resources
```
2018-05-24 19:46:12 -07:00
Tim Wilfong fc1d9dbd18
Fix hasClusterTag to actually get behavior we want 2018-05-24 19:23:12 -07:00
Tim Wilfong d8d2a4e84c
fix space-vs-tab indent on comment line 2018-05-24 16:21:01 -07:00
Pengfei Ni 5a06ad2d0f Add reason message logs for non-exist resources 2018-05-24 17:08:48 +08:00
Pengfei Ni a50ac29029 Add unit tests for findRule() 2018-05-24 13:20:46 +08:00
Pengfei Ni b9b6a9e98d Add verbose logs for azure cloud provider 2018-05-24 13:20:46 +08:00
Pengfei Ni 00dc6b5ed8 Check LoadBalancingRulePropertiesFormat for azure load balancers 2018-05-24 13:20:41 +08:00
Tim Wilfong 0a95581de0
Update function hasClusterTag to fix issue #64230
Fixes issue #64230, by changing function hasClusterTag, in aws/tags.go, to ensure that a list of tags containing a tag with a key which matches clusterTagKey will return true even if a TagNameKubernetesClusterLegacy tag also exists in the list with a value other than the ClusterID.

/sig aws
2018-05-23 13:54:20 -07:00
Kubernetes Submit Queue 2d1f42e0b1
Merge pull request #63902 from vmware/vcp_secrets
Automatic merge from submit-queue (batch tested with PRs 63969, 63902, 63689, 63973, 63978). 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>.

Adds a mechanism in vSphere Cloud Provider to get credentials from Kubernetes secrets

**What this PR does / why we need it**:
Currently, vCenter credentials are stored in plain text in vsphere.conf. This PR adds a mechanism in vSphere Cloud Provider to get vCenter credentials from Kubernetes secrets.

**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**:
Internally review here: https://github.com/vmware/kubernetes/pull/484
**Workflow:**
1. Create vsphere.conf file with ```secret-name``` and ```secret-namespace```.
	```
	[Global]
	insecure-flag = 1
	secret-name = "vcconf"
	secret-namespace = "kube-system"

	[VirtualCenter "10.160.45.119"]
	port = 443
	datacenters = k8s-dc-1

	[Workspace]
	server = 10.160.45.119
	datacenter = k8s-dc-1
	default-datastore = sharedVMFS-0
	folder = Discovered virtual machine
	```
2. Launch Kubernetes cluster with vSphere Cloud Provider Configured.
3. Create secret with vCenter credentials.
	a. Create base64 encoding for username and password:
	username:
	```	
		> echo -n 'admin' | base64
		YWRtaW4= 
	```
	password:
	```
		> echo -n 'vsphere' | base64
		dnNwaGVyZQ==
	```

	b. kubectl create -f vccredentials.yaml
	```
		#vccredentials.yaml
		apiVersion: v1
		kind: Secret
		metadata:
			name: vcconf
		type: Opaque
		data:
			10.192.44.199.username: YWRtaW4=
			10.192.44.199.password: dnNwaGVyZQ==
	```
4. vSphere Cloud Provider can be used now.

**Note:**
Secrets info can be provided with both (old and new) vSphere Cloud provider configuration formats.


**Tests Done:**
- [x] vSphere Cloud Provider unit test.
- [x] Volume lifecyle with Username and Password in vsphere.conf (for backward compability)
- [x] Volume lifecyle with secrets information in vsphere.conf.
- [x] Update secrets workflow

**Release note**:

```release-note
Adds a mechanism in vSphere Cloud Provider to get credentials from Kubernetes secrets
```
2018-05-18 15:59:15 -07:00
Kubernetes Submit Queue 77a08ee2d7
Merge pull request #63989 from MrHohn/gce-security-policy
Automatic merge from submit-queue (batch tested with PRs 63569, 63918, 63980, 63295, 63989). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

GCE provider: add wrapper for security policy

**What this PR does / why we need it**:
Generated mock interface for beta backend service and security policy as well.

**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-05-18 09:54:26 -07:00
Zihong Zheng 5158add0bc gce provider: point to hack/update-cloudprovider-gce.sh in doc 2018-05-17 17:25:33 -07:00
Zihong Zheng 23726efb3d gce provider: add wrapper for security policy 2018-05-17 17:25:33 -07:00
Abrar Shivani 99076ce32a Add kubernetes license to credential manager 2018-05-17 12:10:30 -07:00
Abrar Shivani f58cc6c075 Add unit test for secrets flag in config file 2018-05-17 12:10:29 -07:00
Abrar Shivani 6c9558334e Add secrets flag in vcp config and modify vcp to use nodemanger connect method 2018-05-17 12:06:03 -07:00
Abrar Shivani 21a7e9b1cb Modify nodemanager to use credentials from secret 2018-05-17 12:06:02 -07:00
Abrar Shivani 94117d748c Add credentials manager unit test in vSphere Cloud Provider 2018-05-17 12:06:02 -07:00
Abrar Shivani c7641800e3 Add credentials manager in vSphere Cloud Provider 2018-05-17 12:06:01 -07:00
Abrar Shivani 1fb9ababbd Add update credentials function in vclib 2018-05-17 12:06:01 -07:00
Kubernetes Submit Queue a481f4bbe8
Merge pull request #63824 from dougm/vsphere-token-auth
Automatic merge from submit-queue (batch tested with PRs 63886, 63857, 63824). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vSphere Cloud Provider: add SAML token authentication support

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

The vSphere cloud provider currently supports username+password based authentication, this PR adds an option to use token based authentication.

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

Fixes #63209

**Special notes for your reviewer**:

For now the config structs and validation are left as-is and
the LoginByToken method is used if the username value is PEM encoded.
In this case of username field configured with the public key, the password
field is expected to be configured with the private key.

In a follow-up PR we can look at collapsing the auth related fields into
a common struct to avoid duplication of field merging and validation.
And then add separate fields for the public and private keys.

**Release note**:

```release-note
vSphere Cloud Provider: add SAML token authentication support
```
2018-05-17 02:08:58 -07:00
Jordan Liggitt 6ab76041b7
Revert "Openstack: register metadata.hostname as node name"
This reverts commit eaac0f5489.
2018-05-15 22:49:21 -04:00
Jordan Liggitt 2f48ad3ff5
Revert "Split out the hostname when default dhcp_domain is used in nova.conf"
This reverts commit 9a8c6db448.
2018-05-15 22:47:02 -04:00
Jordan Liggitt ccc3eb2c31
Revert "Specify DHCP domain for hostname"
This reverts commit da5ccf7fb7.
2018-05-15 22:46:53 -04:00
Doug MacEachern 0791fca5ee update bazel 2018-05-15 10:08:38 -07:00
Doug MacEachern 83768d286c vSphere Cloud Provider: add SAML token authentication support
For now the config structs and validation are left as-is and
the LoginByToken method is used if the username value is PEM encoded.
In this case of username field configured with the public key, the password
field is expected to be configured with the private key.

In a follow-up PR we can look at collapsing the auth related fields into
a common struct to avoid duplication of field merging and validation.
And then add separate fields for the public and private keys.

Fixes #63209
2018-05-15 10:06:56 -07:00
Kubernetes Submit Queue f7ccaae269
Merge pull request #63686 from dougm/deprecate-photon
Automatic merge from submit-queue (batch tested with PRs 63686, 63736). 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>.

Deprecate photon cloud provider

vmware/photon-controller is no longer maintained, as of Oct 2017.

Adds a detail field to deprecatedCloudProviders, meant for pointing to external provider url or other reason for deprecation.



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

The photon cloud provider is no longer supported, need to let users know.

Photon controller support has already been removed from kube-up in PR #58096

**Release note**:

```release-note
NONE
```
2018-05-11 19:09:15 -07:00
Doug MacEachern f8ac0c4d41 Deprecate photon cloud provider
vmware/photon-controller is no longer maintained, as of Oct 2017.

Adds a detail field to deprecatedCloudProviders, meant for pointing to external provider url or other reason for deprecation.
2018-05-11 13:18:05 -07:00
Davanum Srinivas 2080de6adc log error for os.NewComputeV2
Since we are returning false, we are kind of losing the error message,
so we should at least log it.
2018-05-11 13:39:18 -04:00
Kubernetes Submit Queue 7eb88f11d2
Merge pull request #59727 from wgliang/master.time
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>.

should use time.Since instead of time.Now().Sub

**What this PR does / why we need it**:
should use time.Since instead of time.Now().Sub

**Special notes for your reviewer**:
2018-05-10 20:29:40 -07:00
Nick Sardo 81a5fa431c Add Patch method to GA Backend Services 2018-05-10 12:45:21 -07:00
Kubernetes Submit Queue d09cd75ea6
Merge pull request #58874 from sorenmat/sg_tag_verbose
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>.

Include more information when multiple security groups are tagged

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

When trying to create ELB we can sometime fail if there is more then one AWS
security group tagged. It very useful to get the list of security groups printed in
the error message.

**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
  Include the list of security groups when failing with the errors that more then one is tagged
```
2018-05-09 05:48:42 -07:00
Kubernetes Submit Queue ce2bb3d77f
Merge pull request #63541 from feiskyer/vmss-ip
Automatic merge from submit-queue (batch tested with PRs 63563, 63541). 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 check vmSetName when getting Azure node's IP

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

Do not check vmSetName when getting Azure node's IP.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Do not check vmSetName when getting Azure node's IP
```
2018-05-08 23:48:16 -07:00
haz-mat 98b21faae7 scope AWS LoadBalancer security group to spec.loadBalancerSourceRanges 2018-05-08 22:48:58 -07:00
Pengfei Ni d32e73aba9 Fix unit tests for new interfaces 2018-05-09 12:47:56 +08:00
Pengfei Ni f427d279fe Do not check vmSetName when getting node IP 2018-05-09 12:47:52 +08:00
Kubernetes Submit Queue a46ced041d
Merge pull request #63464 from dougm/vsphere-auth
Automatic merge from submit-queue (batch tested with PRs 63364, 63464). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vsphere: use vim25.Client directly to support token authentication

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

This refactor is in support of SAML token authentication: #63209
Avoid use of govmomi.Client as it only supports username+password authentication via SessionManager.Login().
Using vim25.Client directly will allow VCP to add other authentication methods,
such as SessionManager.LoginByToken().

**Release note**:

```release-note
NONE
```
2018-05-08 18:36:14 -07:00
Kubernetes Submit Queue b00d600b48
Merge pull request #63526 from djsly/fix-vmss-parsing
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>.

adding support for VM name with extra Separator String

**What this PR does / why we need it**:
Allows the Azure VM name to have within their name the `_` character

**Special notes for your reviewer**:
This is the error I got before testing
```
May 07 21:55:14 kn-infra000000.<domainname> kubelet[39465]: I0507 21:55:14.462125   39465 azure_vmss.go:108] getVmssVM gets scaleSetName ("kn-infra_ss") and instanceID ("0") for node "kn-infra000000"
May 07 21:55:14 kn-infra000000.<domainname> kubelet[39465]: E0507 21:55:14.462147   39465 azure_vmss_cache.go:52] Failed to extract vmssVMName "kn-infra_ss_0"
May 07 21:55:14 kn-infra000000.<domainname> kubelet[39465]: F0507 21:55:14.462160   39465 kubelet.go:1349] Kubelet failed to get node info: failed to get external ID from cloud provider: not a vmss instance
```

**Release note**:
```release-note
Azure VMSS: support VM names to contain the `_` character
```
2018-05-08 15:01:30 -07:00
sylvain.boily a8de002952 adding support for VM name with extra Separator String 2018-05-08 06:36:04 -04:00
Davanum Srinivas e30fe2ba4b Deprecate in-tree OpenStack cloud provider
Warn operators and users to switch to the external cloud provider
for openstack.
2018-05-07 21:53:15 -04:00
Doug MacEachern cc1552c072 vsphere: update bazel 2018-05-07 08:50:31 -07:00
Doug MacEachern e22f9ca4ae vsphere: fallback to vcsim for testing authentication
The TestVSphereLogin method still defaults to testing against a real vCenter,
but if the required environment variables are not set, it can test against vcsim.

More tests can be converted to use configFromEnvOrSim(), but can be in follow up PRs.
2018-05-07 08:50:31 -07:00
Doug MacEachern e7f74d83c6 Rename VSphereConnection.GoVmomiClient -> Client 2018-05-07 08:50:31 -07:00
Doug MacEachern 64601373f1 vsphere: use vim25.Client directly to support token authentication
This refactor is in support of SAML token authentication: #63209
Avoid use of govmomi.Client as it only supports username+password authentication via SessionManager.Login().
Using vim25.Client directly will allow VCP to add other authentication methods,
such as SessionManager.LoginByToken().
2018-05-07 08:50:31 -07:00
Kubernetes Submit Queue b976ebd56a
Merge pull request #63425 from feiskyer/azclient
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 Azure clients

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

Follow up of #63278 (Use new Azure SDK APIs for load balancer and public IP operations), clean up all other clients.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-07 01:08:45 -07:00
Pengfei Ni 05d0d35d32 fix fake clients and unit tests 2018-05-04 14:09:48 +08:00
Pengfei Ni 12c9d2736a use new azure clients 2018-05-04 14:09:33 +08:00
Pengfei Ni 7d9b134246 cleanup unnecessary channels in azure clients 2018-05-04 14:09:07 +08:00
Nick Sardo f9d1f7eb75 Pass certificate URLs instead of the certificate structs 2018-05-03 13:14:55 -07:00
Kubernetes Submit Queue 4299a0518c
Merge pull request #63261 from dougm/cloudprovider-notimplemented
Automatic merge from submit-queue (batch tested with PRs 61725, 63261). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use cloudprovider.NotImplemented in AddSSHKeyToAllInstances

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

Minor cleanup: In looking at implementations of this method,
noticed a few providers created their own errors instead of using cloudprovider.NotImplemented

**Release note**:

```release-note
NONE
```
2018-05-02 22:16:06 -07:00
Kubernetes Submit Queue 4018211800
Merge pull request #63278 from feiskyer/azure-lb-new-interface
Automatic merge from submit-queue (batch tested with PRs 62657, 63278, 62903, 63375). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use new Azure SDK APIs for load balancer and public IP operations

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

#63063 updated Azure SDK to a stable version. After that, we should also update existing clients to use new SDK APIs.

Without this, public IP listing will be blocked forever in some 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 #

**Special notes for your reviewer**:

A following PR will be sent for other interfaces, e.g. routes and NSGs.

**Release note**:

```release-note
NONE
```
2018-05-02 20:13:07 -07:00
Kubernetes Submit Queue c968d99ee5
Merge pull request #62516 from nicksardo/expand-id
Automatic merge from submit-queue (batch tested with PRs 62060, 62516). 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] Add new formats to resource parser and self link creator

**What this PR does / why we need it**:
- Expands the set of parse-able strings for resource IDs, while also simplifying the code. Note that these are acceptable values for some fields in GCP API.
  - global/networks/my-network
  - regions/us-central1/subnetworks/my-sub
  - zones/us-central1-a/instances/my-hacker-instance
- Fixes the SelfLink function to return links for regions and zones:
  - https://www.googleapis.com/compute/v1/projects/proj4/regions/us-central1
- Generates helper functions to create a ResourceID for each resource
- Generates a unit test that ensures all links can be generated and all generated links can be parsed.
- Fixes an ILB test which creates a malformed URL.

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

**Release note**:
```release-note
NONE
```
2018-05-02 18:12:06 -07:00
Kubernetes Submit Queue 0d43bdec2b
Merge pull request #63294 from bertinatto/throttle_aws
Automatic merge from submit-queue (batch tested with PRs 63349, 63294). 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 metric for throttled requests in AWS

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

This PR adds a metric for request throttling in AWS.

**Special notes for your reviewer**:

* Added metric.
* Moved metrics-related code to `aws_metrics.go`.
* Capitalized acronyms, e.g., `recordAwsMetric` to `recordAWSMetric`.

**Release note**:

```release-note
NONE
```
2018-05-02 11:43:10 -07:00
Fabio Bertinatto 5abe207eef Add metric for throttled requests in AWS 2018-05-02 12:35:37 +02:00
Kubernetes Submit Queue 145f0aa5ed
Merge pull request #63091 from gonzolino/lb-member-name
Automatic merge from submit-queue (batch tested with PRs 63138, 63091, 63201, 63341). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Set names for OpenStack loadbalancer members and monitors

**What this PR does / why we need it**:
This PR sets names for OpenStack loadbalancer members and monitors.
ATM names for members and monitors are empty, making it difficult to identify where they belong.

Healthmonitors will be named `monitor_<lb_name>_<index>` and members
will be named `member_<lb_name>_<index>_<node_name>`.
This naming scheme should in sync with the naming of other LB resources, e.g. pools: `pool_<lb_name>_<index>`.

**Release note**:

```release-note
NONE
```
2018-05-01 16:00:12 -07:00
Nick Sardo 8098b91951 Expand ability of ResourceID 2018-05-01 12:21:44 -07:00
Cheng Xing b4009c5444 GCE PD plugin now prevents attaching a regional PD PV with pdName of a regular PD 2018-04-30 13:31:54 -07:00
Kubernetes Submit Queue 7ffd171c29
Merge pull request #62729 from databus23/fix-os-route-deletion
Automatic merge from submit-queue (batch tested with PRs 59879, 62729). 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: fix orphaned route deletion

This is a follow-up to #56258 which only got half of the work done.
The OpenStack cloud providers DeleteRoute method fails to delete routes when it can’t find the corresponding instance in OpenStack.

```release-note
OpenStack cloudprovider: Fix deletion of orphaned routes
```
2018-04-30 06:58:06 -07:00
Fabio Bertinatto 81bf821d69 Capitalize acronyms in AWS metrics-related code 2018-04-30 15:50:18 +02:00
Pengfei Ni 19e45e35bd Fix fake clients and unit tests 2018-04-28 16:45:19 +08:00
Pengfei Ni 435df2b007 Use new Azure SDK APIs for load balancer and public IP operations 2018-04-28 16:45:05 +08:00
Pengfei Ni fd559ee165 Fix panic for attaching AzureDisk to vmss nodes 2018-04-28 15:48:39 +08:00
Doug MacEachern e7cc5df3f6 Use cloudprovider.NotImplemented in AddSSHKeyToAllInstances
Minor cleanup: In looking at implementations of this method,
noticed a few providers created their own errors instead of using cloudprovider.NotImplemented
2018-04-27 13:19:06 -07:00
Pengfei Ni f753c916cd Simplify vmset acquirement logic 2018-04-27 11:05:45 +08:00
Pengfei Ni a54cb15d7b Improve Azure disk operations for vmas and vmss 2018-04-26 14:23:09 +08:00
Pengfei Ni 079f9b85f8 Use new clients in azure cloud provider 2018-04-26 09:38:48 +08:00
Pengfei Ni 8a0cae8647 Upgrade virtualmachin/disk/storageaccount client to use new SDK 2018-04-26 09:38:48 +08:00
Kubernetes Submit Queue 02e3577ab1
Merge pull request #60009 from zetaab/nodetaint
Automatic merge from submit-queue (batch tested with PRs 63129, 63066, 60009, 63136, 63086). 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 node shutdown taint

**What this PR does / why we need it**: we need node stopped taint in order to detach volumes immediately without waiting timeout. More info in issue ticket #58635 

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

**Special notes for your reviewer**: this was reverted, original PR https://github.com/kubernetes/kubernetes/pull/59323 Hopefully now bugs are fixed. However, I will execute more tests manually today.

**Release note**:
```release-note
NONE
```
2018-04-25 06:29:22 -07:00
Daniel Gonzalez e2ebc5f195 Set names for OpenStack loadbalancer members and monitors
Healthmonitors will be named 'monitor_<lb_name>_<index>' and members
will be named 'member_<lb_name>_<index>_<node_name>'.
2018-04-24 18:27:01 +02:00
Kubernetes Submit Queue 5752d1faaa
Merge pull request #62919 from vmware/backward_comp
Automatic merge from submit-queue (batch tested with PRs 63007, 62919, 62669, 62860). 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 vSphere Cloud Provider to handle upgrade from k8s version less than v1.9.4 to v1.9.4+

**What this PR does / why we need it**:
vSphere Cloud Provider in kubernetes master v1.9.4+ is not able to identify the kubernetes nodes of version less than 1.9.4. Hence, volume operations fail in this case. This PR fixes this.

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

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

**Release note**:

```release-note
None
```
2018-04-23 15:45:13 -07:00
Jesse Haka de967b717d PR #59323, fix bug and remove one api call, add node util dependency to cloud controller 2018-04-22 20:32:26 +03:00
yankaiz 8aeb77f9c8 Add unit tests for gce loadbalancer internal.
Increase coverage for gce_loadbalancer_internal from 76.7% to 91.0%.
2018-04-20 16:14:02 -07:00
Abrar Shivani c15336e97a Fix upgrade to Kubernetes v1.9.3+ 2018-04-20 15:18:28 -07:00
Kubernetes Submit Queue 2bfe40a1d1
Merge pull request #62707 from feiskyer/vmss-standard-lb
Automatic merge from submit-queue (batch tested with PRs 62857, 62707). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add support of standard LB to Azure vmss

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

Add support of standard LB to Azure vmss.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add support of standard LB to Azure vmss
```

/sig azure
2018-04-19 21:57:08 -07:00
Pengfei Ni c69cea41a0 Check all backends for vmss and standard instances 2018-04-20 10:31:23 +08:00
Nick Sardo be70541986 Fix ILB issue updating load balancers 2018-04-19 15:18:43 -07:00
Pengfei Ni efb7ae6ebc Add support of zero nodes in vmss 2018-04-19 16:53:52 +08:00
Pengfei Ni 87776025af Add standard LB support to Azure vmss 2018-04-19 16:40:26 +08:00
Pengfei Ni f1d7156c88 Move vmset checking back to vmsets 2018-04-19 16:35:08 +08:00
Mike Danese d02cf10123 remove last usage of external ID 2018-04-18 09:54:56 -07:00
Fabian Ruff 65d4147139 ensure we delete orphaned routes with matching next-hops only
There might be a valid route with the same DestinationCIDR pointing to a running node.
2018-04-18 13:19:58 +02:00
Kubernetes Submit Queue 93d89609cb
Merge pull request #62220 from vmware/detach_bug_fix
Automatic merge from submit-queue (batch tested with PRs 62568, 62220, 62743, 62751, 62753). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[vSphere Cloud Provider] Fix detach disk when VM is not found

**What this PR does / why we need it**:
When VM is deleted from VC inventory and detach request is issued detach returns error since VM cannot be found. In this scenario, detach should return no error if VM is not found. This PR fixes this.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
@kubernetes/vmware
2018-04-17 20:52:12 -07:00
Kubernetes Submit Queue 22492dafa1
Merge pull request #62661 from agau4779/gce-lb-race
Automatic merge from submit-queue (batch tested with PRs 62748, 60536, 62300, 62661, 62731). 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] Parallelize GCE loadbalancer tests

**What this PR does / why we need it**:
- Encapsulate IP counter in Mocks. Previously, ipCounter was a global int modified by multiple tests.
- Use mock-provided Lock before modifying resources.
- Parallelize loadbalancer tests.

```release-note
NONE
```
2018-04-17 19:53:21 -07:00
Kubernetes Submit Queue 74c6632c97
Merge pull request #62749 from andrewsykim/ccm-approvers
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add @andrewsykim to OWNERS for cmd/cloud-controller-manager,pkg/contr…

**What this PR does / why we need it**:
Add myself as an approver for CCM related code.

cc @wlan0 

**Release note**:
```release-note
Add @andrewsykim as an approver for CCM related code.
```
2018-04-17 15:14:50 -07:00
andrewsykim da06951013 add @andrewsykim to OWNERS for cmd/cloud-controller-manager,pkg/controller/cloud,pkg/cloudprovider 2018-04-17 16:43:58 -04:00
Ashley Gau 6d7424885e encapsulate IP counter in X, parallelize lb tests 2018-04-17 13:34:49 -07:00
Fabian Ruff de15b859ba fix route deletion
This is a follow-up to #56258 which only half of the work done.
The DeleteRoute method failed to delete routes when it can’t find the corresponding node in OpenStack.
2018-04-17 15:34:06 +02:00
Ashley Gau aad92ba816 remove parallel 2018-04-16 09:29:28 -07:00
Pengfei Ni 8a287d2114 Fix machineID getting for vmss nodes when using instance metadata 2018-04-16 13:36:12 +08:00
Ashley Gau 6ff2afefbb update-bazel 2018-04-13 15:47:31 -07:00
Ashley Gau 023a477c63 Add comments, t.Parallel() 2018-04-13 15:47:31 -07:00
Ashley Gau 74092228b2 have fakeLoadbalancerService take lb type as argument 2018-04-13 15:47:31 -07:00
Ashley Gau f105397b88 tests for EnsureLoadBalancer, EnsureLoadBalancerDeleted 2018-04-13 15:47:31 -07:00
Ashley Gau 708a051399 refactor - create new apiService per test. encapsulate resource create/delete checks. 2018-04-13 15:47:31 -07:00
Kubernetes Submit Queue 2196b0a074
Merge pull request #61391 from hanxiaoshuai/fixtodo0320
Automatic merge from submit-queue (batch tested with PRs 60476, 62462, 61391, 62535, 62394). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use function aws.Int64Value replace of deprecated function orZero

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

```
// orZero returns the value, or 0 if the pointer is nil
// Deprecated: prefer aws.Int64Value
func orZero(v *int64) int64 {
    return aws.Int64Value(v)
}
```
Use function aws.Int64Value replace of deprecated function orZero and remove unused orZero .

**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-04-13 11:20:17 -07:00
Pengfei Ni 0f0e271936 Ensure expected load balancer is selected for Azure
Without this, the last element of LB list is always selected.
2018-04-12 15:57:44 +08:00
Kubernetes Submit Queue 27045d3fcd
Merge pull request #61082 from wenlxie/githubupstream.master.ignorevolumeerrorstatus
Automatic merge from submit-queue (batch tested with PRs 61549, 62230, 62055, 61082, 62212). 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>.

don't do attach and deatch when cinder volume status is error

When cinder volume status is `error`, it is not supposed to handle operation like `attach` and `detach`

@dims  @FengyunPan2

```release-note
cinder volume plugin : 
When the cinder volume status is `error`,  controller will not do `attach ` and `detach ` operation
```
2018-04-10 18:19:16 -07:00
Wang Guoliang 89669283fe should use time.Since instead of time.Now().Sub 2018-04-10 12:05:51 +08:00
Kubernetes Submit Queue 09ec7bf548
Merge pull request #60692 from adnavare/bug/60466
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>.

Cleanup the use of ExternalID as it is deprecated

The patch removes ExternalID usage from node_controller
and node_lifecycle_oontroller. The code instead uses InstanceID
which returns the cloud provider ID as well.

fixes #60466
2018-04-09 11:58:12 -07:00
FengyunPan2 6f700b1e6e Add subnet-id annotation for openstack cloud provider
Currently user only specify subnet-id in cloud.conf file.
If user want to specify other subnet for some special services,
the subnet-id annotation should be a good choice.
2018-04-04 19:13:48 +08:00
Abrar Shivani 23b6b46cf2 Detach bug fix 2018-04-03 11:56:27 -07:00
Bowei Du 635ee5ad55 Add support for multiple certificates to targetproxy 2018-04-02 23:34:08 -07:00
Brendan Burns 966b9e1db0 Update tests. 2018-04-02 10:34:30 -07:00
Brendan Burns d263c255bf Update code for new SDK. 2018-04-02 10:34:30 -07:00
Anup Navare 1335e6e2d4 Cleanup the use of ExternalID as it is deprecated
The patch removes ExternalID usage from node_controller
and node_lifecycle_oontroller. The code instead uses InstanceID
which returns the cloud provider ID as well.
2018-04-02 10:15:32 -07:00
Mikhail Mazurskiy 468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Kubernetes Submit Queue 3538676841
Merge pull request #61786 from grayluck/ensureelb-test
Automatic merge from submit-queue (batch tested with PRs 61871, 61890, 61786). 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 unit testcases for ensureExternalLoadBalancer to make sure it doesn't panic when errors raised.

**What this PR does / why we need it**:
Add unit testcases for ensureExternalLoadBalancer to make sure it doesn't panic when errors raised. Increase code coverage from 76.5% to 81.5%.

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

\assign @MrHohn
2018-03-30 14:32:02 -07:00
Kubernetes Submit Queue 7a1e44456f
Merge pull request #61890 from dims/better-specify-dhcp-domain-for-hostname
Automatic merge from submit-queue (batch tested with PRs 61871, 61890, 61786). 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>.

Specify DHCP domain for hostname

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

In 9a8c6db448, we looked at the hostname
in the metadata service and used '.' as the delimiter to chop off the
dhcp_domain (specified in nova.conf). However administrators need to
better control the dhcp domain better as there may be a '.' in the host
name itself. So let's introduce a config option that we can use and
default it to what nova uses when dhcp_domain is not specified which is
"novalocal"


**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
new dhcp-domain parameter to be used for figuring out the hostname of a node
```
2018-03-30 14:31:59 -07:00
yankaiz 6714d17b61 Add unit testcases for ensureExternalLoadBalancer to make sure it doesn't panic when errors raised. 2018-03-30 11:36:47 -07:00
Pengfei Ni 7ec0315c39 some updates 2018-03-30 16:52:42 +08:00
Pengfei Ni 094dbded65 Add support of Azure standard load balancer and public IP 2018-03-30 16:52:36 +08:00
Davanum Srinivas da5ccf7fb7 Specify DHCP domain for hostname
In 9a8c6db448, we looked at the hostname
in the metadata service and used '.' as the delimiter to chop off the
dhcp_domain (specified in nova.conf). However administrators need to
better control the dhcp domain better as there may be a '.' in the host
name itself. So let's introduce a config option that we can use and
default it to what nova uses when dhcp_domain is not specified which is
"novalocal"
2018-03-29 21:31:02 -04:00
Kubernetes Submit Queue d7ec46c5de
Merge pull request #61000 from dims/split-host-name-when-dhcp-domain-is-present-in-host-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>.

Split out the hostname when default dhcp_domain is used in nova.conf

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

When /etc/nova/nova.conf does not have specify dhcp_domain to empty
string, a default string of '.novalocal' is returned by the meta data
service. So we need to just split the string and pick the first one
in the array.

```
$ curl http://169.254.169.254/latest/meta-data/hostname
testvm-1.novalocal
$ curl http://169.254.169.254/latest/meta-data/public-hostname
testvm-1.novalocal
$ curl http://169.254.169.254/latest/meta-data/local-hostname
testvm-1.novalocal
```

**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-03-27 20:28:02 -07:00
Kubernetes Submit Queue 2bc231eb57
Merge pull request #61143 from satyasm/ipam-perf-cloud-mock
Automatic merge from submit-queue (batch tested with PRs 61402, 61143, 61427, 60592). 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>.

Performance tests and fix for IPAM controller.

Tests the four modes of allocations. Can be run using
./test-performance.sh under tests/integration/ipamperf
directory. See ./test-performance.sh -h for supported flags.



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

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

**Special notes for your reviewer**:
Please see the implementation  notes comment block in cloud.go for core details of how 
the mocking works. README.md has details on how the tests can be run on the 
command line.

**Release note**:

```release-note
Performance test framework and basic tests for the IPAM controller, to simulate behavior
of the four supported modes under lightly loaded and loaded conditions, where load is 
defined as the number of operations to perform as against the configured kubernetes
API server QPS.
```
2018-03-27 15:33:09 -07:00
Davanum Srinivas 9a8c6db448 Split out the hostname when default dhcp_domain is used in nova.conf
When /etc/nova/nova.conf does not have specify dhcp_domain to empty
string, a default string of '.novalocal' is returned by the meta data
service. So we need to just split the string and pick the first one
in the array.

```
$ curl http://169.254.169.254/latest/meta-data/hostname
testvm-1.novalocal
$ curl http://169.254.169.254/latest/meta-data/public-hostname
testvm-1.novalocal
$ curl http://169.254.169.254/latest/meta-data/local-hostname
testvm-1.novalocal
```
2018-03-27 12:08:48 -04:00
Kubernetes Submit Queue 2edeb07aac
Merge pull request #61743 from rramkumar1/apply-cloud-provider-patch
Automatic merge from submit-queue (batch tested with PRs 61644, 61624, 61743, 61019, 61287). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add support for setting a custom rate limiter in gce cloud provider

**What this PR does / why we need it**:
This PR makes it possible to use a custom rate limiter for the GCE cloud provider layer. This is a copy of the raw vendor patch made in https://github.com/kubernetes/ingress-gce/pull/148.

Fixes: https://github.com/kubernetes/ingress-gce/issues/154

**Special notes for your reviewer**:

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

/assign @bowei
2018-03-27 06:41:16 -07:00
Kubernetes Submit Queue bb6f0bf1ce
Merge pull request #61300 from grayluck/gce-lb-test
Automatic merge from submit-queue (batch tested with PRs 60499, 61715, 61688, 61300, 58787). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Unit tests for external load balancer

**What this PR does / why we need it**:
Unit test for external load balancer. Increase the code coverage of gce_loadbalancer_external.go from 61.6% to 76.5%.

<!--
**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-03-27 04:08:12 -07:00
Kubernetes Submit Queue 79e1297f9b
Merge pull request #61531 from feiskyer/delete-node
Automatic merge from submit-queue (batch tested with PRs 61434, 61501, 59609, 61467, 61531). 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 cloudprovider.InstanceNotFound is reported when the VM is not found on Azure

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

Azure ExponentialBackoff will still try to get VM information even when the VM has already been removed on Azure:

1365ce3419/pkg/cloudprovider/providers/azure/azure_backoff.go (L52-L60)

It should report `cloudprovider.InstanceNotFound` early and avoid calling Azure APIs on such 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 #61465

**Special notes for your reviewer**:

Should be cherry-picked to v1.9

**Release note**:

```release-note
Ensure cloudprovider.InstanceNotFound is reported when the VM is not found on Azure
```
2018-03-26 19:52:17 -07:00
Kubernetes Submit Queue 408588a407
Merge pull request #61467 from feiskyer/azure-service-tags
Automatic merge from submit-queue (batch tested with PRs 61434, 61501, 59609, 61467, 61531). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add support of specifying service tags for Azure cloud provider

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

This PR adds support of specifying service tags for Azure cloud provider by annotation `service.beta.kubernetes.io/azure-allowed-service-tags`.

Refer https://docs.microsoft.com/en-us/azure/virtual-network/security-overview#service-tags for more information about this feature.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Azure cloud provider now supports specifying allowed service tags by annotation `service.beta.kubernetes.io/azure-allowed-service-tags`
```
2018-03-26 19:52:14 -07:00