Commit Graph

1218 Commits (976cf098dd44beafc2a7759664fb5371a0597ab8)

Author SHA1 Message Date
David Zhu d33274ce64 Updated pd.go tests to use GCE API instead of GCloud Commands 2017-09-13 11:55:18 -07:00
Erik McClenney b6f23b1eed Add some comments to the version and user-agent changes. 2017-09-13 11:16:36 -07:00
Kubernetes Submit Queue 1f072babe8 Merge pull request #52169 from dims/remove-links-to-specific-cloud-providers
Automatic merge from submit-queue (batch tested with PRs 52007, 52196, 52169, 52263, 52291)

Remove links to GCE/AWS cloud providers from PersistentVolumeCo…

…ntroller




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

We should be able to build a cloud-controller-manager without having to
pull in code specific to GCE and AWS clouds. Note that this is a tactical
fix for now, we should have allow PVLabeler to be passed into the
PersistentVolumeController, maybe come up with better interfaces etc. Since
it is too late to do all that for 1.8, we just move cloud specific code
to where they belong and we check for PVLabeler method and use it where
needed.

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

Fixes #51629

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-12 08:46:12 -07:00
Erik McClenney c947339f27 Parse out numeric portion of semantic version. 2017-09-11 17:19:08 -07:00
Ivan Chavero 27e6fa3225 Avoid printing node list for LoadBalancer in log file
Don't to print the node list on the AWS logs so the log file is
more readable.
2017-09-11 15:10:19 -06:00
Kubernetes Submit Queue a5f766063d Merge pull request #51588 from karataliu/accm
Automatic merge from submit-queue

Fix splitProviderID for Azure

**What this PR does / why we need it**:
#46940 add 'splitProviderID' for Azure to get node name from provider, but it captures the resource id instead of node name.

Functions such as NodeAddresses are accepting node names:
84d9778f22/pkg/cloudprovider/providers/azure/azure_instances.go (L32)

With current implementation, it takes in a resource ID, and will result in following error
```
E0830 04:15:09.877143   10427 azure_instances.go:63] error: az.NodeAddresses, az.getIPForMachine(/subscriptions/{id}/resourceGroups/{id}/providers/Microsoft.Compute/virtualMachines/k8s-master-0), err=instance not found
```

This fix makes is return node names instead.


**Which issue this PR fixes**

**Special notes for your reviewer**:

**Release note**:
`NONE`


@brendandburns  @realfake @wlan0
2017-09-08 16:49:18 -07:00
Kubernetes Submit Queue a5b3e50eac Merge pull request #51528 from yastij/azure-zone-byProviderID-nodeName
Automatic merge from submit-queue (batch tested with PRs 52047, 52063, 51528)

implementation of GetZoneByProviderID and GetZoneByNodeName for azure

This is part of the #50926 effort

cc @luxas 

**Release note**:

```release-note
None
```
2017-09-08 16:07:00 -07:00
Davanum Srinivas d47bd26c4b Remove links to GCE/AWS cloud providers from PersistentVolumeController
We should be able to build a cloud-controller-manager without having to
pull in code specific to GCE and AWS clouds. Note that this is a tactical
fix for now, we should have allow PVLabeler to be passed into the
PersistentVolumeController, maybe come up with better interfaces etc. Since
it is too late to do all that for 1.8, we just move cloud specific code
to where they belong and we check for PVLabeler method and use it where
needed.

Fixes #51629
2017-09-08 15:28:08 -04:00
Unknown 125a054790 Fixes issues noted in review 2017-09-08 12:03:17 +12:00
Nick Sardo 068edd794a Bubble reservation error to the user when the address is specified. 2017-09-07 11:37:25 -07:00
Kubernetes Submit Queue 9a8cb435b7 Merge pull request #51795 from dims/bug-fix-51755
Automatic merge from submit-queue (batch tested with PRs 51984, 51351, 51873, 51795, 51634)

Bug Fix - Adding an allowed address pair wipes port security groups

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

Fix for cloud routes enabled instances will have their security groups
removed when the allowed address pair is added to the instance's port.

Upstream bug report is in:
https://github.com/gophercloud/gophercloud/issues/509

Upstream bug fix is in:
https://github.com/gophercloud/gophercloud/pull/510

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

Fixes #51755

**Special notes for your reviewer**:

Just an fix in vendored code. minimal changes needed in OpenStack cloud provider

**Release note**:

```release-note
NONE
```
2017-09-05 18:40:31 -07:00
Cheng Xing d285c5a933 Moving disk-related cloud provider operations to gce_disks.go 2017-09-05 11:06:56 -07:00
Kubernetes Submit Queue 1732a8b9bd Merge pull request #51562 from nicksardo/gce-attempt-firewall
Automatic merge from submit-queue (batch tested with PRs 51915, 51294, 51562, 51911)

GCE: Gracefully handle permission errors when attempting to create firewall rules

Purpose of this PR is to raise events from the GCE cloud provider if the GCE service account does not have the permissions necessary to create/update/delete firewall rules. 

Fixes #51812

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

Example Events:

```
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason                          Message
  ---------     --------        -----   ----                    -------------   --------        ------                          -------
  2m            2m              1       service-controller                      Normal          EnsuringLoadBalancer            Ensuring load balancer
  2m            2m              1       gce-cloudprovider                       Normal          LoadBalancerManualChange        Firewall change required by network admin: `gcloud compute firewall-rules create aa8a1dd628ddb11e78ce042010a80000 --network https://www.googleapis.com/compute/v1/projects/playground/global/networks/e2e-test-nicksardo --description "{\"kubernetes.io/service-name\":\"default/myechosvc1\", \"kubernetes.io/service-ip\":\"\"}" --allow tcp:9000 --source-ranges 0.0.0.0/0 --target-tags e2e-test-nicksardo-minion --project playground`
  2m            2m              1       gce-cloudprovider                       Normal          LoadBalancerManualChange        Firewall change required by network admin: `gcloud compute firewall-rules create k8s-1aee5045e658d174-node-hc --network https://www.googleapis.com/compute/v1/projects/playground/global/networks/e2e-test-nicksardo --description "" --allow tcp:10256 --source-ranges 130.211.0.0/22,35.191.0.0/16,209.85.152.0/22,209.85.204.0/22 --target-tags e2e-test-nicksardo-minion --project playground`
  1m            1m              1       service-controller                      Normal          EnsuredLoadBalancer             Ensured load balancer
```
2017-09-05 08:47:28 -07:00
saadali 8a2d1cd63a Remove redundant redunancy in gce_alpha.go 2017-09-04 20:16:32 -07:00
saadali 3b834cf665 Modify VolumeZonePredicate to handle multi-zone PV
Modifies the VolumeZonePredicate to handle a PV that belongs to more
then one zone or region. This is indicated by the zone or region label
value containing a comma separated list.
2017-09-04 20:13:32 -07:00
saadali d0e4271dfb GCE Cloud provider changes to enable RePD
GCE cloud provider changes for enabling GCE Regional PDs.
2017-09-04 20:10:32 -07:00
Nick Sardo 676b95e097 Gracefully handle permission errors when attempting to create firewall rules 2017-09-04 09:00:49 -07:00
Yassine TIJANI 144bd102c0 implementation of GetZoneByProviderID and GetZoneByNodeName for azure 2017-09-04 10:43:19 +02:00
Kubernetes Submit Queue 9ad2bd0f7f Merge pull request #51561 from cheftako/getzone
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

Implement GetZoneByProviderID & GetZoneByNodeName

Adding an implementation of GetZoneByProviderID & GetZoneByNodeName for
GCE.
This is related to ticket 50926.
This was tested as part of the ongoing separate GCE cloud provider work.

**What this PR does / why we need it**: It implements GCE methods needed by the cloud provider work.

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

**Special notes for your reviewer**: Tested with pull/50811

**Release note**:
<!--  Steps to write your release note:
```release-note NONE
```
2017-09-03 01:12:07 -07:00
Kubernetes Submit Queue 6b39b017b4 Merge pull request #50993 from wackxu/fixdepfuncaws
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

Replace the deprecated function with the suggest function in aws module

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

There are some deprecated  function and I replace the deprecated function with the suggest function in aws module.

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

```
NONE
```
2017-09-02 23:50:07 -07:00
Kubernetes Submit Queue 9341f22bb6 Merge pull request #50112 from jlz27/multiple-ips
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

AWS: handle multiple IPs when using more than 1 network interface per ec2 instance

**What this PR does / why we need it**:
Adds support for kubelets running with the AWS cloud provider on ec2 instances with multiple network interfaces. If the active interface is not eth0, the AWS cloud provider currently reports the wrong node IP.

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

**Special notes for your reviewer**:
There is also some work necessary for handling multiple DNS names and such but I didn't fix them in this PR.

**Release note**:

```release-note
Fixed bug in AWS provider to handle multiple IPs when using more than 1 network interface per ec2 instance.
```
2017-09-02 23:50:03 -07:00
Kubernetes Submit Queue 6d32783453 Merge pull request #51301 from yujuhong/net-tiers-v0.3
Automatic merge from submit-queue

GCE: Add Alpha feature "Network Tiers" for external L4 load balancers

**Special notes for your reviewer**:
The PR has been manually tested in a GCE e2e cluster for the following conditions:
  1. When `network-tier` is not enabled in gce.conf, network tier annotations are completely ignored by the controller.
  2. When  `network-tier` is enabled in gce.conf:
     * Service w/ Standard tier: create a standard-tier LB.
     * Update Service to use a different tier: tear down the existing forwarding rule and release the IP before creating a new LB.
     * Service w/ an invalid tier value: `ensureExternalLoadBalancer()` returns an error, and controller emits an event.
     * Service w/ a user-owned static IP: check if the tier matches, if not, returns an error and emits an event.

I uploaded an e2e test #51483. You're welcome to review that one too.

**Release note**:

```release-note
GCE: Service object now supports "Network Tiers" as an Alpha feature via annotations.
```
2017-09-02 23:38:55 -07:00
Kubernetes Submit Queue 562d7ee37b Merge pull request #51590 from karataliu/instancetypebyid
Automatic merge from submit-queue

Fix InstanceTypeByProviderID for Azure

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

Fix change in #46940, should return InstanceType in function InstanceTypeByProviderID

Otherwise:
```
I0830 05:01:08.497989   15347 node_controller.go:328] Adding node label from cloud provider: beta.kubernetes.io/instance-type=/subscriptions/{id}/resourceGroups/{id}/providers/Microsoft.Compute/virtualMachines/k8s-agentpool1
```

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

@brendandburns @realfake
2017-09-02 11:01:35 -07:00
Davanum Srinivas b6721bebea Changes in OpenStack cloud provider for latest gophercloud 2017-09-01 20:56:13 -04:00
Walter Fender 0167c6eb22 Implement GetZoneByProviderID & GetZoneByNodeName
Adding an implementation of GetZoneByProviderID & GetZoneByNodeName for
GCE.
This is related to ticket 50926.
This was tested as part of the ongoing separate GCE cloud provider work.

Added unit test.
Fix for wojtek-t (borrowed from FengyunPan)
2017-09-01 14:02:50 -07:00
Yu-Ju Hong 76945ad86d GCE: Add "Network Tiers" as an Alpha feature for L4 load balancers
This feature supports specifying what network tier (premium, standard)
to use for the load balancer backing the Service (type=LoadBalancer).
2017-09-01 09:13:20 -07:00
Kubernetes Submit Queue 324a3bf7f5 Merge pull request #51055 from nicksardo/gce-ilb-ip
Automatic merge from submit-queue (batch tested with PRs 51632, 51055, 51676, 51560, 50007)

GCE: Reserve address for ILBs during sync

**What this PR does / why we need it**:
This PR adds the ability for the service controller to hold the ILB's IP during sync which may delete/recreate the forwarding rule.

Fixes: #47531

**Release note**:
```release-note
GCE: Internal load balancer IPs are now reserved during service sync to prevent losing the address to another service.
```
2017-09-01 08:27:13 -07:00
Kubernetes Submit Queue b7381c3b03 Merge pull request #51515 from jianglingxia/jlx82918
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448)

fix typo about volumes

**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
NONE
```
2017-08-31 22:09:13 -07:00
Kubernetes Submit Queue 63dfd147bf Merge pull request #51513 from yastij/aws-support-byProviderID
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448)

implementation of GetZoneByProviderID and GetZoneByNodeName for AWS

This a part of the #50926 effort

cc @luxas 

**Release note**:

```release-note
None
```
2017-08-31 22:09:10 -07:00
Ivan Towlson 37c42b10dd Azure: expose services on non-default subnets 2017-09-01 14:33:41 +12:00
Unknown faecedb174 Fix format specifiers in Azure cloud provider 2017-08-31 15:54:36 +12:00
Nick Sardo 644aa69da7 Reserve internal address for ILBs 2017-08-30 11:46:07 -07:00
Kubernetes Submit Queue e794dce445 Merge pull request #48936 from jsafrane/aws-key-check
Automatic merge from submit-queue

AWS: check validity of KSM key before creating a new encrypted disk.

AWS CreateVolume call does not check if referenced encryption key actually exists and returns a valid new AWS EBS volume even though an invalid key was specified. Later on it removes the EBS silently when its encryption fails.

To work around this buggy behavior we manually check that the key exists before calling CreateVolume.

Fixes #48438

/sig aws

Please review carefully. Can we safely assume that Kubernetes controller-manager can read encryption keys?

```release-note
aws: Kubernetes now checks existence of provided KSM (Key Management Service) key before creating an encrypted AWS EBS.
```
2017-08-30 08:05:56 -07:00
Kubernetes Submit Queue 022919d1a4 Merge pull request #51483 from yujuhong/e2e-net-tiers
Automatic merge from submit-queue

e2e: Add tests for network tiers in GCE

This test depends on #51301, which adds the new feature. Only the `e2e: Add tests for network tiers in GCE` commit is new.
#51301 should pass this new test.
2017-08-30 06:55:35 -07:00
Dong Liu 09f0850da3 Fix InstanceTypeByProviderID for Azure 2017-08-30 13:00:21 +08:00
Dong Liu 623d32a637 Fix splitProviderID for Azure 2017-08-30 12:30:34 +08:00
saadali 4ca1dbc589 Enable switching to alpha GCE disk API 2017-08-29 17:23:25 -07:00
Kubernetes Submit Queue 0d17e9deb7 Merge pull request #48574 from sakshamsharma/kms-transformer
Automatic merge from submit-queue

Add Google cloud KMS service for envelope encryption transformer

This adds the required pieces which will allow addition of KMS based encryption providers (envelope transformer).

For now, we will be implementing it using Google Cloud KMS, but the code should make it easy to add support for any other such provider which can expose Decrypt and Encrypt calls.

Writing tests for Google Cloud KMS Service may cause a significant overhead to the testing framework. It has been tested locally and on GKE though.

Upcoming after this PR:
* Complete implementation of the envelope transformer, which uses LRU cache to maintain decrypted DEKs in memory.
* Track key version to assist in data re-encryption after a KEK rotation.

Development branch containing the changes described above: https://github.com/sakshamsharma/kubernetes/pull/4

Envelope transformer used by this PR was merged in #49350 

Concerns #48522 

Planned configuration:
```
kind: EncryptionConfig
apiVersion: v1
resources:
  - resources:
    - secrets
    providers:
    - kms:
        cachesize: 100
        configfile: gcp-cloudkms.conf
        name: gcp-cloudkms
    - identity: {}
```

gcp-cloudkms.conf:
```
[GoogleCloudKMS]
    kms-location: global
    kms-keyring: google-container-engine
    kms-cryptokey: example-key
```
2017-08-29 11:11:10 -07:00
Kubernetes Submit Queue a9c80bc97b Merge pull request #51298 from yujuhong/gce-fakes
Automatic merge from submit-queue (batch tested with PRs 51298, 51510, 51511)

GCE: Add a fake forwarding rule service

Also add more methods to the address service.  These
will be used for testing soon.
2017-08-29 10:38:14 -07:00
jianglingxia 437f4640ca fix typo about volumes 2017-08-29 18:57:57 +08:00
Kubernetes Submit Queue d25a78a692 Merge pull request #51410 from nicksardo/gce-consume-netproj
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

GCE: Read networkProjectID param

Fixes #48515 

/assign bowei

The first commit is the original PR cherrypicked. The master's kubelet isn't provided a cloud config path, so the project is retrieved via instance metadata. In the GKE case, this project cannot be retrieved by the master and caused an error.

**Release note**:
```release-note
NONE
```
2017-08-29 03:20:02 -07:00
Yassine TIJANI 9585658eaa implementation of GetZoneByProviderID and GetZoneByNodeName for AWS 2017-08-29 11:37:27 +02:00
Saksham Sharma 3e11baf702 Add Google Cloud KMS plugin for encryption 2017-08-29 11:15:27 +05:30
Yu-Ju Hong f33c37e102 e2e: Add tests for network tiers in GCE 2017-08-28 18:40:20 -07:00
Yu-Ju Hong 22b2da2378 update bazel 2017-08-28 18:40:20 -07:00
Yu-Ju Hong 46eb7d8a55 GCE: Add annotations and helper functions for network tiers
These functions will be consumed in the follow-up changes.
2017-08-28 18:40:20 -07:00
Nick Sardo a48fe406be Consume new config value for network project id 2017-08-28 11:11:05 -07:00
Jan Safranek 1ea7fa84fc AWS: check validity of KSM key before creating a new encrypted disk.
AWS CreateVolume call does not check if referenced encryption key actually
exists and returns a valid new AWS EBS volume even though an invalid key
was specified. Later on it removes the EBS silently when its encryption fails.

To work around this buggy behavior we manually check that the key exists
before calling CreateVolume.
2017-08-28 12:52:57 +02:00
Kubernetes Submit Queue 4231308582 Merge pull request #51317 from FengyunPan/GetZoneByProviderID-openstack
Automatic merge from submit-queue

Implement GetZoneByProviderID and GetZoneByNodeName for openstack

This is part of #50926
cc @wlan0

**Release note**:
```release-note
NONE
```
2017-08-26 10:09:33 -07:00
Kubernetes Submit Queue 4b7135513f Merge pull request #51382 from nicksardo/revert-51038-gce-netproj
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Revert "GCE: Consume new config value for network project id"

Reverts kubernetes/kubernetes#51038

Broke GKE tests
2017-08-26 06:43:33 -07:00
Kubernetes Submit Queue 27fbb68f18 Merge pull request #51087 from oracle/for/upstream/master/ccm-instance-exists
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Add InstanceExistsByProviderID to cloud provider interface for CCM

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

Currently, [`MonitorNode()`](02b520f0a4/pkg/controller/cloud/nodecontroller.go (L240)) in the node controller checks with the CCM if a node still exists by calling `ExternalID(nodeName)`. `ExternalID` is supposed to return the provider id of a node which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist. 


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

**Special notes for your reviewer**:

We'll want to create a subsequent issue to track the implementation of these two new methods in the cloud providers.

**Release note**:

```release-note
Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager
```

/cc @wlan0 @thockin @andrewsykim @luxas @jhorwit2

/area cloudprovider
/sig cluster-lifecycle
2017-08-26 06:43:30 -07:00
Kubernetes Submit Queue c170f5bfa2 Merge pull request #50972 from FengyunPan/external-loadBalancerIP
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

Support for specifying external LoadBalancerIP on openstack

1. Support ServiceAnnotationLoadBalancerFloatingNetworkId for LB v1

2. Support for specifying external LoadBalancerIP on openstack
    Add ServiceAnnotationLoadBalancerInternal annotation to distinguish
    between internal LoadBalancerIP and external LoadBalancerIP.


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

**Release note**:
```release-note
NONE
```
2017-08-25 19:40:36 -07:00
Nick Sardo 0d55f6bdcb Revert "GCE: Consume new config value for network project id" 2017-08-25 18:02:10 -07:00
Josh Horwitz cf75c49883 change godoc based on feedback from luxas 2017-08-25 18:04:10 -04:00
Josh Horwitz 3528ceb27f address test & doc comments 2017-08-25 16:15:55 -04:00
Yu-Ju Hong 91275d23e2 GCE: Add a fake forwarding rule service
Also add more methods to the address service.
2017-08-25 08:49:11 -07:00
Nick Sardo 0028385e20 Consume new config value for network project id 2017-08-25 08:42:28 -07:00
FengyunPan 79d2b1dd4e Implement GetZoneByProviderID and GetZoneByNodeName for openstack
This is part of #50926
cc @wlan0
2017-08-25 23:08:00 +08:00
Kubernetes Submit Queue c025965db3 Merge pull request #51233 from bowei/add-alias
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

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-25 06:22:12 -07:00
Kubernetes Submit Queue d7102a0f36 Merge pull request #49770 from FengyunPan/fix-GetInstanceIDFromProviderID
Automatic merge from submit-queue (batch tested with PRs 51244, 50559, 49770, 51194, 50901)

Fix the matching rule of instance ProviderID

Url.Parse() can't parse ProviderID which contains ':///'.
This PR use regexp to match ProviderID.

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

**Release note**:
```release-note
NONE
```
2017-08-25 04:11:10 -07:00
Kubernetes Submit Queue 0cf928f681 Merge pull request #51222 from yujuhong/fake-addr-svc
Automatic merge from submit-queue (batch tested with PRs 51224, 51191, 51158, 50669, 51222)

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 22:59:38 -07:00
andrewsykim bd3cc83110 cloudprovider.Zones should support external cloud providers 2017-08-24 21:05:49 -04:00
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