Commit Graph

2163 Commits (b43cd7307dfe81476795bbaecc409238d9bf1669)

Author SHA1 Message Date
Kubernetes Submit Queue 98b1c79e2b
Merge pull request #59756 from tsmetana/refactor-describe-volume
Automatic merge from submit-queue (batch tested with PRs 57326, 60076, 60293, 59756, 60370). If you want to cherry-pick this 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 #59601: AWS: Check error code returned from describeVolume

The errors returned by the describeVolume call are not all equal:
if the error is of InvalidVolume.NotFound type it does not necessarily
mean the desired operation cannot be finished successfully.

Fixes #59601

```release-note
NONE
```
2018-02-26 09:20:49 -08:00
Kubernetes Submit Queue 62c5f21d5d
Merge pull request #58767 from 2rs2ts/tag-elb-sgs
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>.

Tag Security Group created for AWS ELB with same additional tags as ELB

/sig aws

(I worked on this with @bkochendorfer)

Tags the SG created for the ELB with the same additional tags the ELB gets from the `service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags` annotation. This is useful for identifying orphaned resources.

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

We weren't sure how to write a test for this because it looks like the fake EC2 code doesn't store the state of the security groups. If new tests are a requirement for merging, we'll need help writing them.

Fixes #53489

```release-note
AWS Security Groups created for ELBs will now be tagged with the same additional tags as the ELB (i.e. the tags specified by the "service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags" annotation.)
```
2018-02-25 11:59:53 -08:00
Kubernetes Submit Queue d1f3de9a39
Merge pull request #57569 from micahhausler/nlb-remove-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 AWS NLB delete error

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

Fixes an error when deleting an NLB in AWS

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

**Special notes for your reviewer**:


**Release note**:

```release-note
Fixes an error when deleting an NLB in AWS - Fixes #57568
```

@justinsb  How do I get this into the `release-1.9` branch?
2018-02-25 11:07:07 -08:00
Kubernetes Submit Queue f49f799dbd
Merge pull request #59941 from agau4779/gce-external-lb-tests
Automatic merge from submit-queue (batch tested with PRs 60324, 60269, 59771, 60314, 59941). If you want to cherry-pick this 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] Refactor ExternalLoadBalancer Tests

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

- Refactors the ExternalLoadBalancer tests to use the generated GCE mock instead of FakeCloudAddressService, FakeCloudForwardingRuleService.
- Adds hooks to populate NetworkTier on Alpha resources
- Moves shared code to top of the external loadbalancer test file
- Moves NetworkTier into a constants file at the cloud level, so it is more easily called in subpackages

**Special notes for your reviewer**:

```release-note
NONE
```
2018-02-24 20:01:50 -08:00
Ashley Gau 828e22bdc6 add comments 2018-02-23 16:14:27 -08:00
Di Xu 271ae45901 fix new typos when rebasing 2018-02-23 09:33:14 +08:00
Kubernetes Submit Queue a4222bd8c3
Merge pull request #60186 from feiskyer/vmss-check
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 node type checking for azure nodes

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

This PR cleanup node type checking for azure nodes. It also fixes a problem of `instance not found` error for VMAS nodes in vmss cluster (vmType set to vmss):

```
ss.GetPrimaryInterface(k8s-master), ss.getCachedVirtualMachine(k8s-master), err=instance not found
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-22 08:30:02 -08:00
Kubernetes Submit Queue 064597a8e0
Merge pull request #59857 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>.

Fix instanceID for vmss nodes

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

When useInstanceMetadata is set to true for vmss nodes, their providerID is wrong.

Their providerID should be in format `azure:///subscriptions/<subscription-id>/resourceGroups/<rg-name>/providers/Microsoft.Compute/virtualMachineScaleSets/<scaleset-name>/virtualMachines/<instance-id>`.


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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix instanceID for vmss nodes.
```
2018-02-22 04:39:14 -08:00
Kubernetes Submit Queue c153aff99f
Merge pull request #60064 from tenxcloud/fix_cp_azure_grammar_error
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix grammar error of azure cloudprovider code

**What this PR does / why we need it**:
Fix grammar error to make it easy to understand

**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-02-22 03:57:47 -08:00
Pengfei Ni 2e9afe2c97 Cleanup node type checking for azure nodes 2018-02-22 13:28:48 +08:00
Ashley Gau 775480f7d9 merge master 2018-02-21 09:58:40 -08:00
Kubernetes Submit Queue 24aa376b00
Merge pull request #59302 from brendandburns/ut2
Automatic merge from submit-queue (batch tested with PRs 59901, 59302, 59928). If you want to cherry-pick this 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 more tests for Azure routes.

This builds off of #59165 

Please only review a8d0e73234
2018-02-21 07:02:35 -08:00
Mike Danese a9e0a2b09a cloud: don't require application default credentials to run unit tests 2018-02-20 15:22:00 -08:00
Ashley Gau 8691bb370d Delete unused ForwardingRule fakes 2018-02-20 13:19:04 -08:00
Ashley Gau 6d9409a692 Use shared variable names. Define hooks on mock objects 2018-02-20 13:19:04 -08:00
Ashley Gau d62200bb6c Move shared variables and fakeGCECloud method to top 2018-02-20 13:19:04 -08:00
Ashley Gau e250074b38 Define hooks for inserting Forwarding Rules and Addresses in all versions 2018-02-20 13:19:04 -08:00
Ashley Gau 5dd3fdebec Move and make exported lbScheme types into cloud/constants.go 2018-02-20 13:19:04 -08:00
Ashley Gau bef0838a21 Move NetworkTiers into cloud/constants.go 2018-02-20 13:19:04 -08:00
Ashley Gau a39e7e4146 Add test for wrong networktier resource deletion 2018-02-20 13:19:04 -08:00
Kubernetes Submit Queue 96ec318718
Merge pull request #59842 from ixdy/update-rules_go-02-2018
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 bazelbuild/rules_go, kubernetes/repo-infra, and gazelle dependencies

**What this PR does / why we need it**: updates our bazelbuild/rules_go dependency in order to bump everything to go1.9.4. I'm separating this effort into two separate PRs, since updating rules_go requires a large cleanup, removing an attribute from most build rules.

**Release note**:

```release-note
NONE
```
2018-02-19 22:23:05 -08:00
Lei Wang 669560af38 Fix grammar eror of azure cloudprovider 2018-02-20 10:42:13 +08:00
Kubernetes Submit Queue e267f46c8e
Merge pull request #59986 from nicksardo/mockproject
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: Fix SelfLink of cloudprovider mocks

**What this PR does / why we need it**:
Allows the user to pass in a ProjectRouter to the mocked services

**Special notes for your reviewer**:
/assign bowei
/cc agau4779  

**Release note**:
```release-note
NONE
```
2018-02-18 18:39:14 -08:00
Kubernetes Submit Queue 6d0b71740f
Merge pull request #59968 from kubernetes/revert-59323-nodetaint
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>.

Revert "add node shutdown taint"

Reverts kubernetes/kubernetes#59323

Node becomes unready, but is never removed. I've found the following in [kube-controller-manager.log](https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubernetes-e2e-gci-gce-autoscaling/6055/artifacts/bootstrap-e2e-master/cluster-autoscaler.log) from test run for one such node:

`E0216 01:14:27.084923       1 node_lifecycle_controller.go:686] Error determining if node bootstrap-e2e-minion-group-01b1 shutdown in cloud: failed to get instance ID from cloud provider: instance not found`

This goes on for the rest of the run (~6h). Looks like the node is stuck in Unready state because of this check: https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/nodelifecycle/node_lifecycle_controller.go#L684. Previously, there was no such check and the node was removed.

Reverting as this would affect all users attempting to resize their node groups on GCE.

```release-note
NONE
```
2018-02-16 20:12:56 -08:00
Andrew Garrett 39f46806b7 Don't assume SG is for ELB; pass tags directly 2018-02-16 22:00:22 +00:00
Nick Sardo 2410b6576e Pass ProjectRouter to mocks 2018-02-16 13:47:12 -08:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Kubernetes Submit Queue 0e81651e77
Merge pull request #59909 from jsafrane/volumemanager-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 jsafrane as AWS approver.

**What this PR does / why we need it**:
I contrinbuted several PRs in AWS storage and I'm willing to share review/approval duty.

**Release note**:

```release-note
NONE
```

/assign @justinsb
2018-02-16 06:02:01 -08:00
Aleksandra Malinowska 2d54ba3e0f
Revert "add node shutdown taint" 2018-02-16 12:24:27 +01:00
Bryce Carman 3b99e1b487 Add AWS cloud provider option for IAM role
Currently the AWS cloud provider uses the EC2 instance role when
interacting with AWS APIs. This change gives the option to provide and IAM
role that the cloud provider will assume before calling the APIs. All
resources created by the role will be owned by that account instead of
the account where the EC2 instance is running.
2018-02-15 21:14:58 -08:00
Kubernetes Submit Queue 271c267fff
Merge pull request #59830 from khenidak/az-ratelimit
Automatic merge from submit-queue (batch tested with PRs 59939, 59830). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Azure - ARM Read/Write rate limiting

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

Azure cloud provider currently runs with:
1. Single ARM rate limiter for both `read [put/post/delete]` and `write` operations, while ARM provide [different rates for read/write] (https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits). This causes write operation to stop even if there is available write request quotas. 
2. Cloud provider uses rate limiter's `Accept()` instead of `TryAccept()` This causes control loop to wait for prolonged tike `in case of no request quota available` for **all** requests even for those does not require ARM interaction. A case for that the `Service` control loop will wait for a prolonged time trying to create `LoadBalancer` service even though it can fail and work on the next service which is `ClusterIP`. This PR moves cloud provider tp `TryAccept()`

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

**Special notes for your reviewer**:
`n/a`

**Release note**:

```release-note
- Separate current ARM rate limiter into read/write
- Improve control over how ARM rate limiter is used within Azure cloud provider
```

cc @jackfrancis (need your help carefully reviewing this one) @brendanburns @jdumars
2018-02-15 16:43:37 -08:00
Khaled Henidak(Kal) 38a9fc33db code review: create err chan via helper 2018-02-15 20:11:40 +00:00
Brendan Burns 352722b1e7 Add some more tests for routes. 2018-02-15 11:37:39 -08:00
Kubernetes Submit Queue 27daaab224
Merge pull request #59323 from zetaab/nodetaint
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 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**:

**Release note**:
```release-note
NONE
```
2018-02-15 09:52:10 -08:00
Khaled Henidak(Kal) 53036bf755 Code review + resync VMSS changes 2018-02-15 16:49:47 +00:00
Kubernetes Submit Queue 7e8de5422c
Merge pull request #56394 from porridge/fetch-token-retry-longer
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>.

Try longer to fetch initial token.

**What this PR does / why we need it**:
Step towards fixing #56293

**Special notes for your reviewer**:
/kind bug
/priority critial-urgent
@kubernetes/sig-scalability-bugs
/cc @shyamjvs please add to v1.9

**Release note**:
```release-note
NONE
```
2018-02-15 08:31:03 -08:00
Marcin Owsiany 3a5d48700c Try longer to fetch initial token. 2018-02-15 10:57:35 +01:00
Kubernetes Submit Queue 6535c955bf
Merge pull request #59440 from vmware/rohitj-upstream
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use SetInformers method to register for Node events. (#449)

Till 1.9.2 Kubernetes release vSphere Cloud Provider needs a separate service account which is not needed.

**What this PR does / why we need it**: 
In this fix, vSphere CLoud Provider is now implementing SetInformer API to get the required NodeInformer. With this change vSphere Cloud Provider no more requires separate service account for listening NodeEvents.

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

**Special notes for your reviewer**:
VMware vSphere Cloud Provide internal change

**Release note**:
```release-note
With this fix, separate service account is not needed for vSphere Cloud Provider for listening node events.
```
2018-02-14 13:46:48 -08:00
Jan Safranek 161972272c Add jsafrane as AWS approver. 2018-02-14 17:41:18 +01:00
Kubernetes Submit Queue 0dda5c8a7b
Merge pull request #59749 from zioproto/issues/59421-CheckCIDR
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>.

Detect CIDR IPv4 or IPv6 version to select nexthop

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

The node `InternalIP` is used as nexthop by the Kubernetes master to create routes in the Neutron router for Pods reachability.
If a node has more than one `InternalIP`s, eventually IPv4 and IPv6, a random `InternalIP` from the list is returned.
This can lead to the bug described in https://github.com/kubernetes/kubernetes/issues/59421
We need to check when we build a route that the CIDR and the nexthop belong to the same IP Address Family (both IPv4 or both IPv6)

**Which issue(s) this PR fixes** :
Fixes https://github.com/kubernetes/kubernetes/issues/59421
It is related to https://github.com/kubernetes/kubernetes/issues/55202

**Special notes for your reviewer**:
This is the suggested way to fix the problem after the discussion in https://github.com/kubernetes/kubernetes/pull/59502

**Release note**:
```release-note
NONE
```
2018-02-14 04:10:10 -08:00
Pengfei Ni 68dcacf6e0 Fix instanceID for vmss nodes 2018-02-14 16:38:49 +08:00
Kubernetes Submit Queue d89e64110a
Merge pull request #59716 from feiskyer/vmss-disk
Automatic merge from submit-queue (batch tested with PRs 59489, 59716). If you want to cherry-pick this 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 AzureDisk support for vmss nodes

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

This PR adds AzureDisk support for vmss nodes. Changes include

- Upgrade vmss API to 2017-12-01
- Upgrade vmss clients with new version API
- Abstract AzureDisk operations for vmss and vmas
- Added AzureDisk support for vmss
- Unit tests and fake clients fix
 
**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 #43287

**Special notes for your reviewer**:

~~Depending on #59652 (the first two commits are from #59652).~~

**Release note**:

```release-note
Add AzureDisk support for vmss nodes
```
2018-02-14 00:14:34 -08:00
Pengfei Ni fbc871be32 Add vmType checking in Azure disk controller common 2018-02-14 08:38:34 +08:00
Khaled Henidak(Kal) f909859b6d fix json tag on Azure.config 2018-02-13 22:22:25 +00:00
Khaled Henidak(Kal) 9e4f1441b4 Merge branch 'master' of https://github.com/kubernetes/kubernetes into az-ratelimit 2018-02-13 20:57:05 +00:00
Khaled Henidak(Kal) a86062c259 Configuration changes 2018-02-13 20:56:53 +00:00
Khaled Henidak(Kal) 5bf6b0fd70 WIP - create read/writer rate limiter 2018-02-13 20:05:20 +00:00
Saverio Proto 2eff8bf31f Detect CIDR IPv4 or IPv6 version to select nexthop
https://github.com/kubernetes/kubernetes/issues/59421
https://github.com/kubernetes/kubernetes/issues/55202
2018-02-13 09:50:31 +01:00
Kubernetes Submit Queue 757c24d224
Merge pull request #57969 from jsafrane/aws-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 gnufied as AWS approver.

@gnufied has been maintaining the storage part of AWS cloud provider for a long while and he deserves to be approver.

```release-note
NONE
```

/sig aws
2018-02-12 19:41:02 -08:00
Kubernetes Submit Queue 91c783e20b
Merge pull request #59739 from andyzhangx/azuredisk-initaccount
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 the error prone account creation method of blob disk

**What this PR does / why we need it**:
use new account generation method for blob disk to fix the error prone account creation method of blob disk

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

**Special notes for your reviewer**:

**Release note**:

```
fix the error prone account creation method of azure blob disk
```

/assign @karataliu 
/sig azure
2018-02-12 19:03:37 -08:00