Commit Graph

70 Commits (fc76242f4afd2c7e41ae943f4f3f518f3df9377e)

Author SHA1 Message Date
nikhiljindal dcc368c781 Removing more references to v1beta1 from pkg/ 2015-04-24 00:45:17 -07:00
Brian Grant 15c2986a07 Merge pull request #7067 from ravigadde/master
Added field selector for listing pods
2015-04-22 07:12:21 -07:00
Yu-Ju Hong df2cbd4877 Prioritize deleting the non-running pods when reducing replicas
This changes instructs the replication controller to delete replicas in the
order of "unscheduled (pending)", "scheduled (pending)", and "scheduled
(running)" pods. This is less disruptive than deleting random pods.
2015-04-21 10:17:29 -07:00
Ravi Gadde bf8f258471 Added field selector for listing pods. 2015-04-21 06:33:28 -07:00
Daniel Smith a2953fdc7e Make endpoint controller use framework 2015-04-17 15:21:51 -07:00
Brendan Burns afa0100e27 Copy labels from the service to endpoints that we create. 2015-04-06 13:14:54 -07:00
Tim Hockin eeff1b74fb Fixes from feedback and testing 2015-03-30 23:52:37 -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
Brian Grant d75291dbe7 Merge pull request #5838 from nikhiljindal/clientTests
Updating unit tests so that they pass with v1beta3 api
2015-03-24 17:30:50 -07:00
Deyuan Deng ca68f4a9d1 Rename ConditionFull->ConditionTrue, ConditionNone->ConditionFalse 2015-03-24 17:28:59 -04:00
nikhiljindal 7e3b7f9673 Updating unit tests so that they pass with v1beta3 api 2015-03-24 12:13:53 -07:00
Tim Hockin 4375376e9c Rename Service.ContainerPort to TargetPort in v1b3
Fix all callers and examples.  Part of multi-port service cleanup.
2015-03-20 13:50:06 -07:00
Federico Simoncelli daed0af3b5 api: return endpoints target object references
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-10 18:32:53 -04:00
Brendan Burns f8dd4fcac5 Change the service port defaulting to be more sane. 2015-03-04 02:00:24 -08:00
Tim Hockin 5aadd6ecae Change the v1b3 default for service ContainerPort
In v1b1 and v1b2 we choose the "first defined port" if you do not specify a
ContainerPort.  I am proposing that v1b3 just assume the ContainerPort is the
same as the service port unless explicitly provided.  This leaves named ports
for now, but that is under discussion on its own.

This is strictly compatible, though to implement this we have to leave the
internal objects with the looser behavior until v1b[12] die.  This also adds a
link dependency so that when we DO kill v1b[12] the endpoints controller will
blow up, prompting a fix.
2015-03-03 09:40:18 -08:00
Tim Hockin ea548b8260 Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-27 21:05:59 -08:00
Mike Danese 5267127af1 api: rename conditionkind -> conditiontype 2015-02-23 22:13:21 -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 e0fd83096c Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-21 22:26:38 -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 34eaa0dbd6 Part 1 of plural ports: Add protocol to Endpoints
This makes it easier to make the second step, which is moving endpoints
to a struct instead of a string.
2015-02-18 18:58:04 -08:00
Clayton Coleman 3e2e4714a2 Always set ?namespace in query if specified
Revise our code to only call Request.Namespace() if a namespace
*should* be present.  For root scoped resources, namespace should
be ignored.  For namespaced resources, it is an error to have
Namespace=="".
2015-02-16 00:23:38 -05:00
Mike Danese 043794492e implement readiness. 2015-02-10 08:30:09 -08:00
Paul Morie 3229a634a0 Clarify commenting in endpoints_controller 2015-02-04 15:14:05 -05:00
Clayton Coleman 7932bda3b3 Endpoints controller can print sensitive pod info when errors occur
In general, start to tone down the amount of log output.
2015-01-22 15:23:41 -05:00
Clayton Coleman 16683b409f endpoints controller is too verbose
Logging at v(3) instead of v(0)
2015-01-07 17:19:49 -05:00
Clayton Coleman 2c27f7d332 Allow an empty service 2014-12-09 12:48:53 -05:00
Tim Hockin ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
markturansky 8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Clayton Coleman 6d31c2bf8a util.EncodeJSON proven harmful, remove it everywhere
People were misusing EncodeJSON in tests when they should be using
runtime.EncodeOrDie(testapi.Codec(), obj).  Removing the potential
for cutting self on sharp objects.
2014-11-13 10:38:13 -05:00
Claire Li 5a7c00754f Fix findPort: correctly handle the empty ports case 2014-11-06 21:55:43 -08:00
Claire Li c5205870c0 Refactor test for findPort in service pkg 2014-11-06 21:55:43 -08:00
Claire Li ea0c6bcbfd Refactor findPort in service pkg 2014-11-06 21:55:43 -08:00
markturansky bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Daniel Smith 7146ec9d49 Implement kubernetes & kubernetes-ro services 2014-10-29 11:29:28 -07:00
bgrant0607 854af6b926 Merge pull request #1966 from ddysher/Stop-test-server
Stop test server in endpoint unittest.
2014-10-27 16:35:18 -07:00
derekwaynecarr 341e404290 Fix sync service endpoints typo 2014-10-24 11:47:30 -04:00
derekwaynecarr 580cb5ea4f Rework client.Interface 2014-10-24 11:47:30 -04:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman 7550c146dc Replace struct initializers for TypeMeta with ObjectMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman bc748fadfa Whitespace and old comment removal 2014-10-24 11:22:21 -04:00
Deyuan Deng f14eebf6bf Stop test server in endpoint unittest. 2014-10-22 20:14:39 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Daniel Smith d34914517f Shorten 'CodecForVersionOrDie' name, add 'ResourceVersioner' to testapi 2014-10-13 14:58:06 -07:00
Clayton Coleman 82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Daniel Smith cc086908aa Merge pull request #1578 from brendandburns/controller
Extract the service controller from the apiserver.
2014-10-06 12:44:41 -07:00
Brendan Burns e6991d0a66 Extract the service controller from the apiserver, put it in the controller manager for now. 2014-10-03 15:27:22 -07:00