Commit Graph

118 Commits (34924af63d8c049f740875f1a0ef69eb13ca0eb8)

Author SHA1 Message Date
Alex Robinson 9a351e3670 Move validation of load balancers only supporting TCP ports to validation.go. 2015-04-14 18:56:51 +00:00
Alex Robinson 2b14fc1d14 Remove the cloud provider field from the services REST handler and the master
now that load balancers are handled by the ServiceController.
2015-04-14 18:56:47 +00:00
Alex Robinson ccc300289f Implement a ServiceController that watches services and handles keeping
external load balancers up-to-date based on the service's specs, using
the new DeltaFIFO watch queue class. Remove the old registry REST
handler code for creating/updating/deleting load balancers.

Also clean up a bunch of the GCE cloudprovider code related to load balancers.
2015-04-14 18:56:24 +00:00
Wojciech Tyczynski 59ab41c8f7 Merge pull request #6292 from jszczepkowski/scale-pool
Updating target pools on cloud nodes change.
2015-04-13 10:58:49 +02:00
Justin Santa Barbara e551e0cb8c Use defer to cleanup allocated service ip in case of error
We're probably going to be doing a port allocation here also, so this needs some pre-simplifying.
2015-04-10 09:47:47 -07:00
Jerzy Szczepkowski eb253a694e Updating target pools on cloud nodes change.
Implemented updating target pools for external services on chage of cloud nodes. Related to #5241.
2015-04-10 16:06:56 +02:00
Wojciech Tyczynski 0e5b478b4d ListMinions support for selectors 2015-04-09 14:22:09 +02:00
Victor Marmol 2de37624e8 Merge pull request #6252 from krousey/string_format_cleanup
Fixing a lot of string formatting issues
2015-03-31 16:57:36 -07:00
Kris Rousey 6904c4d585 Fixing a lot of string formatting issues with regards to:
* Improper format specifier (e.g. %s for bools or %s for ints)
  * More or less parameters than format specifiers
  * Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
2015-03-31 16:47:10 -07:00
Tim Hockin 186818d787 WIP: Implement multi-port Services 2015-03-30 19:28:11 -07:00
Tim Hockin 8ae203825b Implement multi-port endpoints
Instead of endpoints being a flat list, it is now a list of "subsets"
where each is a struct of {Addresses, Ports}.  To generate the list of
endpoints you need to take union of the Cartesian products of the
subsets.  This is compact in the vast majority of cases, yet still
represents named ports and corner cases (e.g. each pod has a different
port number).

This also stores subsets in a deterministic order (sorted by hash) to
avoid spurious updates and comparison problems.

This is a fully compatible change - old objects and clients will
keepworking as long as they don't need the new functionality.

This is the prep for multi-port Services, which will add API to produce
endpoints in this new structure.
2015-03-27 12:36:32 -07:00
Satnam Singh cd05c8b9bc Give better error message for PUTs with no resource version 2015-03-25 15:52:48 -07:00
Masahiro Sano 410e11c305 port endpoints to generic etcd 2015-03-25 22:15:19 +09:00
Jordan Liggitt a75b501821 Improve ResourceLocation API, allow proxy to use authenticated transport 2015-03-24 11:11:34 -04:00
Clayton Coleman 9bb797fe93 Rename NewREST -> NewStorage to align on terminology 2015-03-23 16:52:21 -04:00
Clayton Coleman d46087db50 Move REST* interfaces into pkg/api/rest
Dependency chain is now api -> api/rest -> apiserver.  Makes the
interfaces much cleaner to read, and cleans up some inconsistenties
that crept in along the way.
2015-03-23 16:52:21 -04:00
Clayton Coleman 65425f690c Move field errors to pkg/util/fielderrors
Allows pkg/api to take a reference to labels.Selector and fields.Selector
2015-03-22 17:43:34 -04:00
Abhishek Gupta b0c23c1046 Headless Services: Adding option to specify None for PortalIP 2015-03-20 12:10:03 -07:00
Brendan Burns cf68593fc2 Merge pull request #5228 from justinsb/aws_lb_string
Change cloud provider CreateTCPLoadBalancer to return endpoint as string
2015-03-13 12:16:26 -07:00
Salvatore Dario Minonne 925fa6baf8 Adding fields selector 2015-03-10 22:13:10 +01:00
Justin Santa Barbara 5d36d3cdbe Change cloud provider CreateTCPLoadBalancer to return endpoint as string
Some load balancers (particularly AWS ELB) define the public endpoint
as a hostname (instead of using IP addresses).

This is a partial fix for #5224; there will also be some proxy work.
2015-03-09 20:35:13 -07:00
Brendan Burns 5b6a78fc77 Place external load balancers in a namespace, and add a test to validate the behavior. 2015-03-06 17:16:27 +01:00
Mike Danese 5cbf89c060 plumb through changes on ReplicationController and Service 2015-03-04 10:38:42 -08:00
Lénaïc Huard cd719d97df Fix `kubernetes` and `kubernetes-ro` services creation
If `kube-apiserver` is started before `etcd` is reachable, `kube-apiserver`
fails to create those services.
However, in the `Create` function, an IP has already been reserved for them.
When `etcd` comes back, the `Create` function fails because it considers that
the IP is already used.

If the service couldn't be created, the reserved IP should be released.
2015-02-27 18:01:03 +01:00
Satnam Singh 19b927ea57 Name a cluster and use it to make forwarding rules for GCE 2015-02-23 17:04:33 -08:00
Daniel Smith 650f6cb826 Revert "Multi-port Endpoints" 2015-02-23 13:53:21 -08:00
Tim Hockin 160f288832 Implement multi-port Endpoints
This is a part of multi-port services.
2015-02-22 09:35:12 -08:00
Tim Hockin ae0062d001 Part 2 of plural ports: make endpoints a struct
Includes conversions for v1b[12] and tests and fixups for call sites.
2015-02-18 19:54:15 -08:00
Tim Hockin 876b0c4619 Merge pull request #4484 from jszczepkowski/load-balancer
Update for external load balancer.
2015-02-17 17:04:08 -08:00
Paul Weil 8d7d03a2f8 service NewList should return ServiceList 2015-02-17 16:30:29 -05:00
Jerzy Szczepkowski 397c1fc69a Update for external load balancer.
Implementation of updating external load balancer on service update. This partially fixes #4411.
2015-02-17 21:49:36 +01:00
Yu-Ju Hong 9e72ec023b Remove obsolete defaulting in service/rest.go 2015-02-17 10:34:50 -08:00
Clayton Coleman 26f08b7807 RESTStorage should not need to know about async behavior
Also make sure all POST operations return 201 by default.
Removes the remainder of the asych logic in RESTStorage and
leaves it up to the API server to expose that behavior.
2015-02-11 16:26:08 -05:00
Brian Grant 50b1034b6c Merge pull request #4122 from pmorie/comment
Clarify commenting in endpoints_controller
2015-02-05 07:09:56 -08:00
Paul Morie 3229a634a0 Clarify commenting in endpoints_controller 2015-02-04 15:14:05 -05:00
Brian Grant 3f28badae3 Merge pull request #3854 from yujuhong/defaults
Migrate API defaulting to a centralized location
2015-02-04 11:41:23 -08:00
Tim Hockin 411666decb Get rid of ServiceSpec.ProxyPort
As far as I know, nobody uses it.  It was replaced by PublicIPs.  If I were
being very polite I would leave it in internal, but since I am 99.99% sure
nobody uses it, I am cutting it.  Let's argue about it.
2015-02-03 22:45:00 -08:00
Yu-Ju Hong 4a72addaeb Factor out API defaulting from validation logic
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).

 * This change is based on pull request 2587.

 * Most defaulting has been migrated to defaults.go where the defaulting
   functions are added.

 * validation_test.go and converter_test.go have been adapted to not testing the
   default values.

 * Fixed all tests with that create invalid objects with the absence of
   defaulting logic.
2015-02-03 00:55:42 -08:00
Clayton Coleman 1588970ec4 Turn 409 into 500 Try Again Later when using generateName
If a client says they want the name to be generated, a 409 is
not appropriate (since they didn't specify a name). Instead, we
should return the next most appropriate error, which is a 5xx
error indicating the request failed but the client *should* try
again.  Since there is no 5xx error that exactly fits this purpose,
use 500 with StatusReasonTryAgainLater set.

This commit does not implement client retry on TryAgainLater, but
clients should retry up to a certain number of times.
2015-02-02 14:46:25 -05:00
Clayton Coleman 0a87f0332b Add name generation to services 2015-02-02 14:46:25 -05:00
saadali e83fd7b8e7 Make master service IP static (no longer randomly assigned) 2015-01-30 16:07:19 -08:00
Clayton Coleman a0356bca96 Unify validation logic for create and update paths
Ensure ObjectMeta is consistently validated on both create and update

Make PortalIP uncleareable
2015-01-28 13:10:37 -05:00
Paul Morie fd834ae84d Pods should see services only from their own ns 2015-01-14 17:06:36 -05:00
Clayton Coleman 22c99c98e2 Split RESTStorage into separate interfaces
Omit unimplemented interfaces from Swagger
2015-01-12 12:19:45 -05:00
Tim Hockin ca27fb259c Don't use pointers for session affinity 2014-12-29 14:43:17 -08:00
Mike Foley c4e94efe16 Sticky Session Implementation
- Added process to cleanup stale session affinity records
- Automatically set cloud provided load balancer for sticky session if the service requires it - Note, this only works on GCE right now.
- Changed sessionAffinityMap a map to pointers instead of structs to improve performance
- Commented out cookie and protocol from sessionAffinityDetail to avoid confusion as it is not yet implemented.
2014-12-18 18:46:10 -05:00
Brendan Burns bac915a066 Return an error if a user attempts to create an externalized UDP balancer. 2014-12-10 20:08:03 -08:00
Clayton Coleman 19379b5a38 Internal rename api.Minion -> api.Node 2014-12-10 12:08:18 -05:00
Clayton Coleman 2c27f7d332 Allow an empty service 2014-12-09 12:48:53 -05:00
Tim Hockin 0c03f6e784 Enable public IPs even in not createExternal...
This allows the proxier to portal Public IPs even if the
createExternalLoadBalancer flag is not set.

This also fixes what appears to be a bug in the createExternalLoadBalancer path
wherein multiple PublicIPs would get truncated.
2014-11-26 10:54:28 -08:00