Commit Graph

32 Commits (cff564b1a69b0199a4dc9910e0075f8ade15d336)

Author SHA1 Message Date
Justin Santa Barbara f8e6098e4d AWS: Update tests for refactoring 2016-03-05 08:09:40 -05:00
Christopher Batey aebd4c95e1 Use testify for AWS provider
This has two main advantages:

* The use of the mock package to verify API calls against the aws SDK
* Nicer error messages for asserts without having to use if statements
2016-03-01 14:32:45 +00:00
James Ravn f568b6511a Handle aws implicit and shared routing tables
Fix the AWS subnet lookup that checks if a subnet is public, which was
missing a few cases:

- Subnets without explicit routing tables, which use the main VPC
  routing table.
- Routing tables not tagged with KubernetesCluster. The filter for this
  is now removed.
2016-02-25 22:52:26 +00:00
k8s-merge-robot 2a58c0062d Merge pull request #17913 from jtblin/jtblin/17912-pick-public-subnets
Auto commit by PR queue bot
2016-02-24 23:48:15 -08:00
Chris Batey, James Ravn and Yoseph Samuel 087ff78cf9 Only find running aws hosts by nodename
When finding instance by node name in AWS, only retrieve running
instances.  Otherwise terminated, old nodes can show up with the same
tag when rebuilding nodes in the cluster.

Another improvement made is to filter instances by the node names
provided, rather than selecting all instances and filtering in code.

Authors: @jsravn, @chbatey, @balooo
2016-02-23 14:47:16 +00:00
Minhan Xia 7ffb123abe add source range support for loadbalancer on gce 2016-02-18 17:05:02 -08:00
Jerome Touffe-Blin 62a8b3d44c Fix #17912 - pick public subnets only on ELB creation 2016-02-16 23:16:38 +11:00
Rudi Chiarito da4ba61232 Fix AWS IPPermission check for case with preexisting groups and ranges 2016-02-15 11:41:18 -05: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
k8s-merge-robot 318705feb9 Merge pull request #20378 from jtblin/jtblin/11543-aws-cloud-provider-private-hosted-dns-zone-via-api
Auto commit by PR queue bot
2016-02-08 23:43:59 -08:00
Jerome Touffe-Blin 0a36db19bf Fix #11543 - use DescribeInstances API to retrieve the correct private DNS name 2016-02-04 08:48:25 +11:00
James Ravn c3383b3422 Fix formatting of aws_test.go 2016-01-26 15:13:25 +00:00
James Ravn b4bbc3b3ef Fix removal of aws security group ingress
The ip permission method now checks for containment, not equality, so
order of parameters matter. This change fixes
`removeSecurityGroupIngress` to pass in the removal permission first to
compare against the existing permission.
2016-01-26 13:57:52 +00:00
Dogan Narinc and James Ravn 190c829ac5 Fix AWS ip permission comparison on security group
Change isEqualIPPermission to consider the entire list of security group
ids on when checking if a security group id has already been added.

This is used for example when adding and removing ingress rules to the
cluster nodes from an elastic load balancer. Without this, once there
are multiple load balancers, the method as it stands incorrectly returns
false even if the security group id is in the list of group ids. This
causes a few problems: dangling security groups which fill up an
account's limit since they don't get removed, and inability to recreate
load balancers in certain situations (receiving an
InvalidPermission.Duplicate from AWS when adding the same security
group).
2016-01-26 11:30:27 +00:00
Kenneth Shelton d399a8f8cc * Added UDP LB support (for GCE) 2016-01-05 20:51:21 +00:00
k8s-merge-robot e86c3de65b Merge pull request #16633 from brendandburns/aws2
Auto commit by PR queue bot
2015-11-13 02:01:55 -08:00
Brendan Burns 64aa189bd2 Make the AWS provider target the metadata server for local data lookup 2015-11-12 15:15:01 -08:00
Justin Santa Barbara 55c4140a0a AWS: Refactor interfaces to take a single request arg
Cleaning up some of the older code that tried to abstract the AWS SDK,
from when the AWS SDK was less consistent (pre aws-sdk-go).
2015-11-08 22:35:12 -08:00
k8s-merge-robot a6634adc1c Merge pull request #15435 from zhengguoyong/adjust_package_name_pkgcloudprovider
Auto commit by PR queue bot
2015-10-16 08:30:32 -07:00
eulerzgy 8b174f7f33 adjust package name for pkg/cloudprovider 2015-10-10 16:44:54 +08:00
Trevor Pounds f71533ce20 Remove unnecessary describe VPC call.
The external DescribeVPCs call is unnecessary since only the VPC ID
is used and it is retrieved from the EC2 metadata service.
2015-10-09 10:19:56 -07:00
Trevor Pounds 326dd7c1c0 Remove private struct field. It is only used at construction. 2015-10-09 10:19:56 -07:00
Christian Simon c1a14bd163 aws: fixes ELB creation with multiple subnets per AZ
Only takes the first available subnet in a AZ, ignore other subnets
and log warning about this.

Removes AWS region comparison for subnet AZs. A VPC is only in a single
AWS region.

Fixes #12381
2015-10-01 21:38:11 +01:00
Trevor Pounds 9cd91d111d Use AWS SDK EC2 metadata client. 2015-09-25 17:03:22 -07:00
Trevor Pounds df0718caa1 Migrate source to aws-sdk-go v0.9.9.
Upgrading to aws-sdk-go >= v0.9.0 requires a
source migration via awsmigrate-renamer tool.

see: http://aws.amazon.com/releasenotes/2948141298714307
2015-09-25 17:03:22 -07:00
Trevor Pounds 1a7f8dc30c Check load balancer and cluster have the same region. 2015-09-21 12:38:00 -07:00
Christian Simon 1bfba8a590 Enhanced detection of VPC for cloudprovider AWS
* use metadata of instance rather than hardcoded VPC name
* test coverage for retrieval of network metadata
2015-09-02 16:28:55 +01:00
Justin Santa Barbara 08e904ad96 AWS: Configure LoadBalancer health checks
ELB will automatically create a health check, but if we update the
listeners the old health check port sticks around, and all the instances
are marked offline.

Update the health-checks to match the listeners: we just check the first
valid service port, with some hard-coded options for timeouts / retries etc.
2015-08-17 08:58:46 -04:00
Justin Santa Barbara 924350d5f6 AWS: Make load balancer creation idempotent on AWS
This turned out to be a little convoluted, but is needed because deleting an ELB on AWS
is a painful UX - it won't have the same endpoint when it is recreated.

Also started splitting the provider into files, but only for new functions (so far!)
2015-08-17 08:58:46 -04:00
CJ Cullen e20467afcb Clean up GCE metadata calls. Remove GetNodeResources from all providers. 2015-08-14 07:29:52 -07: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