Commit Graph

71 Commits (3215e8535ae8afcf850fbaac9df7ff9abe42f9e0)

Author SHA1 Message Date
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
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
Justin Santa Barbara 29e95431c5 Correctly document cloudprovider Instances contract
The requirement that ExternalID returns InstanceNotFound when the
instance not found was incorrectly documented on InstanceID and
InstanceType.  This requirement arises from the node controller, which
is the only place that checks for the InstanceNotFound error.
2016-07-22 21:59:31 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Minhan Xia a1bd33f510 promote sourceRange into service spec 2016-05-26 10:42:30 -07: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
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
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
Kenneth Shelton d399a8f8cc * Added UDP LB support (for GCE) 2016-01-05 20:51:21 +00: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
qiaolei 919add69be Fixed some typos and improved comments 2015-10-03 22:43:10 +08: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
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
CJ Cullen e20467afcb Clean up GCE metadata calls. Remove GetNodeResources from all providers. 2015-08-14 07:29:52 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Satnam Singh 9f32599bee Merge pull request #9720 from justinsb/aws_routes
Refactor Routes, and dynamically configure minion CIDRs on AWS
2015-06-18 17:16:29 -07:00
Justin Santa Barbara a3b43a36fd Refactor cloud route interface, to avoid assumption that routes are named 2015-06-18 14:59:37 -07:00
Justin Santa Barbara a77bc9cfc4 Document assumption made by node-controller, and fix AWS to match
ExternalID must return "", cloudprovider.InstanceNotFound if the instance
is not found, for nodecontroller to remove nodes corresponding to deleted instances.
2015-06-18 14:55:10 -07:00
Justin Santa Barbara df87470ecf Allow cloud providers to return a node identifier different from the hostname 2015-06-18 12:40:05 -07:00
Satnam Singh e4f5529a2d Revert "Allow nodename to be != hostname, use AWS instance ID on AWS" 2015-06-18 11:27:55 -07:00
Justin Santa Barbara efaead81dc Allow cloud providers to return a node identifier different from the hostname 2015-06-17 00:40:43 -04:00
Brendan Burns 5115fd5703 Add key generation. 2015-06-05 14:55:15 -07:00
Justin Santa Barbara c741b8f3ae Pass ports as []*api.ServicePort into LoadBalancer provider
Because AWS needs the NodePort; this also paves the way for e.g. UDP balancing
2015-05-29 18:47:05 -04:00
Federico Simoncelli 2a89428d44 api: add the ProviderID attribute to NodeSpec
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-28 13:01:58 -04:00
Federico Simoncelli faba12951a cloudprovider: add support for InstanceID method
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-28 12:47:50 -04:00
Federico Simoncelli 194343267d cloudprovider: add the ProviderName method
This patch adds the ProviderName method used to identify the cloud
provider.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-05-28 12:47:47 -04:00
Robert Bailey 1dfaa93ccd For GCE, compute the external IP by using the local metadata
server. This is in many ways a revert of #7530 but after auditing
the code I found that this function is now only used to determine
an address of the node where it is currently running.
2015-05-27 17:41:41 -07:00
Justin Santa Barbara 3884d5fc59 Add LoadBalancer status to ServiceStatus
This will replace publicIPs
2015-05-22 18:27:05 -04:00
Dawn Chen 677a4aa1a7 Merge pull request #8164 from cjcullen/cloudprovider
Route creation reconciler loop.
2015-05-22 12:27:50 -07:00
Quinton Hoole 6d8eaa924e Merge pull request #7852 from a-robinson/tp
Prevent stranding of partial load balancers resources
2015-05-22 10:12:30 -07:00
CJ Cullen e6da5b9601 Make routecontroller_test less hacky.
Rename reconcilePodCIDRs to reconcileNodeCIDRs.
Add comments and TODOs about using controller framework.
2015-05-21 18:05:11 -07:00
CJ Cullen 0d12a15971 Route creation reconciler loop. 2015-05-20 14:21:30 -07:00
CJ Cullen bf646abf8d Revert "Revert "Modify nodes to register directly with the master.""
This reverts commit c53786ab31.
2015-05-20 14:21:03 -07:00
Quinton Hoole c53786ab31 Revert "Modify nodes to register directly with the master." 2015-05-20 13:47:51 -07:00
Alex Robinson dbf224475d Require DeleteTCPLoadBalancer to be idempotent and change the service
controller to rely on that, so that we won't strand partial resources
from them anymore (target pools in GCE, pools in OpenStack, etc.).
2015-05-19 17:06:54 +00:00
Robert Bailey 01467e0bb8 Modify nodes to register directly with the master.
- Delete nodes when they are no longer ready and don't exist in the
cloud provider.
 - Label each node with it's hostname.
 - Add flag to skip node registration.
 - Add a test for registering an existing node.
2015-05-19 09:55:07 -07:00
Tim Hockin a548d542db Rename AffinityType to ServiceAffinity 2015-05-18 17:21:30 -07:00
Tomek Kulczynski 290c7b94ef Make nodecontroller configure nodes' pod IP ranges 2015-05-05 16:10:42 -07:00
Quinton Hoole 8bc481d65c Merge pull request #7669 from a-robinson/lb
Change the cloud provider TCPLoadBalancerExists function to GetTCPLoadBalancer...
2015-05-05 11:42:06 -07:00
Quinton Hoole 83b70c4411 Revert "Revert #7145 now that #7609 is in, and fix the tests that were relying on it" 2015-05-02 23:32:21 -07:00
Jeff Lowdermilk b447dc0c54 Merge pull request #7635 from a-robinson/length
Revert #7145 now that #7609 is in, and fix the tests that were relying on it
2015-05-01 17:48:41 -07:00
Alex Robinson a047250b53 Change the cloud provider TCPLoadBalancerExists function to GetTCPLoadBalancer,
which returns the IP/DNS address of the load balancer, enabling more
intelligent reconciliation in the service controller.
2015-05-01 17:42:23 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Alex Robinson 890ff7b4aa Revert #7145 now that #7609 is in, and fix the tests that were relying on it. 2015-05-01 10:49:23 -07:00
caesarxuchao e9c5e44767 Use service UID as the ELB name 2015-04-21 12:20:42 -07:00
Alex Robinson fc08a0a71b Do service creation/update/deletion work in a pool of goroutines, protecting
each service with a lock to ensure that no two goroutines will process a
service at the same time. This is needed to avoid weird race conditions.
2015-04-15 00:30:18 +00:00