Commit Graph

1206 Commits (f34a24e98e7c837b567b78be3af958ac1156cd80)

Author SHA1 Message Date
Josh Horwitz 2f1ea47c83 Add InstanceExists* methods to cloud provider interface for CCM 2017-08-24 20:41:28 -04:00
Yu-Ju Hong 359fc7a4f4 Change the FakeCloudAddressService to store Alpha objects internally
The change assumes the compute Alpha object is the superset of the v1
object. By storing the Alpha objects internally in the fake, we can
convert them to Beta and v1 to test different functions.
2017-08-24 07:43:29 -07:00
Bowei Du 1f4dc5559d Add AddAliasToInstance() to gce cloud provider
- Adds AddAliasToInstance() to the GCE cloud provider.
- Adds field "secondary-range-name" to the gce.conf configuration file.

```release-note
NONE
```
2017-08-23 23:10:20 -07:00
Kubernetes Submit Queue 5cb1cccd40 Merge pull request #51138 from yujuhong/alpha-calls
Automatic merge from submit-queue

GCE: Add functions for Alpha address and forwarding rules
2017-08-23 21:17:07 -07:00
Kubernetes Submit Queue 6bb928a3df Merge pull request #50931 from jrperritt/fix-pool-panic
Automatic merge from submit-queue

cloudprovider/openstack bug fix: don't try to append pool id if pool doesn't exist

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

This fixes a bug in the OpenStack cloud provider that could cause a panic.

Consider what will happen in the current `LbaasV2.EnsureLoadBalancerDeleted` code if `nil, ErrNotFound` is returned by `getPoolByListenerID`.
2017-08-23 16:23:29 -07:00
Kubernetes Submit Queue 012e94b6be Merge pull request #50239 from FengyunPan/fix-no-exist-node
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Mark the volumes as detached when node does not exist

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and do not return err.

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

**Release note**:
```release-note
NONE
```
2017-08-23 08:41:04 -07:00
Kubernetes Submit Queue 33821862ce Merge pull request #50973 from FengyunPan/fix-legacy-floatingip
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084)

Fix legacy floatingip

Fix #50974
If user specify floating-network-id by annotation rather than cloud
provider file, openstack cloud provider don't delete floatingip when
deleting LoadBalancer service.

**Release note**:
```release-note
NONE
```
2017-08-23 03:36:05 -07:00
Yu-Ju Hong 0d1efd5e78 GCE: add a new label "version" for metrics 2017-08-22 17:37:50 -07:00
Yu-Ju Hong 84c9c25edf GCE: Add functions for Alpha address and forwarding rules 2017-08-22 16:37:36 -07:00
Minhan Xia c04ba4eab5 add alpha api gate at gce cloud provider 2017-08-22 11:05:06 -07:00
Kubernetes Submit Queue e2685d800d Merge pull request #50706 from freehan/cloud-provider-op-v2
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

teach gce cloud to handle alpha/beta operations v2

Alternative to #50704 

This one feels cleaner. BUT, type assertion problems cannot be exposed at compile time. 

Please let me know what you think. This will set the precedence for consuming GCE alpha/beta API. 

cc: @thockin @yujuhong @saad-ali @MrHohn 

```release-note
NONE
```
2017-08-22 10:48:18 -07:00
FengyunPan 9bdf2cc0e7 Support for specifying external LoadBalancerIP on openstack
Fix #50851
Add ServiceAnnotationLoadBalancerInternal annotation to distinguish
between internal LoadBalancerIP and external LoadBalancerIP.
2017-08-22 20:40:56 +08:00
Kubernetes Submit Queue a4b719dcab Merge pull request #50640 from yujuhong/check-ips
Automatic merge from submit-queue (batch tested with PRs 50893, 50913, 50963, 50629, 50640)

gce external LB: add a function to verify the requested IP address

Factor out the logic for verifying the user-requested IP for better
readability and testing. Also rename a few variables for clarity.
2017-08-22 05:31:15 -07:00
Hui Chen adbbf8b464 fix minor typo 2017-08-22 19:56:58 +08:00
Jason Zhao 35777b2997 run go fmt 2017-08-21 15:24:44 -07:00
Jason Zhao 8b16c3dafb addressed comments 2017-08-21 14:21:02 -07:00
Minhan Xia 25f8c946f5 teach gce cloud to handle alpha/beta operations 2017-08-21 10:58:10 -07:00
Yu-Ju Hong afcb948385 gce external LB: add a function to verify the requested IP address 2017-08-21 08:42:11 -07:00
xswack 671c0560ae Replace the deprecated function with the suggest function 2017-08-21 10:50:52 +08:00
FengyunPan e8fe9b65c5 Support ServiceAnnotationLoadBalancerFloatingNetworkId for LB v1 2017-08-21 07:48:07 +08:00
FengyunPan e5b7f0e7ba Fix legacy floatingip
If user specify floating-network-id by annotation rather than cloud
provider file, openstack cloud provider don't delete floatingip when
deleting LoadBalancer service.
2017-08-21 07:45:52 +08:00
jrperritt 21ce3de326 don't try to add pool id if pool doesn't exist 2017-08-19 07:36:38 -05:00
Kubernetes Submit Queue c573d8192f Merge pull request #50255 from mattlandis/aws-duplicate-subnets
Automatic merge from submit-queue (batch tested with PRs 50255, 50885)

AWS: Arbitrarily choose first (lexicographically) subnet in AZ

When there is more than one subnet for an AZ on AWS choose arbitrarily
chose the first one lexicographically for consistency.



**What this PR does / why we need it**:
If two subnets were to be used appear in the same aws az which one is chosen is currently not consistent.  This could lead to difficulty in diagnosing issues.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-18 05:21:57 -07:00
Kubernetes Submit Queue 4e4168121a Merge pull request #50856 from shyamjvs/save-route-controller-memory
Automatic merge from submit-queue (batch tested with PRs 50303, 50856)

Make route-controller list only relevant routes instead of all of them

Ref https://github.com/kubernetes/kubernetes/issues/50854 (somewhat related issue)

IIUC from the code, route-controller memory is mainly being used in storing routes and nodes (also CIDRs, but that's not much).
This should help reduce that memory usage (particularly when running in a project with large no. of routes), by moving filtering to server-side.
For e.g in kubernetes-scale project we have ~5000 routes (each about 600B) => 3 MB of routes

This doesn't help with reducing time to list the routes as filtering is also linear.

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-08-18 03:37:53 -07:00
Kubernetes Submit Queue 7c13d65134 Merge pull request #50281 from FengyunPan/mark-detached-vsphere
Automatic merge from submit-queue

Mark volume as detached when node does not exist for vsphere

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and
return false without error.
Fix #50266

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

**Release note**:
```release-note
NONE
```
2017-08-17 16:33:26 -07:00
Shyam Jeedigunta 0b1d548879 Make route-controller list only relevant routes instead of all of them 2017-08-17 20:39:59 +02:00
zhengchuan hu 05d3e9c5f3 Delete useless code 2017-08-17 13:38:17 +08:00
Kubernetes Submit Queue 7a58f55423 Merge pull request #50651 from itowlson/log-azure-share-name
Automatic merge from submit-queue (batch tested with PRs 46317, 48922, 50651, 50230, 47599)

Log name if Azure file share cannot be created

**What this PR does / why we need it**: If the Azure storage provider fails to create a file share, it logs and error message 'failed to create share in account _foo_: _error-msg_'.  A user on the Slack azure-sig channel reported an error of "The specified resource name length is not within the permissible limits".  This PR adds logging of the name so that this error can be diagnosed in future.

**Which issue this PR fixes**: This was raised on Slack and has not been created as a GitHub issue.

**Special notes for your reviewer**: None

**Release note**:

```release-note
Changed the error log format when creating an Azure file share to include the name of the share.
```
2017-08-16 19:50:17 -07:00
Kubernetes Submit Queue 5c558ddb18 Merge pull request #50722 from vmware/longVmName
Automatic merge from submit-queue (batch tested with PRs 50061, 48580, 50779, 50722)

Fix for Policy based volume provisioning failure due to long VM Name in vSphere cloud provider

Dummy VM is used for SPBM policy based provisioning feature of vSphere cloud provider.
Dummy VM name is generated based on kubernetes cluster name and pv name. It can easily go beyond 
vSphere's limitation of 80 characters for vmName.

To solve the long VM name failure hash is used instead of vSphere-k8s-clusterName-PvName

**Which issue this PR fixes** 
https://github.com/vmware/kubernetes/issues/176

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

@BaluDontu @divyenpatel @luomiao @tusharnt
2017-08-16 14:57:31 -07:00
Erik McClenney ba974dbbc7 Add Kubernetes user agent to GCP API calls. 2017-08-16 11:37:24 -07:00
FengyunPan 8d4949c5f3 Support autoprobing subnet-id for openstack cloud provider
Currently if user doesn't specify subnet-id or specify a unsafe
subnet-id, openstack cloud provider can't create a correct LoadBalancer
service.
Actually we can get it automatically. This patch do a improvement.
This is a part of #50726
2017-08-16 14:21:49 +08:00
rohitjogvmw 1de7d47819 Using hash/fnv to generate the vmName
vSphere has limitation of 80 characters for vmName.
        with vsphere-k8s prefix and "vmdisk.volumeOptions.Name" vmName can become easily bigger than 80 chars.
        Used hash funciton just of the "vmdisk.volumeOptions.Name" part as cleanup dummyVm logic depends on prefix "vsphere-k8s"
2017-08-15 17:56:46 -07:00
clement-buchart 1586823c94 Variable mismatch 2017-08-15 17:58:18 +08:00
clement-buchart 45b07b253e Use cloud environment to instantiate client 2017-08-15 17:42:21 +08:00
FengyunPan 63725e3e3c Mark the volumes as detached when node does not exist
If node doesn't exist, OpenStack Nova will assume the volumes
are not attached to it. So mark the volumes as detached and
return false without error.
Fix: #50200
2017-08-15 16:42:11 +08:00
Ivan Towlson 0035b40f27 Log name if Azure file share cannot be created 2017-08-15 14:01:53 +12:00
FengyunPan ea32f06d20 [VSphere] Don't return err when node doesn't exist in DetachDisk() 2017-08-14 10:12:46 +08:00
FengyunPan b85743b868 Mark volume as detached when node does not exist for vsphere
If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and
return false without error.
Fix #50266
2017-08-14 10:09:50 +08:00
Kubernetes Submit Queue 1f2185fbfb Merge pull request #49743 from euank/hostname
Automatic merge from submit-queue (batch tested with PRs 49847, 49743, 49853, 50225, 50479)

cloudprovider/photon: remove unneeded bash exec

**Release note**:
```release-note
NONE
```
2017-08-12 02:35:54 -07:00
Kubernetes Submit Queue a7ce691311 Merge pull request #49785 from FengyunPan/fix-getPortByIP
Automatic merge from submit-queue (batch tested with PRs 47724, 49984, 49785, 49803, 49618)

Fix conflict about getPortByIp

**What this PR does / why we need it**:
Currently getPortByIp() get port of instance only based on IP.
If there are two instances in diffent network and the CIDR of
their subnet are same, getPortByIp() will be conflict.
My PR gets port based on IP and Name of instance.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-08-11 18:47:19 -07:00
Kubernetes Submit Queue 92d9e44269 Merge pull request #50535 from jdumars/azure-owners
Automatic merge from submit-queue

Added jdumars to OWNERS file for Azure cloud provider

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

This PR adds GitHub user jdumars as an approver to pkg/cloudprovider/providers/azure 

Jaice Singer DuMars (me) is the program manager at Microsoft tasked with shepherding all upstream contributions from Microsoft into Kubernetes.  With the volume of work, and the impending breakout of cloud provider code, this helps distribute the review and approval load more evenly.

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

N/A

**Special notes for your reviewer**:

This was discussed with Brendan Burns prior to submitting the pre-approval.

**Release note**:
none
2017-08-11 15:52:55 -07:00
Kubernetes Submit Queue bbe93bb202 Merge pull request #50470 from nicksardo/gce-annotation-fixes
Automatic merge from submit-queue

GCE: Fix lowercase value and alpha-missing annotation for ILB

**What this PR does / why we need it**:
Fixes #50426
Also explicitly sets an annotation as 'alpha'.

/assign @freehan @bowei 

**Release note**:
```release-note
NONE
```
2017-08-11 15:03:28 -07:00
Jason Singer DuMars 8516e9ff18 Added jdumars to OWNERS file for Azure cloud provider 2017-08-11 15:47:54 -04:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Nick Sardo 2aa62506c8 GCE: Specify alpha in annotation key, deprecate lower case of LB type 2017-08-10 16:09:45 -07:00
Yu-Ju Hong 58ea4e41d4 GCE: filter addresses by IP when listing
Also move the function to gce_addresses.go so that metrics can be
recorded for the call.
2017-08-10 09:30:48 -07:00
FengyunPan 6aa7c47480 Fix conflict about getPortByIp
Currently getPortByIp() get port of instance only based on IP.
If there are two instances in diffent network and the CIDR of
their subnet are same, getPortByIp() will be conflict.
My PR gets port based on IP and Name of instance.
2017-08-08 23:32:59 +08:00
FengyunPan ba463062ca Update gophercloud to support list interfaces of OpenStack instance 2017-08-08 23:29:37 +08:00
Kubernetes Submit Queue 702f23e977 Merge pull request #50208 from FengyunPan/fix-volume-detach
Automatic merge from submit-queue

Ignore the available volume when calling DetachDisk

Fix #50207
If user detachs the volume by nova in openstack env, volume becomes
available. If nova instance is been deleted, nova will detach it
automatically and become available. So the "available" is fine since that means the
volume is detached from instance already.

**Release note**:
```release-note
NONE
```
2017-08-08 01:47:36 -07:00
FengyunPan ebac6dddb4 Mark volume as detached when node does not exist for photon
If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and
return false without error.
Fix #50266
2017-08-08 10:28:58 +08:00
Kubernetes Submit Queue 57cbc67cd8 Merge pull request #50206 from FengyunPan/add-debug
Automatic merge from submit-queue (batch tested with PRs 49524, 46760, 50206, 50166, 49603)

[OpenStack] Add more detail error message

I get same simple error messages "Unable to initialize cinder client
for region: RegionOne" from controller-manager, but I can not find the
reason. We should add more detail message "err" into glog.Errorf.

Currently NewBlockStorageV2() return err when failed to get cinder endpoint, but there is no code to output the message of err.

**Release note**:
```release-note
NONE
```
2017-08-07 13:52:00 -07:00
Robert Rati 926f070719 Make ClusterID required for AWS. #48954 2017-08-07 15:47:00 -04:00
Kubernetes Submit Queue 5a25527b9b Merge pull request #49725 from sylr/vnet
Automatic merge from submit-queue

Azure: Allow VNet to be in a separate Resource Group

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

This PR allows Kubernetes in an Azure context to use a VNet which is not in the same Resource Group as Kubernetes.

We need this because currently Azure Cloud Provider driver assumes that it should have a VNet for himself but if there is one thing that should be shared amongst Azure resources it's a VNet cause, well, things might want to talk to each other in a private network, don't you think ?

I guess this should we backported down to 1.6 branch.

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

fixes #49577

**Release note**:

```release-note
NONE
```

@kubernetes/sig-azure
@kubernetes/sig-azure-pr-reviews
2017-08-10 01:41:15 -07:00
Kubernetes Submit Queue 031a83082b Merge pull request #49283 from dixudx/fix_cloudprovider_azure_config
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

fix bug when azure cloud provider configuration file is not specified

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

Current [Azure cloud provider](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure.go#L203) failed to [parse empty config file](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/plugins.go#L110-L124) when `--cloud-config` is not specified.

[GetServicePrincipalToken](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure.go#L157-L199) will raise an error if no valid secrets/tokens are found. So we just need to return empty config obj if `--cloud-config` is not set.

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

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

**Release note**:

```release-note
fix bug when azure cloud provider configuration file is not specified
```
2017-08-10 00:53:24 -07:00
Kubernetes Submit Queue a2db3d2fd7 Merge pull request #49912 from freehan/local-cloud-provider
Automatic merge from submit-queue (batch tested with PRs 50418, 49830, 49206, 49061, 49912)

add LocalZone into gce.conf and refactor gce cloud provider configura…

The main goal of this PR is to make gce cloud provider able to run locally. 

1. added a LocalZone parameter into gce.conf. 
2. refactor `newGCECloud` to avoid contacting metadata server if configuration is already available. 

```release-note
None
```
2017-08-09 22:07:22 -07:00
Kubernetes Submit Queue a881405bd4 Merge pull request #49164 from vmware/vSphereCloudProviderCodeRefactoring
Automatic merge from submit-queue

VSphere cloud provider code refactoring

The current PR tracks the vSphere Cloud Provider code refactoring which includes the following changes.
- VCLib Package - A framework used by vSphere cloud provider for managing the vSphere entities. VCLib package mainly does the following:
  - Volume management on datastore (Create/Delete)
  - Volume management on Virtual Machines (Attach/Detach)
  - Storage Policy Management
- vSphere Cloud Provider changes to implement the cloud provider interfaces by calling into VCLib package.
- Modifications to e2e tests to accomodate the latest design changes.

@divyenpatel @rohitjogvmw @luomiao 

```release-note
vSphere cloud provider: vSphere cloud provider code refactoring
```
2017-08-09 18:18:58 -07:00
Minhan Xia 1cad829b6e add LocalZone into gce.conf and refactor gce cloud provider configuration to allow avoiding external communication 2017-08-07 18:01:49 -07:00
Kubernetes Submit Queue d6cb4827bf Merge pull request #50042 from jingxu97/Aug/cinderfix
Automatic merge from submit-queue (batch tested with PRs 50087, 39587, 50042, 50241, 49914)

AttachDisk should not call detach inside of Cinder volume provider
2017-08-07 10:58:59 -07:00
Matt Landis 10794e7f6e Arbitrarily chose first (lexicographically) subnet in AZ on AWS.
When there is more than one subnet for an AZ on AWS choose arbitrarily
chose the first one lexicographically for consistency.
2017-08-07 07:41:47 -07:00
FengyunPan 48db05166a Ignore the available volume when calling DetachDisk
If use detachs the volume by nova in openstack env, volume becomes
available. If nova instance is been deleted, nova will detach it
automatically. So the "available" is fine since that means the
volume is detached from instance already.
2017-08-07 17:11:40 +08:00
FengyunPan 1ff8e12a24 [OpenStack] Add more detail error message
I get same simple error messages "Unable to initialize cinder client
for region: RegionOne" from controller-manager, but I can not find the
reason. We should add more detail message "err" into glog.Errorf.
2017-08-06 14:41:47 +08:00
Kubernetes Submit Queue 207a95a076 Merge pull request #49805 from nbutton23/nbutton-fix-elb-sg-bug
Automatic merge from submit-queue (batch tested with PRs 49805, 50052)

We never want to modify the globally defined SG for ELBs

**What this PR does / why we need it**:
Fixes a bug where creating or updating an ELB will modify a globally defined security group

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

**Special notes for your reviewer**:

**Release note**:

```release-note
fixes a bug around using the Global config ElbSecurityGroup where Kuberentes would modify the passed in Security Group.
```
2017-08-05 12:32:59 -07:00
Kubernetes Submit Queue c3f4dba513 Merge pull request #49697 from zetaab/mfloating
Automatic merge from submit-queue (batch tested with PRs 47416, 47408, 49697, 49860, 50162)

add possibility to use multiple floatingip pools in openstack loadbalancer

**What this PR does / why we need it**: Currently only one floating pool is supported in kubernetes openstack cloud provider. It is quite big issue for us, because we want run only single kubernetes cluster, but we want that external and internal services can be used. It means that we need possibility to create services with internal and external pools.

**Which issue this PR fixes**: fixes #49147

**Special notes for your reviewer**: service labels is not maybe correct place to define this floatingpool id. However, I did not find any better place easily. I do not want start modifying service api structure.

**Release note**:
```release-note
Add possibility to use multiple floatingip pools in openstack loadbalancer
```

Example how it works:
```
cat /etc/kubernetes/cloud-config
[Global]
auth-url=https://xxxx
username=xxxx
password=xxxx
region=yyy
tenant-id=b23efb65b1d44b5abd561511f40c565d
domain-name=foobar

[LoadBalancer]
lb-version=v2
subnet-id=aed26269-cd01-4d4e-b0d8-9ec726c4c2ba
lb-method=ROUND_ROBIN
floating-network-id=56e523e7-76cb-477f-80e4-2dc8cf32e3b4
create-monitor=yes
monitor-delay=10s
monitor-timeout=2000s
monitor-max-retries=3
```
```
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 1
  template:
    metadata:
      labels:
        run: web
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  labels:
    run: web-ext
  name: web-ext
  namespace: default
spec:
  selector:
    run: web
  ports:
  - port: 80
    name: https
    protocol: TCP
    targetPort: 80
  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  labels:
    run: web-int
    floatingPool: a2a84887-4915-42bf-aaff-2b76688a4ec7
  name: web-int
  namespace: default
spec:
  selector:
    run: web
  ports:
  - port: 80
    name: https
    protocol: TCP
    targetPort: 80
  type: LoadBalancer
```
```
% kubectl create -f example.yaml
deployment "nginx-deployment" created
service "web-ext" created
service "web-int" created
% kubectl get svc -o wide
NAME         CLUSTER-IP       EXTERNAL-IP                   PORT(S)        AGE       SELECTOR
kubernetes   10.254.0.1       <none>                        443/TCP        2m        <none>
web-ext      10.254.23.153    192.168.1.57,193.xx.xxx.xxx   80:30151/TCP   52s       run=web
web-int      10.254.128.141   192.168.1.58,10.222.130.80    80:32431/TCP   52s       run=web
```

cc @anguslees @k8s-sig-openstack-feature-requests @dims
2017-08-05 03:22:57 -07:00
xiangpengzhao f003ee9b29 Update OWNERS to correct members' handles. 2017-08-04 15:00:15 +08:00
Jason Zhao 43e606a5da support multiple ec2 ips in aws provider 2017-08-03 15:57:59 -07:00
Kubernetes Submit Queue 7bc1c67685 Merge pull request #50050 from nicksardo/gce-fix-strs
Automatic merge from submit-queue (batch tested with PRs 49916, 50050)

GCE: Fix bug by correctly cast port to string

Code is incorrectly casting a port to a string, causing the diff-expression to always return true. 

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

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

**Release note**:
```release-note
NONE
```
2017-08-02 23:29:53 -07:00
Jesse Haka ef0015a993 add possibility to use multiple floating pools
if not needed here

load network ids from gophercloud api

fix to getnetworkbyname

update godeps, add networks library

fix gofmt and boilerplate

gofmt

use annotations

fix

remove enableflag

add comment to annotationvalue
2017-08-03 08:46:55 +03:00
Kubernetes Submit Queue 82b95c0a4e Merge pull request #49237 from brendandburns/imds2
Automatic merge from submit-queue (batch tested with PRs 49237, 49656, 49980, 49841, 49899)

Improve our Instance Metadata coverage in Azure.
2017-08-02 19:11:09 -07:00
Nick Sardo 6ce095cf2c Correctly cast port to string 2017-08-02 17:03:11 -07:00
Jing Xu 8ffc361564 AttachDisk should not call detach inside of Cinder volume provider
This PR fixes #50038 which removes the detach call inside of AttachDisk.
2017-08-02 14:35:39 -07:00
Balu Dontu f4e39933f6 vSphere Cloud Provider code refactoring 2017-08-02 08:06:09 -07:00
Balu Dontu 210d61fb03 VCLib Package - A common framework using by vsphere cloud provider for managing all vsphere entities 2017-08-02 08:06:09 -07:00
Kubernetes Submit Queue bcc43f8f16 Merge pull request #49908 from freehan/cloud-provider-fix
Automatic merge from submit-queue (batch tested with PRs 49870, 49416, 49872, 49892, 49908)

fix alpha/beta endpoint when api endpoint is specified

fix a bug in alpha/beta compute API endpoint bootstraping when api-endpiont is specified. 

```release-note
None
```
2017-08-01 19:53:06 -07:00
Brendan Burns e03f02a575 metadata improvements. 2017-07-31 23:54:22 +00:00
Minhan Xia a1137f7a1a fix alpha/beta endpoint when api endpoint is specified 2017-07-31 16:37:02 -07:00
Nathan Button 7119a45371 We never want to modify the globally defined SG 2017-07-28 11:03:55 -07:00
Kubernetes Submit Queue ceedc7813c Merge pull request #49167 from nicksardo/gce-static-unit-test
Automatic merge from submit-queue (batch tested with PRs 45813, 49594, 49443, 49167, 47539)

GCE: Adding unit test for ensureStaticIP

**What this PR does / why we need it**:
Entry into unit testing GCE loadbalancer code by testing `ensureStaticIP` which had a bug in 1.7.0.

@bowei @freehan @MrHohn @dnardo @thockin, any thoughts and comments on how we could unit test LB code moving forward? I think there are many areas we can split functions into smaller ones for easier testing - firewallNeedsUpdate being an example of that. However, it seems to me that we still need to mock our GCP calls for some functions that heavily revolve around API calls.  A dream goal would be to have a unit test that can call EnsureLoadBalancer.  Now that we have shared resources between different services and ingresses (firewalls, instance groups, [future features]), being able to setup different scenarios without depending on E2E tests would be awesome. However, I'm not sure how reachable that goal would be. 

Most importantly, let's not make things worse. If you have advice on anti-patterns to avoid, please speak up.

```release-note
NONE
```
2017-07-28 07:22:39 -07:00
Kubernetes Submit Queue 38b1a68825 Merge pull request #49594 from nicksardo/gceconf-allow-unknown
Automatic merge from submit-queue (batch tested with PRs 45813, 49594, 49443, 49167, 47539)

GCE: Update vendor of gcfg and filter config parsing errors

**What this PR does / why we need it**:
To utilize new function `FatalOnly` which filters "programmer errors"

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

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

**Release note**:
```release-note
NONE
```
2017-07-28 07:22:34 -07:00
Kubernetes Submit Queue ab3d36b91c Merge pull request #48989 from nicksardo/gce-api-changes
Automatic merge from submit-queue (batch tested with PRs 49081, 49318, 49219, 48989, 48486)

GCE: Remove resource Get function calls from Create functions

**What this PR does / why we need it**:
Consistency. This PR removes the GetXXX from the CreateXXX functions of the GCE cloudprovider. Consumers (specifically the ingress controller) will need to call the Get resource funcs separately when updating their vendored versions. 

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

/assign @bowei
2017-07-28 04:03:42 -07:00
Kubernetes Submit Queue c9842a2145 Merge pull request #49318 from dims/bail-on-block-storage-api-detection
Automatic merge from submit-queue (batch tested with PRs 49081, 49318, 49219, 48989, 48486)

Better message if we dont find appropriate BlockStorage API

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

With latest devstack, v1 and v2 are DEPRECATED and v3 is marked
as CURRENT. So we fail to attach the disk, the error message is
shown when one does "kubectl describe pod" but the operator has
to dig into find the problem.

So log a better message if we can't find the appropriate version
of the API that we support with an explicit error message that
the operator can see how to fix the situation.

Note support for v3 block storage API is being added to gophercloud
and will take a bit of time before we can support it.


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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-28 04:03:38 -07:00
Kubernetes Submit Queue 9b8bc25838 Merge pull request #49081 from brendandburns/imds
Automatic merge from submit-queue (batch tested with PRs 49081, 49318, 49219, 48989, 48486)

Fix instance metadata service URL.

Small fix @colemickens @jackfrancis
2017-07-28 04:03:36 -07:00
FengyunPan c6489da70d Fix the matching rule of instance ProviderID
Url.Parse() can't parse ProviderID which contains ':///'.
This PR use regexp to match ProviderID.
2017-07-28 17:38:50 +08:00
Kubernetes Submit Queue b751bdbdb0 Merge pull request #49595 from freehan/cloud-provider-fix
Automatic merge from submit-queue (batch tested with PRs 49238, 49595, 43494, 47897, 48905)

bug fixes in GCE cloud provider

fixes: #49657 #49150
 

```release-note
NONE
```
2017-07-28 02:12:54 -07:00
Euan Kemp a5d01a3539 cloudprovider/photon: remove unneeded bash exec 2017-07-27 12:59:04 -07:00
Sylvain Rabot 499d6c3473 Azure: Allow VNet to be in a separate Resource Group
Define a new config VnetResourceGroup in order to be able to use a VNet
which is not in the same resource group as kubernetes.

Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
2017-07-27 18:41:09 +02:00
divyenpatel 411a1a89d7 reverting deprecatin of vcenter port 2017-07-27 06:47:45 -07:00
Nick Sardo e71c51117a Adding unit test for ensureStaticIP 2017-07-26 13:24:08 -07:00
Minhan Xia 0c447c59db Fixes bug where the network used in the cloud provider was not taken from the /etc/gce.conf configuration.
This can result in firewalls, routes and other network resources being created on the wrong network.
2017-07-26 13:01:44 -07:00
Nick Sardo 3f01685943 Unit test unknown value in config 2017-07-26 12:22:37 -07:00
Kubernetes Submit Queue 0940a25440 Merge pull request #48612 from derekwaynecarr/aws-tags
Automatic merge from submit-queue

Warn if aws has no cluster id provided

**What this PR does / why we need it**:
we info log a message when no cluster id is provided that should be a warning given its impact.

fixes https://github.com/kubernetes/kubernetes/issues/49568

**Release note**:
```release-note
NONE
```
2017-07-26 09:40:47 -07:00
Nick Sardo cde038b9be Wrap gce.conf parse with FatalOnly error filter 2017-07-26 08:52:55 -07:00
Davanum Srinivas 14e014ac06 Better message if we dont find appropriate BlockStorage API
With latest devstack, v1 and v2 are DEPRECATED and v3 is marked
as CURRENT. So we fail to attach the disk, the error message is
shown when one does "kubectl describe pod" but the operator has
to dig into find the problem.

So log a better message if we can't find the appropriate version
of the API that we support with an explicit error message that
the operator can see how to fix the situation.

Note support for v3 block storage API is being added to gophercloud
and will take a bit of time before we can support it.
2017-07-26 06:30:30 -04:00
Kubernetes Submit Queue 4560beb28f Merge pull request #49299 from dims/delay-looking-for-instance-id
Automatic merge from submit-queue (batch tested with PRs 49420, 49296, 49299, 49371, 46514)

Avoid looking up instance id until we need it

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

currently kube-controller-manager cannot run outside of a vm started
by openstack (with --cloud-provider=openstack params). We try to read
the instance id from the metadata provider or the config drive or the
file location only when we really need it. In the normal scenario, the
controller-manager uses the node name to get the instance id.
41541910e1/pkg/volume/cinder/attacher.go (L149)

The localInstanceID is currently used only in the test case, so let
us not read it until it is really needed.

So let's try to find the instance-id only when we need it.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-21 22:23:19 -07:00
Kubernetes Submit Queue e6a4b5311c Merge pull request #49333 from nicksardo/gce-fix-subnetlogic
Automatic merge from submit-queue (batch tested with PRs 49222, 49333, 48708, 49337)

GCE: Fix network/subnet url logic

Split if conditions: fixes #48521

/assign @bowei 

```release-note
NONE
```
2017-07-20 23:01:18 -07:00
Kubernetes Submit Queue 384b96574d Merge pull request #49330 from MrHohn/bump-gce-minNodesHealthCheckVersion
Automatic merge from submit-queue

Bump up gce minNodesHealthCheckVersion due to known issues

**What this PR does / why we need it**: There are some known issues in previous 1.7 versions causing kube-proxy not correctly responding healthz traffic.

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

**Special notes for your reviewer**:
/assign @nicksardo @freehan 
cc @bowei @thockin 

**Release note**:

```release-note
GCE Cloud Provider: New created LoadBalancer type Service will have health checks for nodes by default if all nodes have version >= v1.7.2.
```
2017-07-20 21:03:36 -07:00
Zihong Zheng 8557f7df6d Bump up minNodesHealthCheckVersion in gce_healthcheck due to known issues 2017-07-20 16:04:40 -07:00
Nick Sardo 3ee822de67 Fix network/subnet url logic 2017-07-20 15:41:34 -07:00
Kubernetes Submit Queue feed4aa12a Merge pull request #49234 from mengqiy/master
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

Move util/exec to vendor

Move util/exec to vendor.
Update import paths.
Update godep

Part of #48209

Associate PR against `k8s.io/utils` repo: https://github.com/kubernetes/utils/pull/5

```release-note
NONE
```

/assign @apelisse
2017-07-20 15:08:22 -07:00
Kubernetes Submit Queue 9e56e58647 Merge pull request #47177 from rrati/aws-additional-logging
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

Added logging to AWS api calls. #46969

Additionally logging of when AWS API calls start and end to help diagnose problems with kubelet on cloud provider nodes not reporting node status periodically.  There's some inconsistency in logging around this PR we should discuss.

IMO, the API logging should be at a higher level than most other types of logging as you would probably only want it in limited instances.  For most cases that is easy enough to do, but there are some calls which have some logging around them already, namely in the instance groups.  My preference would be to keep the existing logging as it and just add the new API logs around the API call.
2017-07-20 15:08:20 -07:00
Davanum Srinivas 6139f9ab89 Avoid looking up instance id until we need it
currently kube-controller-manager cannot run outside of a vm started
by openstack (with --cloud-provider=openstack params). We try to read
the instance id from the metadata provider or the config drive or the
file location only when we really need it. In the normal scenario, the
controller-manager uses the node name to get the instance id.
41541910e1/pkg/volume/cinder/attacher.go (L149)

The localInstanceID is currently used only in the test case, so let
us not read it until it is really needed.
2017-07-20 14:40:10 -04:00
ymqytw 9b393a83d4 update godep 2017-07-20 11:03:49 -07:00
ymqytw 3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Kubernetes Submit Queue 3660ff466f Merge pull request #49235 from dims/allow-cinder-scenarios-without-load-balancer
Automatic merge from submit-queue (batch tested with PRs 49276, 49235)

Don't fail fast if LoadBalancer section is missing

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

We should allow scenarios where cinder can be used even if the
operator does not want to use the openstack load balancer. So
let's warn in the beginning if subnet-id is missing but fail only
if they try to use the load balancer

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-20 08:18:09 -07:00
Davanum Srinivas 8fd21d67a8 Don't fail fast if LoadBalancer section is missing
We should allow scenarios where cinder can be used even if the
operator does not want to use the openstack load balancer. So
let's warn in the beginning if subnet-id is missing but fail only
if they try to use the load balancer
2017-07-20 07:42:28 -04:00
Di Xu 2cddfd0db9 fix bug when azure cloud provider configuration file is not specified 2017-07-20 17:29:09 +08:00
Kubernetes Submit Queue acc19cafa4 Merge pull request #49231 from dims/tolerate-flavor-info-keys
Automatic merge from submit-queue

Tolerate Flavor information for computing instance type

**What this PR does / why we need it**:
Current devstack seems to return "id", and an upcoming change using
nova's microversion will be returning "original_name":
https://blueprints.launchpad.net/nova/+spec/instance-flavor-api

So let's just inspect what is present and use that to figure out
the instance type.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-20 00:33:46 -07:00
Kubernetes Submit Queue de71cc50d5 Merge pull request #49261 from heidecke/on-premises
Automatic merge from submit-queue

Fix on-premises term in error string and comments for aws provider

**What this PR does / why we need it**: fix for correct terminology of "on-premises" over "on-premise"

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

**Special notes for your reviewer**: Updated error string while doing a scrub for the incorrect term in the docs (kubernetes/kubernetes.github.io#4413).

**Release note**:

```release-note
NONE
```
2017-07-19 23:03:26 -07:00
Kubernetes Submit Queue ea18935670 Merge pull request #45540 from edevil/azure_extra_logging
Automatic merge from submit-queue (batch tested with PRs 49083, 45540, 46862)

Add extra logging to azure API get calls

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

This PR adds extra logging for external calls to the Azure API, specifically get calls.

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

This will help troubleshoot problems arising from the usage of this cloudprovider. For example, it looks like #43516 is caused by a call to the cloudprovider taking too much time.
2017-07-19 21:18:25 -07:00
Luke Heidecke c8b6924424 Fix on-premises term in error string and comments 2017-07-20 13:04:33 +09:00
Kubernetes Submit Queue ecadada7ef Merge pull request #48967 from jackfrancis/azure-lb-backoff
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

additional backoff in azure cloudprovider

Fixes #48971

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

We want to be able to opt in to backoff retry logic for kubelet-originating request behavior: node IP address resolution and node load balancer pool membership enforcement.

**Special notes for your reviewer**:

The use-case for this is azure cloudprovider clusters with large node counts, especially during cluster installation, or other scenarios when lots of nodes come online at once and attempt to register all resources with the backend API. To allow clusters at scale more control over the API request rate in-cluster, backoff config has the ability to meaningful slow down this rate, when appropriate.

**Release note**:

```additional backoff in azure cloudprovider
```
2017-07-19 20:05:34 -07:00
Davanum Srinivas c197e6238d Tolerate Flavor information for computing instance type
Current devstack seems to return "id", and an upcoming change using
nova's microversion will be returning "original_name":
https://blueprints.launchpad.net/nova/+spec/instance-flavor-api

So let's just inspect what is present and use that to figure out
the instance type.
2017-07-19 16:06:53 -04:00
Brendan Burns 38b1b74f82 Fix up imds, also refactor for better testing. 2017-07-19 12:53:08 -07:00
Kubernetes Submit Queue a0e7114ab3 Merge pull request #48702 from FengyunPan/cloudprovider-rackspace
Automatic merge from submit-queue (batch tested with PRs 48702, 48965, 48740, 48974, 48232)

Rackspace for cloud-controller-manager

This implements the NodeAddressesByProviderID and InstanceTypeByProviderID
methods used by the cloud-controller-manager to the RackSpace provider.
The instance type returned is the flavor name, for consistency
InstanceType has been implemented too returning the same value.

This is part of #47257 cc @wlan0

**Release note**:
```release-note
NONE
```
2017-07-18 20:06:14 -07:00
André Cruz 4071a36c12 Add extra logging to azure API calls 2017-07-18 14:40:28 +01:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Nick Sardo 9b29f42fc5 Further removal of Gets from Creates 2017-07-15 19:41:21 -07:00
Robert Rati 92f030ca24 Added logging to AWS api calls. #46969 2017-07-14 21:37:05 -04:00
Jack Francis f76ef29512 backing off az.getIPForMachine in az.NodeAddresses
also rate limiting the call to az.getVirtualMachine inside az.getIPForMachine
2017-07-14 17:13:40 -07:00
Kubernetes Submit Queue 8c8f562204 Merge pull request #48872 from FengyunPan/fix-order
Automatic merge from submit-queue (batch tested with PRs 48890, 46893, 48872, 48896)

Fix the order of deletion

1. EnsureLoadBalancer can't delete pool without deleting members,
   just let EnsureLoadBalancerDeleted do it.
2. Add some friendly error message

**Release note**:
```release-note
NONE
```
2017-07-14 16:49:53 -07:00
Jack Francis 2525ef9983 VirtualMachinesClient.Get backoff in lb pool logic
EnsureHostInPool() submits a GET to azure API for VM info. We’re seeing this on agent node kubelets and would like to enable configurable backoff engagement for 4xx responses to be able to slow down the rate of reconciliation, when appropriate.
2017-07-14 15:16:47 -07:00
Kubernetes Submit Queue df47592d5a Merge pull request #48854 from colemickens/msi
Automatic merge from submit-queue (batch tested with PRs 47066, 48892, 48933, 48854, 48894)

azure: msi: add managed identity field, logic

**What this PR does / why we need it**: Enables managed service identity support for the Azure cloudprovider. "Managed Service Identity" allows us to ask the Azure Compute infra to provision an identity for the VM. Users can then retrieve the identity and assign it RBAC permissions to talk to Azure ARM APIs for the purpose of the cloudprovider needs.

Per the commit text:
```
The azure cloudprovider will now use the Managed Service Identity
to retrieve access tokens for the Azure ARM APIs, rather than
requiring hard-coded, user-specified credentials.
```

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

**Special notes for your reviewer**: none

**Release note**:

```release-note
azure: support retrieving access tokens via managed identity extension
```

cc: @brendandburns @jdumars @anhowe
2017-07-14 12:50:55 -07:00
Kubernetes Submit Queue 9e97b5249b Merge pull request #46360 from khenidak/azure-pd-final
Automatic merge from submit-queue

Azure PD (Managed/Blob)

This is exactly the same code as this [PR](https://github.com/kubernetes/kubernetes/pull/41950). It has a clean set of generated items. We created a separate PR to accelerate the accept/merge the PR

CC @colemickens 
CC @brendandburns 

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

1. Adds K8S support for Azure Managed Disks. 
2. Adds support for dedicated blob disks (1:1 to storage account) in addition to shared blob disks (n:1 to storage account). 
3. Automatically manages the underlying storage accounts. New storage accounts are created at 50% utilization. Max is 100 disks, 60 disks per storage account.    
2. Addresses the current issues with Blob Disks:
..* Significantly faster attach process. Disks are now usually available for pods on nodes under 30 sec if formatted, under a min if not formatted. 
..* Adds support to move disks between nodes.
..* Adds consistent attach/detach behavior, checks if the disk is leased/attached on a different node before attempting to attach to target nodes.
..* Fixes a random hang behavior on Azure VMs during mount/format (for both blob + managed disks).
..* Fixes a potential conflict by avoiding the use of disk names for mount paths. The new plugin uses hashed disk uri for mount path.  

The existing AzureDisk is used as is. Additional "kind" property was added  allowing the user to decide if the pd will be shared, dedicated or managed (Azure Managed Disks are used).

Due to the change in mounting paths, existing PDs need to be recreated as PV or PVCs on the new plugin.
2017-07-14 09:57:51 -07:00
Khaled Henidak & Andy Zhang 677e593d86 Add Azure managed disk support 2017-07-14 14:09:44 +08:00
Cole Mickens 8f55afd0cb azure: refactor azure.go to make auth reusable 2017-07-13 14:27:37 -07:00
Cole Mickens 4521c2312c azure: msi: add managed identity field, logic
The azure cloudprovider will now use the Managed Service Identity
to retrieve access tokens for the Azure ARM APIs, rather than
requiring hard-coded, user-specified credentials.
2017-07-13 14:27:37 -07:00
Minhan Xia a471140e13 fix gce cloud provider projects api 2017-07-13 14:00:02 -07:00
gmarek afe1a2c71b Revert "Merge pull request #48560 from nicksardo/gce-network-project"
This reverts commit d4881dd491, reversing
changes made to b5c4346130.
2017-07-13 18:34:24 +02:00
FengyunPan a1be23679c Fix the order of deletion
1. EnsureLoadBalancer can't delete pool without deleting members,
   just let EnsureLoadBalancerDeleted do it.
2. Add some friendly error message
2017-07-13 21:10:23 +08:00
Kubernetes Submit Queue 74f1943774 Merge pull request #48849 from nicksardo/gce-panic-fix
Automatic merge from submit-queue (batch tested with PRs 48555, 48849)

GCE: Fix panic when service loadbalancer has static IP address

Fixes #48848 

```release-note
Fix service controller crash loop when Service with GCP LoadBalancer uses static IP (#48848, @nicksardo)
```
2017-07-12 23:59:03 -07:00
Nick Sardo 98368d974e Remove address getter from CreateAddress(Region and Global) 2017-07-12 20:06:18 -07:00
Kubernetes Submit Queue 3c080e83c7 Merge pull request #48642 from freehan/gce-api-endpint
Automatic merge from submit-queue

Support GCE alpha/beta api endpoint override

fixes: https://github.com/kubernetes/kubernetes/issues/48568
2017-07-12 18:23:37 -07:00
Kubernetes Submit Queue 30e865e456 Merge pull request #48829 from vmware/vsphere-ByProviderID
Automatic merge from submit-queue (batch tested with PRs 48781, 48817, 48830, 48829, 48053)

vSphere for cloud-controller-manager

**What this PR does / why we need it**:
This is to implement the `NodeAddressesByProviderID` and `InstanceTypeByProviderID` methods for cloud-controller-manager for vSphere cloud provider.

Currently vSphere cloud provider only supports VMs in the same folder.
Thus `NodeAddressesByProviderID` is similar to `NodeAddresses` with a simple ProviderID to NodeName translation.

`InstanceTypeByProviderID`  returns nil as same as `InstanceType`.

**Which issue this PR fixes**
Part of Issue https://github.com/kubernetes/kubernetes/issues/47257

**Release note**:
```NONE
```
2017-07-12 15:11:14 -07:00
Minhan Xia 3e8b4a27c4 use overrided api endpoint in gce cloud provider 2017-07-12 15:10:13 -07:00
Kubernetes Submit Queue d230956280 Merge pull request #48243 from brendandburns/imds
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Add initial support for the Azure instance metadata service.

Part of fixing #46632

@colemickens @rootfs @jdumars @kris-nova
2017-07-12 14:08:13 -07:00
Kubernetes Submit Queue 5ed8734649 Merge pull request #48801 from FengyunPan/fix-panic
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Fix panic of DeleteRoute()

Fix #48800
It should be 'addr_pairs', not 'routes'.

**Release note**:
```release-note
NONE
```
2017-07-12 14:08:07 -07:00
Minhan Xia 811597926a support GCE alpha beta API override 2017-07-12 13:46:52 -07:00
Kubernetes Submit Queue aeb326e9bc Merge pull request #48704 from FengyunPan/remove-dead-code
Automatic merge from submit-queue

Remove dead code for OpenStack provider

**Release note**:
```release-note
NONE
```
2017-07-12 13:06:04 -07:00
Miao Luo d327ac6c76 vSphere for cloud-controller-manager
Implement NodeAddressesByProviderID and InstanceTypeByProviderID for vsphere cloud provider.
2017-07-12 11:35:16 -07:00
Brendan Burns 29a0c6f56a Code updates for new SDK. 2017-07-12 06:09:31 -07:00
Kubernetes Submit Queue 3ade1a155d Merge pull request #47593 from fgimenez/cloudprovider-openstack-byid
Automatic merge from submit-queue (batch tested with PRs 47948, 48631, 48693, 48549, 47593)

OpenStack for cloud-controller-manager

**What this PR does / why we need it**:
This implements the `NodeAddressesByProviderID` and `InstanceTypeByProviderID` methods used by the cloud-controller-manager to the OpenStack provider. The instance type returned is the flavor name, for consistency `InstanceType` has been implemented too returning the same value.

```release-note
NONE
```

This is part of #47257 cc @wlan0
2017-07-12 04:04:00 -07:00
FengyunPan cd29146317 Fix panic of DeleteRoute()
Fix #48800
It should be 'addr_pairs', not 'routes'.
2017-07-12 17:28:58 +08:00
Kubernetes Submit Queue a3430ad0c3 Merge pull request #47232 from gyliu513/remove-mesos-cp
Automatic merge from submit-queue

Removed mesos as cloud provider from Kubernetes.

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Move Mesos Cloud Provider out of Kubernetes Repo
```
2017-07-12 00:08:20 -07:00
FengyunPan 703b3761fe Remove dead code for OpenStack provider 2017-07-10 20:59:39 +08:00
FengyunPan 0154bd279d Rackspace for cloud-controller-manager
This implements the NodeAddressesByProviderID and InstanceTypeByProviderID
methods used by the cloud-controller-manager to the RackSpace provider.
The instance type returned is the flavor name, for consistency
InstanceType has been implemented too returning the same value.

This is part of #47257 cc @wlan0
2017-07-10 20:43:07 +08:00
Cao Shufeng 0c577c47d5 Use glog.*f when a format string is passed
ref:
https://godoc.org/github.com/golang/glog

I use the following commands to search all the invalid usage:
$ grep "glog.Warning(" * -r | grep %
$ grep "glog.Info(" * -r | grep %
$ grep "glog.Error(" * -r | grep %
$ grep ").Info(" * -r | grep % | grep "glog.V("
2017-07-10 19:04:03 +08:00
Guangya Liu 498b034492 Removed mesos as cloud provider from Kubernetes. 2017-07-09 21:54:57 -04:00
Kubernetes Submit Queue d4881dd491 Merge pull request #48560 from nicksardo/gce-network-project
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

GCE: Use network project id for firewall/route mgmt and zone listing

- Introduces a new environment variable for plumbing the network project id which will be used for firewall and route management. fixes #48515
- onXPN is determined by metadata if config is not specified
- Split `if` conditions: fixes #48521
- Remove `getNetworkNameViaAPICall` which was used as a last resort for the `networkURL` (if empty) which was previously filled with the metadata network project & name.

**Release note**:
```release-note
NONE
```
2017-07-08 07:09:36 -07:00
Kubernetes Submit Queue 9fcb8b847e Merge pull request #48336 from FengyunPan/fix-delete-empty-monitors
Automatic merge from submit-queue

Fix deleting empty monitors

Fix #48094
When create-monitor of cloud-config is false, pool has not monitor
and can not delete empty monitor.

**Release note**:
```release-note
NONE
```
2017-07-08 06:02:45 -07:00
Kubernetes Submit Queue 954c356dc5 Merge pull request #48348 from FengyunPan/check-openstack-Opts
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

Check opts of cloud config file

Fix #48347
Check opts when register OpenStack CloudProvider rather than
returning error when use opts to create/use cloud resource.

**Release note**:
```release-note
NONE
```
2017-07-07 23:53:40 -07:00
Derek Carr b6fabe5b9e Warn if aws has no cluster id provided 2017-07-07 11:57:20 -04:00
FengyunPan d2ebb60438 Check opts of cloud config file
Fix #48347
Check opts when register OpenStack CloudProvider rather than
returning error when use opts to create/use cloud resource.
2017-07-07 17:05:21 +08:00
Nick Sardo 62d13f1379 Use API that utilizes networkProjectId 2017-07-06 18:13:02 -07:00
Nick Sardo 06e328627c Use network project id for firewall/route mgmt and zone listing 2017-07-06 16:58:27 -07:00
Brendan Burns 7644c6afc6 Add initial support for the Azure instance metadata service. 2017-07-06 06:56:39 -07:00
Davanum Srinivas 927a4a0a68 Volunteer to help with OpenStack provider reviews
I'd like to help with keeping the OpenStack cloud provider up-to-date
2017-07-06 08:43:43 -04:00
Kubernetes Submit Queue 9dd6a935fc Merge pull request #48501 from FengyunPan/enable-ServiceAffinity
Automatic merge from submit-queue

Enable Service Affinity for OpenStack cloudprovider

Fix issue: #48500
Kubernetes's OpenStack cloudprovider can't set persistence to "SOURCE_IP"

**Release note**:
```release-note
NONE
```
2017-07-05 20:45:26 -07:00
FengyunPan 6ee05783c2 Enable Service Affinity for OpenStack cloudprovider.
Fix issue: #48500
Kubernetes's OpenStack cloudprovider can't set LB's persistence
to "SOURCE_IP".
2017-07-06 09:25:31 +08:00
Kubernetes Submit Queue d816555e44 Merge pull request #48121 from sakshamsharma/add-kms-dep
Automatic merge from submit-queue (batch tested with PRs 48292, 48121)

Add Google cloudkms dependency, add cloudkms service to GCE cloud provider

Required to introduce a Google KMS based envelope encryption, which shall allow encrypting secrets at rest using KEK-DEK scheme.

The above requires KMS API to create/delete KeyRings and CryptoKeys, and Encrypt/Decrypt data.

Should target release 1.8

@jcbsmpsn 

Update: It appears that Godep only allows dependencies which are in use. We may have to modify this PR to include some Google KMS code.

Progresses #48522
2017-07-05 17:41:40 -07:00
Cosmin Cojocar afafb3f231 Use the azure certificate password when decoding the certificate 2017-07-04 08:56:40 +02:00
Kubernetes Submit Queue 8f9c57ca53 Merge pull request #47919 from rrati/aws-handle-logs-with-return-keys
Automatic merge from submit-queue

Use %q formatter for error messages from the AWS SDK. #47789

Error messages from the AWS SDK can have return keys in them, so use %q formatter for those messages.
2017-07-03 09:41:50 -07:00
Kubernetes Submit Queue c0337c92cc Merge pull request #47881 from cadmuxe/endpoint
Automatic merge from submit-queue (batch tested with PRs 47918, 47964, 48151, 47881, 48299)

Add ApiEndpoint support to GCE config.

**What this PR does / why we need it**:
Add the ability to change ApiEndpoint  for GCE.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
None
```
2017-06-30 18:42:40 -07:00
FengyunPan 643afd3ffc Fix deleting empty monitors
Fix #48094
When create-monitor of cloud-config is false, pool has not monitor
and can not delete empty monitor.
2017-06-30 23:46:36 +08:00
Koonwah Chen 0db5b37165 testing fixed
hack/verify-gofmt.sh and hack/verify-flags-underscore.py
2017-06-29 10:42:29 -07:00
Kubernetes Submit Queue db46e4f8e6 Merge pull request #47286 from cosmincojocar/client_cert_azure_cloud_provider
Automatic merge from submit-queue (batch tested with PRs 47286, 47729)

Add client certificate authentication to Azure cloud provider

This adds support for client cert authentication in Azure cloud provider. The certificate can be provided in PKCS #12 format with password protection. Not that this authentication will be active only when no client secret is configured.

cc @brendandburns @colemickens
2017-06-28 23:14:29 -07:00
Saksham Sharma 57e8461662 Add Google cloudkms service to gce cloud provider 2017-06-28 16:56:01 -07:00
Kubernetes Submit Queue a7f16b553b Merge pull request #48003 from MrHohn/gce-xlb-cleanup
Automatic merge from submit-queue (batch tested with PRs 48139, 48042, 47645, 48054, 48003)

Pipe clusterID into gce_loadbalancer_external.go

**What this PR does / why we need it**: Small cleanup for GCE ELB codes.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-27 14:08:21 -07:00
Kubernetes Submit Queue 7dfa61a2d9 Merge pull request #47947 from zouyee/opa
Automatic merge from submit-queue (batch tested with PRs 47776, 46220, 46878, 47942, 47947)

fix comment mistake

fix comment mistake


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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-24 04:15:55 -07:00
Kubernetes Submit Queue e22215d38e Merge pull request #47942 from zouyee/op
Automatic merge from submit-queue (batch tested with PRs 47776, 46220, 46878, 47942, 47947)

update openstack metadata-service url

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-24 04:15:54 -07:00
Zihong Zheng baca8a1490 Pipe clusterID into gce_loadbalancer_external.go 2017-06-23 15:54:04 -07:00
Kubernetes Submit Queue 72cb080c87 Merge pull request #46181 from FengyunPan/ignore-LBnotfound
Automatic merge from submit-queue

Ignore ErrNotFound when delete LB resources

IsNotFound error is fine since that means the object is
deleted already, so let's check it before return error.
2017-06-23 09:35:11 -07:00
Robert Rati d6a5175c05 Use %q formatter for error messages from the AWS SDK. #47789 2017-06-23 10:02:21 -04:00
Cosmin Cojocar 0235cb9e3c Fix dependencies order after rebase 2017-06-23 13:20:10 +02:00
Kubernetes Submit Queue aaa5b2b642 Merge pull request #47575 from justinsb/fix_36902
Automatic merge from submit-queue (batch tested with PRs 47915, 47856, 44086, 47575, 47475)

AWS: Fix suspicious loop comparing permissions

Because we only ever call it with a single UserId/GroupId, this would
not have been a problem in practice, but this fixes the code.

Fix #36902 

```release-note
NONE
```
2017-06-23 04:06:25 -07:00
Cosmin Cojocar fcdceb2e50 Add the pcks12 package to the build of Azure cloud provider 2017-06-23 12:19:56 +02:00
Cosmin Cojocar 2c8ec115db Fix tests after rebasing 2017-06-23 12:17:17 +02:00
Cosmin Cojocar 5462d06ce3 Add client cert authentication for Azure cloud provider 2017-06-23 12:17:17 +02:00
Federico Gimenez 37951c336b OpenStack for cloud-controller-manager 2017-06-23 08:53:19 +02:00
zouyee 5e56e5294a fix comment mistake 2017-06-23 14:06:46 +08:00
Kubernetes Submit Queue be0b045072 Merge pull request #47401 from justinsb/fix_39374
Automatic merge from submit-queue (batch tested with PRs 47922, 47195, 47241, 47095, 47401)

AWS: Set CredentialsChainVerboseErrors

This avoids a rather confusing error message.

Fix #39374

```release-note
NONE
```
2017-06-22 21:33:34 -07:00
zouyee 39552417fe update openstack metadata-service url 2017-06-23 10:50:20 +08:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Koonwah Chen 65b2f71ee7 Add ApiEndpoint support to GCE config. 2017-06-21 15:27:10 -07:00
Kubernetes Submit Queue 0f0e017ade Merge pull request #45473 from karataliu/AzureInternalLoadBalancerE2E
Automatic merge from submit-queue

Add E2E tests for Azure internal loadbalancer support, fix an issue for public IP resource deletion.

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

- Add E2E tests for Azure internal loadbalancer support: https://github.com/kubernetes/kubernetes/pull/43510
- Fix an issue that public IP resource not get deleted when switching from external loadbalancer to internal static loadbalancer.

**Special notes for your reviewer**:

1.  Add new Azure resource tag to Public IP resources to indicate kubernetes managed resources.
   Currently we determine whether the public IP resource should be deleted by looking at LoadBalancerIp property on spec. In the scenario 'Switching from external loadbalancer to internal loadbalancer with static IP', that value might have been updated for internal loadbalancer. So here we're to add an explicit tag for kubernetes managed resources.

2. Merge cleanupPublicIP logic into cleanupLoadBalancer

**Release note**:
NONE

CC @brendandburns @colemickens
2017-06-21 11:41:22 -07:00
Kubernetes Submit Queue 1499b6bddc Merge pull request #45268 from redbaron/aws-elb-attach-sgs
Automatic merge from submit-queue

New annotation to add existing Security Groups to ELBs created by AWS cloudprovider

**What this PR does / why we need it**:
When K8S cluster is deployed in existing VPC there might be a need to attach extra SecurityGroups to ELB created by AWS cloudprovider. Example of it can be cases, where such Security Groups are maintained by another team.

**Special notes for your reviewer**:
For tests to pass depends on https://github.com/kubernetes/kubernetes/pull/45168  and therefore includes it

**Release note**:
```release-note
New 'service.beta.kubernetes.io/aws-load-balancer-extra-security-groups' Service annotation to specify extra Security Groups to be added to ELB created by AWS cloudprovider
```
2017-06-20 18:06:29 -07:00
Kubernetes Submit Queue 5780cd06d1 Merge pull request #47572 from justinsb/fix_47524
Automatic merge from submit-queue

AWS: Remove blackhole routes in our managed range

Blackhole routes otherwise acccumulate unboundedly.  We also are careful
to ensure that we do so only within the managed range, which requires
enlisting the help of the routecontroller.

Fix #47524

```release-note
AWS: clean up blackhole routes when using kubenet
```
2017-06-20 17:00:30 -07:00
Kubernetes Submit Queue 7831a5426f Merge pull request #47605 from brendandburns/container
Automatic merge from submit-queue (batch tested with PRs 47562, 47605)

Change Container permissions to Private for provisioned Azure Volumes

@rootfs @philips #47611
2017-06-15 21:54:30 -07:00
Brendan Burns f07ac3efc6 Change Container permissions to Private. 2017-06-16 01:40:10 +00:00
Justin Santa Barbara 737607ba6b AWS: Fix suspicious loop comparing permissions
Because we only ever call it with a single UserId/GroupId, this would
not have been a problem in practice, but this fixes the code.

Fix #36902
2017-06-15 09:20:41 -04:00
Justin Santa Barbara 3d2b71b78f AWS: Maintain a cache of all instances for ELB
We maintain a cache of all instances, and we invalidate the cache
whenever we see a new instance.  For ELBs that should be sufficient,
because our usage is limited to instance ids and security groups, which
should not change.

Fix #45050
2017-06-14 23:39:18 -04:00
Kubernetes Submit Queue 8e4ec18adf Merge pull request #47516 from gnufied/fix-filter-limit-aws
Automatic merge from submit-queue (batch tested with PRs 47510, 47516, 47482, 47521, 47537)

Batch AWS getInstancesByNodeNames calls with FilterNodeLimit

We are going to limit the getInstancesByNodeNames call with a batch
size of 150.

Fixes - #47271

```release-note
AWS: Batch DescribeInstance calls with nodeNames to 150 limit, to stay within AWS filter limits.
```
2017-06-14 20:32:45 -07:00
Justin Santa Barbara 11f8886f12 AWS: Remove blackhole routes in our managed range
Blackhole routes otherwise acccumulate unboundedly.  We also are careful
to ensure that we do so only within the managed range, which requires
enlisting the help of the routecontroller.

Fix #47524
2017-06-14 23:02:55 -04:00
Dong Liu f8ae27db57 Add E2E tests for Azure internal loadbalancer support, fix an issue for public IP resource deletion. 2017-06-15 10:52:18 +08:00
Kubernetes Submit Queue b361814e8e Merge pull request #47411 from justinsb/fix_47409
Automatic merge from submit-queue (batch tested with PRs 47470, 47260, 47411, 46852, 46135)

AWS: Remove getInstancesByRegex (dead code)

Fix #47409

```release-note
NONE
```
2017-06-14 12:52:21 -07:00
Kubernetes Submit Queue 6c38d009ce Merge pull request #47406 from justinsb/fix_47404
Automatic merge from submit-queue

AWS: Process disk attachments even with duplicate NodeNames

Fix #47404


```release-note
AWS: Process disk attachments even with duplicate NodeNames
```
2017-06-14 10:21:20 -07:00
Hemant Kumar ffa622f9c7 Batch AWS getInstancesByNodeNames calls with FilterNodeLimit
We are going to limit the getInstancesByNodeNames call with a batch
size of 150
2017-06-14 10:46:46 -04:00
Kubernetes Submit Queue f2ccb3594f Merge pull request #47459 from nicksardo/gce-ilb-fixes
Automatic merge from submit-queue (batch tested with PRs 47302, 47389, 47402, 47468, 47459)

[GCE] Fix ILB sharing and GC 

Fixes #47092 

- Users must opt-in for sharing backend services (alpha feature - may be removed in future release)
- Shared backend services use a hash for determining similarity via settings (so far, only sessionaffinity) (again, this may be removed)
- Move resource cleanup to after the ILB setup.

/assign @bowei 

**Release note**:
```release-note
NONE
```
2017-06-13 23:37:54 -07:00
Nick Sardo efc2989dde Final fixes 2017-06-13 15:39:41 -07:00
Nick Sardo 3ea26e7436 Annotation for opting into backend sharing; Use hash suffix for sharing; Fix resource GC 2017-06-13 13:22:12 -07:00