Commit Graph

382 Commits (c2b771d5c46ca3b2f58f72595fe07a4e56a63762)

Author SHA1 Message Date
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Jamie Hannaford 622c69c1e5 Use provided VipPortID for LB 2017-04-12 14:13:12 +02:00
Jesse Haka 5aad93abf5 fix format 2017-04-08 11:08:08 +03:00
Jesse Haka 2fb9fc4647 use AvailabilityZone instead of Availability 2017-04-08 10:51:49 +03:00
wlan0 a68c783dc8 Use ProviderID to address nodes in the cloudprovider
The cloudprovider is being refactored out of kubernetes core. This is being
done by moving all the cloud-specific calls from kube-apiserver, kubelet and
kube-controller-manager into a separately maintained binary(by vendors) called
cloud-controller-manager. The Kubelet relies on the cloudprovider to detect information
about the node that it is running on. Some of the cloudproviders worked by
querying local information to obtain this information. In the new world of things,
local information cannot be relied on, since cloud-controller-manager will not
run on every node. Only one active instance of it will be run in the cluster.

Today, all calls to the cloudprovider are based on the nodename. Nodenames are
unqiue within the kubernetes cluster, but generally not unique within the cloud.
This model of addressing nodes by nodename will not work in the future because
local services cannot be queried to uniquely identify a node in the cloud. Therefore,
I propose that we perform all cloudprovider calls based on ProviderID. This ID is
a unique identifier for identifying a node on an external database (such as
the instanceID in aws cloud).
2017-03-27 23:13:13 -07:00
Maxym Kutsevol 89f596f408 Update deps 2017-03-21 20:46:06 +02:00
Maxym Kutsevol 2c05bb5336 Support for v1/v2/autoprobe openstack cinder blockstorage
Support for cinder v1/v2 api with the new gophercloud/gophercloud
library. API version is configurable and defaulting autodetection.
2017-03-21 20:46:03 +02:00
Kubernetes Submit Queue 9a218d406b Merge pull request #41309 from kars7e/add-cafile-openstack
Automatic merge from submit-queue (batch tested with PRs 40932, 41896, 41815, 41309, 41628)

Add custom CA file to openstack cloud provider config

**What this PR does / why we need it**: Adds ability to specify custom CA bundle file to verify OpenStack endpoint against. Useful in tests and PoC deployments. Similar to what https://github.com/kubernetes/kubernetes/pull/35488 did for authentication.  


**Which issue this PR fixes**: None

**Special notes for your reviewer**: Based on https://github.com/kubernetes/kubernetes/pull/35488 which added support for custom CA file for authentication.

**Release note**:
2017-02-26 08:10:00 -08:00
Angus Lees c077c30004 Migrate rackspace/gophercloud -> gophercloud/gophercloud
This change migrates the 'openstack' provider and 'keystone'
authenticator plugin to the newer gophercloud/gophercloud library.

Note the 'rackspace' provider still uses rackspace/gophercloud.

Fixes #30404
2017-02-20 11:03:05 +11:00
Mike Bryant e2e924e023 cinder: Add support for virtio-scsi
The VirtIO SCSI driver for KVM changes the way disks appear in /dev/disk/by-id.
This adds support for the new format.
2017-02-15 17:27:31 +00:00
Kubernetes Submit Queue eab039d746 Merge pull request #39735 from NickrenREN/openstack-code-optimize
Automatic merge from submit-queue (batch tested with PRs 40297, 41285, 41211, 41243, 39735)

fix variables in openstack.go to keep camel casing and remove unused var
2017-02-15 03:25:16 -08:00
Karol Stepniewski e3c8a0ceb6 Add custom CA file to openstack cloud provider config
In cases where insecure OpenStack endpoint is to be used
(e.g., when testing), gophercloud will fail to connect
to such endpoints. This patch adds support for custom CA
file configuration option, which, when provided, will
make gophercloud validate OpenStack endpoint against
certificate(s) read from file specified in that option.
2017-02-13 15:54:02 -08:00
NickrenREN 70ab5fc6b8 optimize duplicate openstack serverList judgement
if len(serverList) > 1, we will return err in pager.EachPage() function,so here we do not need to do the judgement again
2017-02-06 14:30:52 +08:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Kubernetes Submit Queue 60489f837b Merge pull request #36530 from apelisse/owners-pkg-cloudprovider
Automatic merge from submit-queue

Curating Owners: pkg/cloudprovider

cc @runseb @justinsb @kerneltime @mikedanese @svanharmelen @anguslees @brendandburns @abrarshivani @imkin @luomiao @colemickens @ngtuna @dagnello @abithap

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-18 18:40:53 -08:00
Antoine Pelisse ca964a1872 Update OWNERS approvers and reviewers: pkg/cloudprovider 2017-01-17 13:42:07 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k 8686d67c80 move pkg/util/rand 2017-01-16 16:04:03 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
NickrenREN 8e53723dd2 fix variables in openstack.go to keep camel casing and remove unused var 2017-01-11 20:14:01 +08:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Angus Lees fa1d6f3838 Forcibly detach an attached volume before attaching elsewhere
Fixes #33288

Co-Authored-By: @Rotwang
2016-12-21 11:57:10 +11:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Angus Lees 8a7e103191 providers: Remove long-deprecated Instances.List()
This method has been unused by k8s for some time, and yet is the last
piece of the cloud provider API that encourages provider names to be
human-friendly strings (this method applies a regex to instance names).

Actually removing this deprecated method is part of a long effort to
migrate from instance names to instance IDs in at least the OpenStack
provider plugin.
2016-12-10 22:36:12 +11:00
Kubernetes Submit Queue 7f2622e668 Merge pull request #32663 from anguslees/extraroutes
Automatic merge from submit-queue

openstack: Implement the `Routes` provider API

``` release-note

Implement the Routes provider API for OpenStack using Neutron extraroute extension.  This removes the need for flannel/etc where supported.  To use, ensure all your nodes are on the same Neutron (private) network and specify the router ID in new `[Route]` section of provider config:

    [Route]
    router-id = <router UUID>
```
2016-12-07 21:36:13 -08:00
Kubernetes Submit Queue cffaf1b71b Merge pull request #31321 from anguslees/lb-nodes
Automatic merge from submit-queue (batch tested with PRs 37328, 38102, 37261, 31321, 38146)

Pass full Node objects to provider LoadBalancer methods
2016-12-05 20:16:53 -08:00
Angus Lees 0b57371ffa openstack: Implement Routes API
This change implements the Routes API using Neutron's "extraroute"
extension.

To use, this requires all the nodes to be on the same Neutron network
and the UUID of the Neutron router on that network.

Required cloud provider config section:
  [Route]
  router-id = <UUID of Neutron router>

Ensure kube-controllermanager is started with (non-default)
`--allocate-node-cidrs=true` and set `--cluster-cidr` to the POD
super-subnet (a private /16 would be reasonable).

Based on an earlier version by @timbyr (#19473)
2016-12-05 15:24:01 +11:00
Angus Lees cf99ce6a86 openstack: Update LB API hosts->nodes
Update EnsureLoadBalancer/UpdateLoadBalancer API to use node objects.

In particular, this allows us to take the node address directly from the
node.Status.Addresses and avoids a name -> instance lookup.
2016-12-01 09:53:54 +11:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu c962c2602a dependencies: pkg/cloudprovider 2016-11-23 15:53:09 -08:00
Vishnu kannan dd8ec911f3 Revert "Revert "Merge pull request #35821 from vishh/gci-mounter-scope""
This reverts commit 402116aed4.
2016-11-08 11:09:10 -08:00
Seth Jennings 98756575c4 fix version detection in openstack lbaas 2016-11-04 12:56:37 -05:00
saadali 402116aed4 Revert "Merge pull request #35821 from vishh/gci-mounter-scope"
This reverts commit 973fa6b334, reversing
changes made to 41b5fe86b6.
2016-11-03 20:23:25 -07:00
Kubernetes Submit Queue 3fe8db8651 Merge pull request #33270 from hpcloud/bug/33128
Automatic merge from submit-queue

Don't rely on device name provided by Cinder

See issue #33128

We can't rely on the device name provided by Cinder, and thus must perform
detection based on the drive serial number (aka It's cinder ID) on the
kubelet itself.

This patch re-works the cinder volume attacher to ignore the supplied
deviceName, and instead defer to the pre-existing GetDevicePath method to
discover the device path based on it's serial number and /dev/disk/by-id
mapping.

This new behavior is controller by a config option, as falling back
to the cinder value when we can't discover a device would risk devices
not showing up, falling back to cinder's guess, and detecting the wrong
disk as attached.
2016-11-03 07:16:49 -07:00
Kubernetes Submit Queue 95eef6e422 Merge pull request #33768 from hpcloud/bug/33759
Automatic merge from submit-queue

Corect filtering of OpenStack LBaaS resources to delete

Neutron's API ignores unknown parameters. When listing pools etc, K8
attempts to filter on "LoadBalancerID", which is not a valid filter.
As such, it is ignored by Neutron, and a list of all pools is
returned. K8 then proceeds to delete each of the pools.

Instead, we now double check the resources really belong to the LB
we're trying to delete.

Fixes issue #33759
2016-11-03 05:45:49 -07:00
Vishnu Kannan 414e4ae549 Revert "Adding a root filesystem override for kubelet mounter"
This reverts commit e861a5761d.
2016-11-02 15:18:09 -07:00
Kiall Mac Innes ce8eda94df Don't rely on device name provided by Cinder
See issue #33128

We can't rely on the device name provided by Cinder, and thus must perform
detection based on the drive serial number (aka It's cinder ID) on the
kubelet itself.

This patch re-works the cinder volume attacher to ignore the supplied
deviceName, and instead defer to the pre-existing GetDevicePath method to
discover the device path based on it's serial number and /dev/disk/by-id
mapping.

This new behavior is controller by a config option, as falling back
to the cinder value when we can't discover a device would risk devices
not showing up, falling back to cinder's guess, and detecting the wrong
disk as attached.
2016-11-02 18:48:11 +01:00
Kiall Mac Innes 4942a57db6 Support OpenStack+ESXi Volumes in GetDevicePath
GetDevicePath was currently coded to only support Nova+KVM style device
paths, update so we also support Nova+ESXi and leave the code such that
new pattern additions are easy.
2016-11-02 12:01:21 +01:00
Kiall Mac Innes b73485b990 Corect filtering of OpenStack LBaaS resources to update
Neutron's API ignores unknown paramaters. When listing pools etc, K8
attempts to filter on "LoadBalancerID", which is not a valid filter.
As such, it is ignored by Neutron, and a list of all pools is
returned. K8 then proceeds to update each of the pools.

Instead, we now double check the resources really belong to the LB
we're trying to update.
2016-11-01 17:30:03 +00:00
Jing Xu abbde43374 Add sync state loop in master's volume reconciler
At master volume reconciler, the information about which volumes are
attached to nodes is cached in actual state of world. However, this
information might be out of date in case that node is terminated (volume
is detached automatically). In this situation, reconciler assume volume
is still attached and will not issue attach operation when node comes
back. Pods created on those nodes will fail to mount.

This PR adds the logic to periodically sync up the truth for attached volumes kept in the actual state cache. If the volume is no longer attached to the node, the actual state will be updated to reflect the truth. In turn, reconciler will take actions if needed.

To avoid issuing many concurrent operations on cloud provider, this PR
tries to add batch operation to check whether a list of volumes are
attached to the node instead of one request per volume.

More details are explained in PR #33760
2016-10-28 09:24:53 -07:00
Vishnu kannan e861a5761d Adding a root filesystem override for kubelet mounter
This is useful for supporting hostPath volumes via containerized
mounters in kubelet.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 21:42:59 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Jing Xu 34ef93aa0c Add mounterPath to mounter interface
In order to be able to use new mounter library, this PR adds the
mounterPath flag to kubelet which passes the flag to the mount
interface. If flag is empty, mount uses default mount path.
2016-10-20 14:15:27 -07:00
Kubernetes Submit Queue f418cd3d46 Merge pull request #34426 from dagnello/lb-nodeport-update
Automatic merge from submit-queue

Openstack: Update lb member when node port changes

Ensures lb members are update if node port changes.

cc @suonto
2016-10-15 02:13:14 -07:00
Mathieu Velten c1b3100ba2 Support trust id as a scope in the OpenStack authentication logic. 2016-10-14 14:54:26 +02:00
Graham Hayes ac205183d4 Security Group support for OpenStack Load Balancers
This allows security groups to be created and attached to the neutron
port that the loadbalancer is using on the subnet.

The security group ID that is assigned to the nodes needs to be
provided, to allow for traffic from the loadbalancer to the nodePort
to be refelected in the rules.

This adds two config items to the LoadBalancer options -

ManageSecurityGroups (bool)
NodeSecurityGroupID  (string)
2016-10-13 15:42:01 -07:00
Davide Agnello 14b184756a Openstack: Update lb member when node port changes 2016-10-10 18:04:26 -07:00
Kubernetes Submit Queue 42c027215c Merge pull request #31671 from anguslees/config-drive
Automatic merge from submit-queue

openstack: Support config-drive and improve CurrentNodeName, GetZone

This PR adds support for fetching local instance metadata via config-drive (as well as querying metadata service), and surfaces some additional metadata information (from either source):

- `CurrentNodeName` now returns the OpenStack instance name, rather than the current hostname (they might not be the same)
- `GetZone` includes availability zone label in `FailureDomain`

Thanks to @kiall for a WIP implementation of the latter.
2016-10-10 12:40:28 -07:00
Angus Lees ab5250efd8 openstack: Set GetZone FailureDomain to nova AZ
Set FailureDomain in GetZone result to value of availability_zone in
local instance metadata.
2016-10-04 21:14:47 +11:00
Angus Lees 8167df2965 openstack: Return instance name in CurrentNodeName
Previously the OpenStack provider just returned the hostname in
CurrentNodeName.  With this change, we return the local OpenStack
instance name, as the API intended.
2016-10-04 21:14:47 +11:00
Angus Lees 3745e0f88c openstack: Support config-drive for local metadata
Config-drive is an alternate no-network method for publishing local
instance metadata on OpenStack.  This change implements support for
fetching data from config-drive, and tries it before querying the
network metadata service (since config-drive will fail quickly if not
available).

Note config-drive involves mounting the filesystem with label
"config-2", so anyone using config-drive and running kubelet in a
container will need to ensure /dev/disk/by-label/config-2 is available
inside the container (read-only).
2016-10-04 21:13:27 +11:00
Markus Suonto e1068c9a49 EnsureLoadBalancer update instead of recreate existing LBs 2016-10-02 12:29:50 +03:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Kubernetes Submit Queue abcc7927d1 Merge pull request #33208 from hacktastic/fix_openstack_lbaas_healthmonitors
Automatic merge from submit-queue

Fixed a bug that causes k8s to delete all healthmonitors on your OpenStack tenant

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
The OpenStack LBaaS v2 api does not support filtering health monitors by pool_id, so /lbaas/healthmonitors?pool_id=abc123 will always return all health monitors in your OpenStack tenant. 

This presents a problem when, in the very next block of code, we loop over the list of monitorIDs and delete them one-by-one. This will delete all the health monitors in your tenant without warning. 

Fortunately, we already got the healthmonitor IDs when we built the list of pools. Using those, we can delete only those healthmonitors associated with our pool(s).

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

**Special notes for your reviewer**:
The main issue here was the use of v2_monitors.List(lbaas.network, v2_monitors.ListOpts{PoolID: poolID}). This is trying to filter healthmonitors by pool_id, but that is not supported by the API. It creates a call like /lbaas/healthmonitors?pool_id=abc123. The API server ignores the pool_id parameter and returns a list of all healthmonitors (which k8s then tries to delete).

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-09-26 18:42:18 -07:00
hacktastic 77a203c49f the api does not support filtering health monitors by pool_id, so /lbaas/healthmonitors?pool_id=abc123 will always return all health monitors in your OS tenant. fortunately, we can get the health monitor IDs from the query to /lbaas/pools and delete them 2016-09-22 23:52:32 -07:00
Jan Safranek 9903b389b3 Update cloud providers 2016-09-15 10:33:57 +02:00
Kubernetes Submit Queue f7bea5d8fd Merge pull request #32290 from zhouhaibing089/lbaasv1-fix
Automatic merge from submit-queue

delete the member before delete the pool

fixes https://github.com/kubernetes/kubernetes/issues/32285. it is necessary to delete members before delete the pool.
2016-09-13 01:15:58 -07:00
Kubernetes Submit Queue ff1cec99cc Merge pull request #32307 from mikedanese/cloud-owners
Automatic merge from submit-queue

update pkg/cloudprovider OWNERS to spread the review load

This is going to make the mungebot start assigning reviews in your cloudprovider packages.

fyi @runseb @dagnello @imkin @anguslees @dagnello
2016-09-12 00:08:23 -07:00
Kubernetes Submit Queue fe08d0ad0f Merge pull request #31618 from sjenning/fix-externalid-error
Automatic merge from submit-queue

return cloudprovider.InstanceNotFound for Instance interface ExternalID()

Fixes #31615 

@kubernetes/rh-cluster-infra @ncdc @anguslees
2016-09-11 23:28:12 -07:00
Mike Danese 418bfb6453 update pkg/cloudprovider OWNERS to spread the load 2016-09-08 15:13:21 -07:00
zhouhaibing089 fa5551b80d delete the member before delete the pool 2016-09-08 22:10:11 +08:00
Jedrzej Nowak 9e2abd4b02 Fix various typos in pgk/cloudprovider,dns,kubectl 2016-08-31 18:56:52 +02:00
Seth Jennings bde3966699 return cloudprovider.InstanceNotFound in opentack ExternalID() 2016-08-29 21:23:08 -05:00
Kubernetes Submit Queue e427ab0baa Merge pull request #30649 from dagnello/openstack-lbaasv2-multiport
Automatic merge from submit-queue

fix Openstack provider to allow more than one service port for lbaas v2

This resolves bug #30477 where if a service defines multiple ports for load balancer, the plugin will fail with multiple ports are not supported.

@anguslees @jianhuiz
2016-08-23 22:36:09 -07:00
Davide Agnello 97fab82552 Openstack provider allowing more than one service port for lbaas v2 2016-08-23 10:17:32 -07:00
Huamin Chen 259bce370e support storage class in Cinder provisioner
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-08-22 09:28:29 -04:00
Kubernetes Submit Queue 7df59f75cd Merge pull request #29726 from anguslees/lb-autodetect
Automatic merge from submit-queue

openstack: Autodetect LBaaS v1 vs v2

```release-note
* openstack: autodetect LBaaS v1/v2 by querying for available extensions.  For most installs, this effectively changes the default from v1 to v2.  Existing installs can add "lb-version = v1" to the provider config file to continue to use v1.
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29726)
<!-- Reviewable:end -->
2016-08-12 09:02:42 -07:00
Angus Lees e4c354c329 openstack: Autodetect LBaaS v1 vs v2
This removes the need to manually specify the version in all but unusual
cases.

For most installs this will effectively flip the default from
v1 (deprecated) to v2 so conservative existing installs may want to
manually configure "lb-version = v1" before upgrading.
2016-08-12 10:33:11 +10:00
k8s-merge-robot c3129af2d3 Merge pull request #28222 from ammeon/openstack-reorg
Automatic merge from submit-queue

Re-org of the openstack cloud provider
2016-07-29 15:54:13 -07:00
Cole Mickens 2ebffb431d implement azure cloudprovider 2016-07-26 14:50:33 -07:00
Cole Mickens 6ad9dc659f add clusterName to Loadbalancer methods 2016-07-26 14:50:33 -07:00
lixiaobing10051267 54341caa87 TestLoadBalancer() test v1 not v2 2016-07-21 15:30:37 +08:00
joe2far 5a8445a79a Re-org of the openstack cloud provider 2016-07-14 12:41:45 +01:00
joe2far 5ead89b5bb Fixed several typos 2016-07-13 15:06:24 +01:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Davide Agnello 53805caa60 Removing name field from Member for compatibility with OpenStack Liberty
In OpenStack Mitaka, the name field for members was added as an optional
field but does not exist in Liberty.  Therefore the current
implementation for lbaas v2 will not work in Liberty.
2016-06-21 15:29:33 -07:00
k8s-merge-robot 4793372a85 Merge pull request #25888 from rootfs/attacher-aws-cinder
Automatic merge from submit-queue

implement EBS and Cinder attacher/detacher 

follow up with #21709

@kubernetes/sig-storage
2016-06-10 05:39:22 -07:00
Davide Agnello eb32bf55ef Adding support for lbaas-v2 in OpenStack Cloud Provider 2016-06-08 18:16:59 -07:00
Huamin Chen d1e0a13924 support AWS and Cinder attacher
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-08 12:56:24 +00:00
Minhan Xia a1bd33f510 promote sourceRange into service spec 2016-05-26 10:42:30 -07:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
k8s-merge-robot 06160b6abe Merge pull request #22023 from mkulke/rackspace-improvements
Automatic merge from submit-queue

Rackspace improvements (OpenStack Cinder)

This adds PV support via Cinder on Rackspace clusters. Rackspace Cloud Block Storage is pretty much vanilla OpenStack Cinder, so there is no need for a separate Volume Plugin. Instead I refactored the Cinder/OpenStack interaction a bit (by introducing a CinderProvider Interface and moving the device path detection logic to the OpenStack part).

Right now this is limited to `AttachDisk` and `DetachDisk`. Creation and deletion of Block Storage is not in scope of this PR.

Also the `ExternalID` and `InstanceID` cloud provider methods have been implemented for Rackspace.
2016-04-21 16:38:13 -07:00
kulke ba4d74f3c7 Added Block Storage support to Rackspace provider, improved Node discovery. 2016-04-21 10:31:37 +02:00
goltermann 3fa6c6f6d9 Enable vet 2016-04-20 09:48:24 -07:00
k8s-merge-robot 1087162548 Merge pull request #23841 from dagnello/update-openstack-cloudprovider-volume-tests
Automatic merge from submit-queue

Extend OpenStack Cloud Provider Volume Tests

Adding coverage for:
getVolume
AttachDisk
DetachDisk
2016-04-16 17:44:09 -07:00
k8s-merge-robot 62d65f3ce6 Merge pull request #23770 from dagnello/update-openstack-cloudprovider-instance-tests
Automatic merge from submit-queue

Extend OpenStack Cloud Provider Instance Tests

Adding OpenStack cloud provider Instance coverage for:
ExternalID
InstanceID
2016-04-14 04:26:42 -07:00
dagnello cd7e99af1c Add OpenStack Cloud Provider Instance Tests
Adding OpenStack cloud provider instance unit tests for externalID and
instanceID.
2016-04-04 17:06:17 -07:00
dagnello 28590781c1 Extend OpenStack Cloud Provider Volume Tests
Adding test coverage for:
getVolume
AttachDisk
DetachDisk
2016-04-04 17:01:42 -07:00
zhouhaibing089 4758f9953b fix the gcfg typo 2016-03-29 23:32:11 +08:00
Chris Batey and James Ravn be9ce30897 Change LoadBalancer methods to take api.Service
This is a better abstraction than passing in specific pieces of the
Service that each of the cloudproviders may or may not need. For
instance, many of the providers don't need a region, yet this is passed
in. Similarly many of the providers want a string IP for the load
balancer, but it passes in a converted net ip. Affinity is unused by
AWS. A provider change may also require adding a new parameter which has
an effect on all other cloud provider implementations.

Further, this will simplify adding provider specific load balancer
options, such as with labels or some other metadata. For example, we
could add labels for configuring the details of an AWS elastic load
balancer, such as idle timeout on connections, whether it is
internal or external, cross-zone load balancing, and so on.

Authors: @chbatey, @jsravn
2016-03-23 10:48:11 +00:00
Tim Hockin a073c80e45 Use newer home for gcfg package
Switch from obsolete "github.com/scalingdata/gcfg" to "gopkg.in/gcfg.v1".
2016-03-16 08:42:08 -07:00
Justin Santa Barbara cb92133dfa LB Source Ranges: Move validation into API layer
Had to move other things around too to avoid a weird api ->
cloudprovider dependency.

Also adding fixes per code reviews.

(This is a squash of the previously approved commits)
2016-03-03 10:27:17 -05:00
Justin Santa Barbara 818925cc25 Openstack null-support for load balancer source
We return an error if the user specifies a non 0.0.0.0/0 load balancer
source restriction on OpenStack, where we can't enforce the restriction
(currently).
2016-02-29 19:32:15 -05:00
Justin Santa Barbara 49e1149227 AWS: Add support for load balancer source ranges
This refactors #21431 to pull a lot of the code into cloudprovider so it
can be reused by AWS.

It also changes the name of the annotation to be non-GCE specific:
service.beta.kubernetes.io/load-balancer-source-ranges

Fix #21651
2016-02-29 19:32:08 -05:00
Minhan Xia 7ffb123abe add source range support for loadbalancer on gce 2016-02-18 17:05:02 -08:00
k8s-merge-robot d6b4ff3884 Merge pull request #20909 from Clarifai/instance-type-label
Auto commit by PR queue bot
2016-02-13 18:51:42 -08:00
Rudi Chiarito b3863eae82 Add instance-type label to cloud providers
Fully implemented for AWS and GCE
2016-02-12 15:02:03 -05:00
Jan Safranek 1d0b1c227b Add PV.Name into names of generated GCE/AWS/OSP volumes.
Volume names have now format <cluster-name>-dynamic-<pv-name>.

pv-name is guaranteed to be unique in Kubernetes cluster, adding
<cluster-name> ensures we don't conflict with any running cluster
in the cloud project (kube-controller-manager --cluster-name=XXX).

'kubernetes' is the default cluster name.
2016-02-12 09:46:59 +01:00
k8s-merge-robot 9520bb5ddf Merge pull request #20731 from Clarifai/ensure-lb-servicename
Auto commit by PR queue bot
2016-02-10 01:25:07 -08:00
Rudi Chiarito 5874b0cb9d Pass namespaced service name to cloudprovider's EnsureLoadBalancer
Also has an AWS implementation that plugs the service name into the ELB and SG.
Log the service name under GCE and OpenStack.
Fixes #20668
2016-02-09 06:50:53 -05:00
Rudi Chiarito a0831a2378 Mass fix of Infof and co. missing the trailing "f", even when formatting placeholders are used 2016-02-03 11:34:59 -05:00
k8s-merge-robot d63398a543 Merge pull request #18829 from lebauce/openstack-use-os-ext-ips
Auto commit by PR queue bot
2016-01-29 17:49:43 -08:00
k8s-merge-robot 0f6f521beb Merge pull request #18959 from jsafrane/devel/cinder-tags
Auto commit by PR queue bot
2016-01-21 03:33:58 -08:00
Sylvain Baubeau b9dfe1b737 Use Openstack os-ext-ips extension to qualify IP address types
fixes #18409
2016-01-12 15:03:47 +01:00
Kenneth Shelton 9e6c45c395 Updated comments
Updated documentation
Fixed e2e test
2016-01-05 20:51:21 +00:00
Kenneth Shelton d399a8f8cc * Added UDP LB support (for GCE) 2016-01-05 20:51:21 +00:00
Jan Safranek 815d1e0865 Tag OpenStack Cinder volumes created by Kubernetes.
This synchronizes Cinder with AWS EBS code, where we already tag volumes with
claim.Namespace and claim.Name (and pv.Name, as suggested in separate PR).
2015-12-21 11:36:42 +01:00
Jan Safranek 2f06ebf9b7 Implement Creater and Deleter interfaces for Cinder. 2015-12-16 14:23:14 -05:00
Sebastien LAWNICZAK 3eae5895f8 Passing DomainID/DomainName to AuthOptions
To be able to use Domains with IdentityV3, domain-id/domain-name in provider config should be passed to gophercloud.AuthOptions
2015-12-01 23:12:25 +01:00
k8s-merge-robot 74049947d2 Merge pull request #12589 from slaws/os-vip-with-floatingip
Auto commit by PR queue bot
2015-12-01 02:01:39 -08:00
Jan Safranek 7fc8bcae60 openstack: cache InstanceID and use it for volume management.
Hostnames are not related to server names or instance IDs in any way,
don't use them when attaching/detaching volumes.
2015-11-12 11:10:38 +01:00
Tim Hockin 42c7fec490 Add a cloud-provider hook to scrub DNS for pods
GCE needs this hook and it seems general enough to include.
2015-10-23 17:01:49 -07:00
combk8s 59b392c4fa Capitalize the first letter in some log files 2015-10-15 11:03:56 +08:00
Sebastien LAWNICZAK 4c57053d2c Code review correction
Inverting code path on CreateTcploadBalancer to avoid branch divergence
Removing useless variable vipAddr as vip have information needed
Renaming 'error' variable on  EnsureTCPLoadBalancerDeleted to be consistent
2015-09-16 21:17:46 +02:00
Abhishek Shah 44ce4aa423 Create a LB for a K8S with the LB-IP provided by user. 2015-09-10 21:05:06 -07:00
Brendan Burns 9c37fe29c8 Merge pull request #12227 from freeformz/remove_code_google_com
s:code.google.com/p:github.com/scalingdata:
2015-09-01 10:07:44 -07:00
Edward Muller 63207741de go fmt these 2015-08-31 11:29:33 -07:00
Edward Muller 69da77c6b0 s:code.google.com/p:github.com/scalingdata:
Because code.google.com is going away. Probably #1 of several.
2015-08-31 11:29:33 -07:00
Sreekanth Pothanis f5da6b34ce Cinder Volume Plugin 2015-08-30 19:56:27 -07:00
Prashanth B 05b205bab6 Revert "Volume Plugin for Cinder; Openstack Block Storage" 2015-08-28 10:56:24 -07:00
Sreekanth Pothanis c841a20361 Cinder Volume Plugin 2015-08-25 15:13:56 -07:00
Saad Ali 5ec3c78190 Merge pull request #8366 from justinsb/idempotent_loadbalancer
Make LoadBalancer creation more self-healing; don't delete on AWS
2015-08-20 14:30:55 -07:00
Robert Bailey ca168ce285 Merge pull request #12262 from jgriffiths1993/hf-12261
Replace Port with NodePort for creating LB members
2015-08-18 09:14:30 -07:00
Justin Santa Barbara 87df1d6fb6 Change CreateTCPLoadBalancer -> EnsureTCPLoadBalancer; implementations auto-delete if already exists
Previously the servicecontroller would do the delete, but by having the cloudprovider
take that task on, we can later remove it from the servicecontroller, and the
cloudprovider can do something more efficient.
2015-08-17 08:58:45 -04:00
Joshua Griffiths a9aa2c6acc Replace Port with NodePort for creating LB members 2015-08-17 08:47:00 +01:00
CJ Cullen e20467afcb Clean up GCE metadata calls. Remove GetNodeResources from all providers. 2015-08-14 07:29:52 -07:00
Sebastien LAWNICZAK be5f9094d0 Fix : do not try to delete floatingIP if it does not exists 2015-08-13 15:51:06 +02:00
Sebastien LAWNICZAK 65c23ea0e7 Add floatingIP allocation for LB creation on openstack 2015-08-13 15:41:59 +02:00
Bryan Stenson 9541414742 create cloudprovider "providers" package
move all providers into new package
    update all references to old package path
2015-08-11 22:36:51 -07:00