Commit Graph

113 Commits (2076071bbfb2cb5aab448cb87c24147c0db931e7)

Author SHA1 Message Date
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 07471cf90f Merge pull request #27553 from justinsb/pvc_zone_spreading_2
Automatic merge from submit-queue

AWS/GCE: Spread PetSet volume creation across zones, create GCE volumes in non-master zones

Long term we plan on integrating this into the scheduler, but in the
short term we use the volume name to place it onto a zone.
    
We hash the volume name so we don't bias to the first few zones.
    
If the volume name "looks like" a PetSet volume name (ending with
-<number>) then we use the number as an offset.  In that case we hash
the base name.
2016-06-22 01:22:16 -07:00
Zach Loafman f63ac1962c GCE provider: Create TargetPool with 200 instances, then update with rest
Tested with 2000 nodes, this actually meets the GCE API specifications
(which is nutty). Previous PR (#25178) was based on a mistaken
understanding of a poorly documented set of limitations, and even
poorer testing, for which I am embarassed.
2016-06-21 18:15:02 -07:00
Justin Santa Barbara dd94997619 Add comments & misc review fixes
Lots of comments describing the heuristics, how it fits together and the
limitations.

In particular, we can't guarantee correct volume placement if the set of
zones is changing between allocating volumes.
2016-06-21 15:22:16 -04:00
Zach Loafman ebc65f1dd3 Revert "GCE: Allow nodes to exceed target pool maximums"
This reverts commit faf0c44429.
2016-06-21 09:54:56 -07:00
Zach Loafman dd4dae4a57 GCE provider: Limit Filter calls to regexps rather than insane blobs
Filters can't exceed 4k, and GET requests against the GCE API are also
limited, so these break down in different ways at different cluster
counts. Fix it by introducing an advisory node-instance-prefix
configuration in the GCE provider that can hint the
EnsureLoadBalancer/UpdateLoadBalancer code (and the firewall
creation/update code). If it's not there, or wrong (a hostname that's
registered violates it), just ignore it and grab the whole project.
2016-06-21 08:34:48 -07:00
k8s-merge-robot 090e6ff660 Merge pull request #27625 from goltermann/spell2
Automatic merge from submit-queue

Fix several spelling errors in comments

What the title says
2016-06-18 23:08:28 -07:00
k8s-merge-robot 7ea6705519 Merge pull request #25929 from jingxu97/bug-notag
Automatic merge from submit-queue

refuse to create a firewall rule with no target tag

fixes #25145

This modification in gce.firewallObject() will return error when trying
to create or update firewall rule if no node tag can be found. Also add
unit test for this modification.
2016-06-17 23:56:17 -07:00
Justin Santa Barbara 9c2566572d GCE Multizone: Allow volumes to be created in non-master zone
We had a long-lasting bug which prevented creation of volumes in
non-master zones, because the cloudprovider in the volume label
admission controller is not initialized with the multizone setting
(issue #27656).

This implements a simple workaround: if the volume is created with the
failure-domain zone label, we look for the volume in that zone.  This is
more efficient, avoids introducing a new semantic, and allows users (and
the dynamic provisioner) to create volumes in non-master zones.

Fixes #27657
2016-06-17 23:27:41 -04:00
Justin Santa Barbara e711cbf912 GCE/AWS: Spread PetSet volume creation across zones
Long term we plan on integrating this into the scheduler, but in the
short term we use the volume name to place it onto a zone.

We hash the volume name so we don't bias to the first few zones.

If the volume name "looks like" a PetSet volume name (ending with
-<number>) then we use the number as an offset.  In that case we hash
the base name.

Fixes #27256
2016-06-17 23:27:31 -04:00
goltermann 218645b346 Fix several spelling errors in comments. 2016-06-17 10:41:18 -07:00
Zach Loafman 49b3936829 GCE provider: Fix minor cosmetic logging issue
Log the pollOp, not the base op.
2016-06-13 14:53:12 -07:00
k8s-merge-robot 5d8710196b Merge pull request #26962 from zmerlynn/log-gce-better
Automatic merge from submit-queue

GCE provider: Log full contents of long operations

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()Dump JSON of long running (>1m) GCE operations.
2016-06-12 10:46:01 -07:00
Jan Safranek 5cd5ae8d82 Add GCE attacher unit tests. 2016-06-08 13:53:04 +02:00
Jan Safranek 2b342c1e76 Add interface to abstract GCE volume operations.
We want to write unit test with fake GCE.
2016-06-08 12:37:08 +02:00
Zach Loafman ce6537aa48 GCE provider: Log full contents of long operations
Dump JSON of long running (>1m) GCE operations.
2016-06-07 06:58:43 -07:00
Quinton Hoole 4983183cdd Merge pull request #26020 from quinton-hoole/2016-05-21-google-cloud-dns
Google Cloud DNS dnsprovider.
2016-05-28 07:55:21 -07:00
Quinton Hoole 0af78dcce7 Google Cloud DNS dnsprovider rewrite/refactor for unit tests. Successfully Tested against both real backend and stubbed backend. 2016-05-27 15:22:43 -07:00
Jing Xu 9a66dc7282 refuse to create a firewall rule with no target tag
Implements #25145
This modification in gce.firewallObject() will return error when trying
to create or update firewall rule if no node tag can be found. Also add
unit test for this modification.
2016-05-26 17:33:39 -07:00
Minhan Xia a1bd33f510 promote sourceRange into service spec 2016-05-26 10:42:30 -07:00
Zach Loafman 34d69f4497 Revert "GCE provider: Rate limit all API calls"
This reverts commit 9b5cdfb705.
2016-05-25 14:23:46 -07:00
Zach Loafman 4adc542667 Revert "Log requests to GCE"
This reverts commit 55fdc1c036.
2016-05-25 14:23:41 -07:00
Wojciech Tyczynski 55fdc1c036 Log requests to GCE 2016-05-24 18:14:37 +02:00
Zach Loafman 9b5cdfb705 GCE provider: Rate limit all API calls
Instead of just rate limits to operation polling, send all API calls
through a rate limited RoundTripper.

This isn't a perfect solution, since the QPS is obviously getting
split between different controllers, etc., but it's also spread across
different APIs, which, in practice, rate limit differently.

Fixes #26119 (hopefully)
2016-05-23 23:23:53 -07:00
Zach Loafman faf0c44429 GCE: Allow nodes to exceed target pool maximums
If we would exceeded the TargetPool API maximums, instead just
randomly select some subsection of the nodes to include in the TP
instead.
2016-05-09 21:44:58 -07:00
Alex Robinson 3d435b56be Merge pull request #25225 from a-robinson/fix
Actually populate nodeTags field in GCE provider struct
2016-05-05 14:35:01 -07:00
Alex Robinson 15874cd717 Actually populate nodeTags field in GCE provider struct 2016-05-05 21:26:54 +00:00
Alex Robinson b75fa08aec GCE: Prefer preconfigured node tags for firewalls, if available 2016-05-04 22:49:06 +00:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Alex Robinson d69ccd5c8c Fix gce.getDiskByNameUnknownZone logic. 2016-04-18 22:55:59 -07:00
Prashanth Balasubramanian 7436fc6261 Default firewall port to TCP when unspecified. 2016-03-28 11:06:19 -07:00
harry 8472cfa214 Refactor throttle into util pkg
Fix missing throttle.go
2016-03-25 08:32:23 +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
k8s-merge-robot 8c02a46c4d Merge pull request #22486 from thockin/update-gcfg-dep
Auto commit by PR queue bot
2016-03-21 18:47:21 -07:00
k8s-merge-robot 0fe049f9ff Merge pull request #23019 from alex-mohr/oplimit
Auto commit by PR queue bot
2016-03-19 02:26:56 -07:00
saadali 26e3d7a27a Add zone to GCE "disk not found" error message 2016-03-16 17:31:12 -07: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
Alex Mohr 6dc63f805f Add a rate limiter to the GCE cloudprovider
It will poll for operation completion with at most 10 qps to avoid
triggering GCE's rate limits.
2016-03-15 15:47:32 -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 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
k8s-merge-robot fe03c663d9 Merge pull request #22094 from alex-mohr/routes
Auto commit by PR queue bot
2016-02-29 05:46:51 -08:00
k8s-merge-robot 394d5da23c Merge pull request #21319 from Clarifai/ensure-lb-servicename
Auto commit by PR queue bot
2016-02-27 02:03:14 -08:00
Vishnu kannan 85efe33c16 Use local metadata server, if available, for GCE compute API invocations.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-26 16:54:22 -08:00
Alex Mohr 0816fa2072 Add support for more than 500 results to GCE cloud provider API calls
for Instance.List and Routes.List which we will definitely have
more than 500 of when supporting 1000 nodes.

Add TODOs for other GCE List API calls to do similar fixes.

Add more logging to GCE's routecontroller.go when creating or deleting routes.
2016-02-26 16:03:01 -08:00
Rudi Chiarito af4507b1ae Add service name to descriptions for GCE LB resources
Follow up from #20731. I have no way of testing this.

There's an additional group of functions (Get|Delete|Reserve)GlobalStaticIP that can create an IP without the
service description, but those are not called anywhere in the Kubernetes codebase and are probably for the
Ingress project. I'm leaving those alone for now.
2016-02-24 10:21:31 -05:00
Minhan Xia 7ffb123abe add source range support for loadbalancer on gce 2016-02-18 17:05:02 -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
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
Tim Hockin fecb71420c Demote static IPs ASAP for easier cleanup
This exposed bugs in the IP promotion/demotion logic.
2016-02-06 21:15:06 -08:00
k8s-merge-robot 1b52e0ec3a Merge pull request #20210 from jsafrane/devel/gce-tags
Auto commit by PR queue bot
2016-02-05 21:36:25 -08:00