Commit Graph

544 Commits (5b6a7c601211822002ef18dd97fd3b43e5fa8d19)

Author SHA1 Message Date
Alex Robinson d481ba7547 Merge pull request #14964 from a-robinson/lbdelete
Unrevert #14608 and decrease the latency of GCE load balancer deletions
2015-10-05 16:26:07 -07:00
Alex Robinson 90a9e01a68 Delete GCE external load balancer components in parallel.
This will cut down on the amount of time it takes to delete an external
load balancer, which should reduce the likelihood of resource leaks when
clusters are deleted.
2015-10-05 22:43:25 +00:00
Alex Robinson cfdde6f7d4 Fix PR for maintaining a GCE IP independently of the forwarding rule.
This code was in rough shape, so I've fixed the issues with the original
PR as well as a few other changes:
1. Clarify the error messages related to the "gce Addresses" to make it
   clear we're talking about static IP addresses
2. Fix the bug in the original PR, which was a nil pointer dereference
   from passing op to waitForRegionOp when the address doesn't exist.
3. Rearrange the steps of EnsureTCPLoadBalancerDeleted to be the reverse
   of EnsureCreated, which mostly just seems like good practice to me.
   This is also supported by the following two bugs I found :(
4. Fix an independent bug of returning too early if the target pool
   doesn't exist, effectively stranding the firewall. This was likely
   introduced because target pools used to be the last thing deleted,
   so it was previously safe to return there.
5. Fix an independent bug of not returning an error waiting for the
   target pool to be deleted failed. This was very possibly causing
   target pool leaks in our e2e tests. This was similarly due to
   assuming that the target pool was the last thing deleted in the
   function, then having the firewall deletion stuck in after it.
2015-10-05 22:43:15 +00:00
Alex Robinson d578e7738d Merge pull request #14242 from simonswine/fix_mulitple_subnets_per_az
aws: fixes ELB creation with multiple subnets per AZ
2015-10-05 13:06:19 -07:00
Marcin Wielgus 5adeb00583 Merge pull request #15048 from Huawei-PaaS/fixed_typos_for_cloudprovider
Fixed some typos and improved comments for cloudprovider
2015-10-05 17:49:15 +02:00
qiaolei 919add69be Fixed some typos and improved comments 2015-10-03 22:43:10 +08:00
k8s-merge-robot cc34aee8ab Merge pull request #14526 from saad-ali/issue13751GCEPollOps
Auto commit by PR queue bot
2015-10-02 09:46:28 -07:00
k8s-merge-robot a34855e0d1 Merge pull request #14657 from justinsb/aws_more_regions
Auto commit by PR queue bot
2015-10-02 03:48:25 -07:00
Brendan Burns 0e71ea1253 Maintain an IP address independent of the forwarding rule for GCE 2015-10-01 21:42:36 +00: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
k8s-merge-robot 8356270cce Merge pull request #14430 from Defensative/updated-fw-tags
Auto commit by PR queue bot
2015-10-01 03:51:13 -07:00
eulerzgy 4c588d771c ent 2015-09-30 14:49:19 +08:00
eulerzgy 71b96422f4 set capital in some files 2015-09-30 14:46:20 +08:00
Brendan Burns 4b1d3d8b0c Merge pull request #14245 from tpounds/update-to-aws-sdk-go-v0.9.9
Update to aws-sdk-go v0.9.9
2015-09-29 19:31:14 -07:00
saadali 7771151767 GCE PD attach/detach operations should poll to verify successful completion 2015-09-29 14:32:06 -07:00
Justin Santa Barbara fda6243c5e AWS: Recognize cn-north-1 & us-gov-west-1 regions
These two regions were accidentally omitted.  This list now matches the
list we use elsewhere (e.g. when choosing an AMI).

Fixes #14420
2015-09-28 07:01:45 -07:00
Trevor Pounds ea85e2319b Use set interface methods. 2015-09-25 23:19:33 -07:00
Brian Grant 9f01981863 Revert "Maintain an IP address independent of the forwarding rule for GCE plus bug fixes" 2015-09-25 22:04:35 -07: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
Alex Robinson 242d28cf68 Fix PR for maintaining a GCE IP independently of the forwarding rule.
This code was in rough shape, so I've fixed the issues with the original
PR as well as a few other changes:
1. Clarify the error messages related to the "gce Addresses" to make it
   clear we're talking about static IP addresses
2. Fix the bug in the original PR, which was a nil pointer dereference
   from passing op to waitForRegionOp when the address doesn't exist.
3. Rearrange the steps of EnsureTCPLoadBalancerDeleted to be the reverse
   of EnsureCreated, which mostly just seems like good practice to me.
   This is also supported by the following two bugs I found :(
4. Fix an independent bug of returning too early if the target pool
   doesn't exist, effectively stranding the firewall. This was likely
   introduced because target pools used to be the last thing deleted,
   so it was previously safe to return there.
5. Fix an independent bug of not returning an error waiting for the
   target pool to be deleted failed. This was very possibly causing
   target pool leaks in our e2e tests. This was similarly due to
   assuming that the target pool was the last thing deleted in the
   function, then having the firewall deletion stuck in after it.
2015-09-25 18:49:51 +00:00
Brendan Burns a5f4484f24 Maintain an IP address independent of the forwarding rule for GCE 2015-09-25 16:36:13 +00:00
Christopher Eck 511e3e1be9 Fix for issue #14466. Don't use tag filtering when looking up which VPC an AWS node is attached to. 2015-09-24 09:51:35 -07:00
Kenneth Shelton 65ad351c7f * Removed host tag tests as they now require real live nodes 2015-09-23 09:10:52 -07:00
Kenneth Shelton aef8ba00e0 Ran gofmt -s 2015-09-23 08:40:51 -07:00
Kenneth Shelton 967fac0adc Changed to use sets utility 2015-09-22 12:26:50 -07:00
Kenneth Shelton 10f79eb490 Updated GCE FW target tag logic to use the set of longest tag prefixes from all instances 2015-09-22 09:31:41 -07:00
Trevor Pounds 1a7f8dc30c Check load balancer and cluster have the same region. 2015-09-21 12:38:00 -07:00
Trevor Pounds 4775a8a5bb Remove superfluous ELB region lookup logic.
The ELB client lookup isn't necessary because the service
does not operate across regions. Instead the client should
be built like the others by querying for the region from
the master node's metadata service.
2015-09-21 12:38:00 -07:00
Trevor Pounds ed8748a6b6 Remove obsolete TCPLoadBalancer interface method. 2015-09-21 12:38:00 -07:00
Daniel Martí 586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07: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
k8s-merge-robot 22f698f5b0 Merge pull request #13953 from liguangbo/change_iff_to_if_and_only_if
Auto commit by PR queue bot
2015-09-16 08:35:20 -07:00
liguangbo 4df68f03a3 change iff to if and only if to improve annotation readability 2015-09-16 08:29:36 +00:00
Prashanth Balasubramanian bd0eb34aec InstanceGroups 2015-09-14 16:04:41 -07:00
Prashanth Balasubramanian d096aaffd8 BackendServices 2015-09-14 16:04:41 -07:00
Prashanth Balasubramanian 9b929addec GlobalForwardingRules 2015-09-14 16:04:40 -07:00
Prashanth Balasubramanian b3a1c585cd TargetHttpProxy 2015-09-14 16:04:34 -07:00
Prashanth Balasubramanian 83a2dfdef0 UrlMap 2015-09-14 16:02:08 -07: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
tummychow 78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Jan Safranek f7384827b8 Fixed error handling of cloud init.
Avoid creating a new 'err' variable in the 'if'-branch, shadowing the one
in the outer scope.

Any error from subsequent 'cloud, err = GetCloudProvider()' was not propagated
to 'err' variable in the outer scope and thus errors were never returned from
this function.

This is hard to debug error on OpenStack, when content of --cloud-config=
file is wrong or connection to OpenStack fails. Such error is never logged
and Kubernetes thinks everything is OK.
2015-09-08 10:46:49 +02:00
Isaac Hollander McCreery 219a1fae62 Second attempt at GCE tokens behavior to new format 2015-09-04 08:36:55 -07:00
Piotr Szczesniak b813ebadee Revert "GCE tokens behavior to new format" 2015-09-04 10:26:19 +02:00
Piotr Szczesniak 30d7f0e101 Merge pull request #13449 from ihmccreery/tokens
GCE tokens behavior to new format
2015-09-04 09:11:09 +02:00
Abhi Shah b8179eae24 Merge pull request #13467 from simonswine/feature_enhanced_vpc_detection
Enhanced detection of VPC for cloudprovider AWS
2015-09-03 15:47:28 -07:00
Isaac Hollander McCreery d3398e2aed GCE tokens behavior to new format 2015-09-02 14:13:51 -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
Daniel Smith e25540c955 Merge pull request #9663 from swagiaal/aws-add-shared-credentials-provider
Add SharedCredentials Provider to AWS
2015-09-01 15:24:29 -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
Sami Wagiaalla 4a33c9cb44 Add SharedCredentials Provider to AWS
This will allows authentication with the AWS API using the
~/.aws/credentials file which is created by runnign 'aws configure' on
a node.

Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-08-31 11:20:46 -04:00
Sreekanth Pothanis f5da6b34ce Cinder Volume Plugin 2015-08-30 19:56:27 -07:00
CJ Cullen cb7d3f0148 Return an error from gce.EnsureTCPLoadBalancer with no hosts. 2015-08-28 17:15:47 -07:00
Prashanth B 05b205bab6 Revert "Volume Plugin for Cinder; Openstack Block Storage" 2015-08-28 10:56:24 -07:00
Prashanth B 8d0d54ffed Merge pull request #6689 from spothanis/cinder-vol-plugin
Volume Plugin for Cinder; Openstack Block Storage
2015-08-28 10:47:31 -07:00
Yu-Ju Hong d839ab2024 Merge pull request #12940 from Miciah/Warning-to-Warningf
glog.Warning -> glog.Warningf
2015-08-26 13:36:05 -07:00
Sreekanth Pothanis c841a20361 Cinder Volume Plugin 2015-08-25 15:13:56 -07:00
Alex Robinson 87d86cf7a4 Be more lenient when deriving the node tag from a node name on GCE. 2015-08-24 23:03:42 +00: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
Miciah Masters 8aa299da90 glog.Warning -> glog.Warningf
Fix three places where glog.Warning is used with a formatted string.
2015-08-19 16:22:28 -04: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 907090a777 Move new files into pkg/cloudprovider/providers/aws/
They were not caught by the general reorg because they weren't on
master.
2015-08-17 08:59:29 -04:00
Justin Santa Barbara d947a8f78b Update imports to new k8s.io style 2015-08-17 08:58:46 -04: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
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
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
CJ Cullen 1f3c322ded Merge pull request #12438 from derekparker/handle-fqdn-gce
Handle full hostname when computing host tag on GCE
2015-08-11 10:11:23 -07:00
Filip Grzadkowski 38c3e351d8 Merge pull request #12203 from jgriffiths1993/subnetid-vip
Pass SubnetID to vips.Create()
2015-08-11 10:59:56 +02:00
Alex Robinson cd3c3fe479 Merge pull request #12373 from cjcullen/network
Use full URLs for GCE networks
2015-08-10 14:21:42 -07:00
Veres Lajos 9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Derek Parker 48fadc1570 Handle full hostname when computing host tag on GCE
The current code assumes the full domain name will not be included,
which is not always the case. This patch adds support for computing the
host tag from a fully qualified domain name.
2015-08-08 10:20:29 -05:00
CJ Cullen 5882c35e45 Use full URLs for GCE networks 2015-08-07 14:58:28 -07:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Joshua Griffiths 950bc8401b Check for nil, not unspecified 2015-08-05 18:28:25 +01:00
Eric Paris b4fb24f4bd Move from code.google.com to google.golang.org for google-api-go-client 2015-08-04 20:08:55 -04:00
Joshua Griffiths c911df6b46 Pass SubnetID to vips.Create() 2015-08-04 14:51:22 +01:00
gmarek d27ad5b714 Controller codebase refactoring 2015-08-03 17:06:25 +02:00
gmarek 4e772738ca Emit event when NodeController is evicting Pods. 2015-08-03 10:19:51 +02:00
Mike Danese 20129b0adf Merge pull request #12028 from cjcullen/kl2
Make gce.ExternalID() use metadata server when requesting current external ID
2015-07-31 15:43:58 -07:00
Mike Danese ad90c92693 Merge pull request #12042 from cjcullen/retry
Make gce operation polling more robust.
2015-07-31 14:50:37 -07:00
CJ Cullen a4c64a5829 Make gce.ExternalID() use metadata server when requesting current external ID
Use the already computed instanceID instance of looking it up again.
2015-07-31 12:01:45 -07:00
Mike Danese 7a1d4477db Merge pull request #12029 from iterion/use-external-id-for-routes
Use external id when reconciling routes
2015-07-31 10:23:11 -07:00
CJ Cullen 983748b2e2 Make gce operation polling more robust.
Only fail the operation if we cannot poll it 3 consecutive times.
2015-07-31 10:08:41 -07:00
Adam Sunderland 75674e7f4b Fetch AWS PrivateDNSName for route recon 2015-07-31 10:57:38 -05:00
Mike Danese dd3195084d Merge pull request #11992 from pmorie/nodecontroller-now
Accurately report ts used to make decisions in node-controller.go
2015-07-30 11:18:06 -07:00
Mike Danese 1ae4a94257 Merge pull request #11949 from justinsb/golang_switch_type_autocast
Cleanup #11029 to use go autocast-after-type-switch
2015-07-30 09:54:33 -07:00
Mike Danese 1b84fb7d74 make testclient threadsafe by guarding internal state with accessors 2015-07-29 16:17:17 -07:00
Paul Morie 1ff8964c20 Accurately report ts used to make decisions in node-controller.go 2015-07-29 17:11:19 -04:00
Justin Santa Barbara edd21d1e7a Cleanup #11029 to use go autocast-after-type-switch
(thanks to brendandburns for the suggestion)
2015-07-28 12:10:31 -04:00
Daniel Smith 8d5a6b063c Merge pull request #11029 from justinsb/fix_aws_security_group_races
AWS: Fix security group races
2015-07-27 16:15:43 -07:00
Alex Robinson 60611c253e Add a resync period for services in the service controller.
This should ensure all load balancers get deleted even if a reordering of
watch events causes us to strand one after its service has been deleted,
because the sync will notice that the service controller's cache has a
service in it that no longer exists in the apiserver.

It could still leak in the case that the controller manager is killed
between when it leaks something and the sync runs, but this should
improve things.
2015-07-27 18:03:13 +00:00