Kelsey Hightower
c21a0ca39f
Breakup the registry package into separate packages.
...
Currently all registry implementations live in a single package,
which makes it bit harder to maintain. The different registry
implementations do not follow the same coding style and naming
conventions, which makes the code harder to read.
Breakup the registry package into smaller packages based on
the registry implementation. Refactor the registry packages
to follow a similar coding style and naming convention.
This patch does not introduce any changes in behavior.
2014-08-11 20:58:09 -07:00
Clayton Coleman
c6dcfd544f
Merge pull request #839 from yugui/fix/api-status
...
Make storage.Delete return *api.Status instead of api.Status
2014-08-11 20:01:28 -04:00
Daniel Smith
c372b74bc8
Merge pull request #847 from thockin/health
...
Use IntOrString for health checks
2014-08-11 16:28:24 -07:00
Daniel Smith
6460a8cbf8
Correct confusing comment.
2014-08-11 15:58:59 -07:00
brendandburns
3222f61bca
Merge pull request #557 from lavalamp/podLocation
...
Prepare for external scheduler
2014-08-11 15:27:24 -07:00
Tim Hockin
1c8704befc
Merge pull request #592 from lavalamp/schedulerApi
...
Proposal for scheduler API
2014-08-11 15:20:45 -07:00
Daniel Smith
5e34a9784f
Merge pull request #852 from smarterclayton/deliver_state_on_nil_version
...
Watch delivers current state for resourceVersion=0
2014-08-11 15:13:15 -07:00
Daniel Smith
b5352a81c7
Use DesiredState rather than CurrentState for Host.
2014-08-11 15:12:51 -07:00
Dan Mace
b986c520a7
Apply resource versioning to list extractions from etcd
...
Set the resource version on lists of objects extracted from etcd to prevent
them from always being interpreted as new during updates.
2014-08-11 21:11:08 +00:00
Clayton Coleman
c5630a9567
Watch delivers current state for resourceVersion=0
...
Allows clients to get the current state without having to execute
a get followed by a watch. Makes integration with action loops
much cleaner.
2014-08-11 17:07:14 -04:00
Daniel Smith
b7752a86d4
Add debugging info printing to etcd fake
...
And make tests pass again.
2014-08-11 13:09:24 -07:00
Daniel Smith
9050c819dc
Merge pull request #722 from smarterclayton/improve_errors
...
Normalize apiserver error handling of standard errors
2014-08-11 12:43:06 -07:00
Tim Hockin
bca90f4866
Reduce and comment exports
2014-08-11 00:11:59 -07:00
Tim Hockin
7beac7a9af
Split health_check.go into smaller parts.
...
Distinct files for core, http, and tcp.
2014-08-11 00:01:17 -07:00
Tim Hockin
24c516ec1d
Move HTTP code out of health.go
...
Put it with the related HTTP code.
2014-08-10 23:50:06 -07:00
Tim Hockin
c67c1edfb4
Use IntOrString for TCP health check ports
...
Clean up code to be more testable. Add test cases for named and numeric
ports in TCP health checks. Improve tests.
2014-08-10 23:44:42 -07:00
Tim Hockin
7201227cb1
Use IntOrString for HTTP health check ports
...
Clean up code to be more testable. Add test cases for named and numeric
ports in HTTP health checks. Improve tests.
2014-08-10 23:26:42 -07:00
Daniel Smith
7d605467dc
New scheduler API
...
This commit adds a Binding object. The idea is that schedulers can write
these to cause pods to be asssigned to hosts. I'll provide an implementation
along with a rudimentary scheduler plugin.
This continues k8s' tradition of phrasing all APIs as RESTful handlers.
2014-08-10 19:05:03 -07:00
Daniel Smith
5cdce0e35a
Prepare for external scheduler
...
1. Change names of Pod statuses (Waiting, Running, Terminated).
2. Store assigned host in etcd.
3. Change pod key to /registry/pods/<podid>. Container location remains
the same (/registry/hosts/<machine>/kublet).
2014-08-10 15:05:36 -07:00
Clayton Coleman
d419eedb06
Watch handler not returning after 404
2014-08-09 10:46:56 -04:00
Yuki Yugui Sonoda
d359f3c396
Make storage.Delete return *api.Status instead of api.Status
...
as apiserver.APIServer.finishReq expects.
This solves the warning in finishReq:
"programmer error: use *api.Status as a result, not api.Status."
2014-08-09 22:18:24 +09:00
Clayton Coleman
0083fae453
Provide helpers and tests for common error types
...
Unify error handling in apiserver into a single path - RESTStorage
objects must provide appropriate errors individually. Ensure ALL
errors which can be traced to logical faults with RESTStorage are
returned as api.Status objects.
2014-08-08 19:44:47 -04:00
Daniel Smith
079c9043bd
Switch to new external fuzz package
2014-08-08 15:54:09 -07:00
Clayton Coleman
71c6e082d4
Merge pull request #805 from lavalamp/serverWatch
...
Improve watch
2014-08-08 17:30:28 -04:00
brendandburns
4c00acdde0
Merge pull request #827 from brendandburns/kubelet
...
Add container hashing to the container name, and restart containers on changes.
2014-08-08 14:17:11 -07:00
Daniel Smith
5dd130a350
Prevent accidental setting of sync or timeout
2014-08-08 14:09:14 -07:00
Daniel Smith
49cded3800
Simplify ResourceWatcher interface to one function.
2014-08-08 14:09:13 -07:00
Daniel Smith
71709ae09e
Make replication controller use client
2014-08-08 14:09:13 -07:00
Daniel Smith
51caf759c3
Add WatchReplicationControllers to kubecfg's fake
2014-08-08 14:09:13 -07:00
Daniel Smith
85ff1d3e7f
Add fake client to make testing easier.
2014-08-08 14:09:13 -07:00
Daniel Smith
097147545c
Allow more general parameters to be made by client. Also fix style and comments.
2014-08-08 14:09:13 -07:00
Daniel Smith
283fdba6ab
Add more parameters to Watch
...
* Add labels selector (same as List)
* Add fields selector
* Plan to let you select pods by Host and/or Status
* Add resourceVersion to let you resume a watch where you left off.
2014-08-08 14:09:13 -07:00
Clayton Coleman
a74fac7d70
Centralize path magic in apiserver into the New method
...
Make OperationHandler and WatchHandler properly encapsulate their
concerns and make them not depend on the global path
2014-08-08 16:33:44 -04:00
Brendan Burns
2986db9885
Add container hashing to the container name, and restart containers on changes.
2014-08-08 13:32:07 -07:00
Daniel Smith
2297bf8cea
Merge pull request #830 from brendandburns/net
...
Delete containers for a pod if we have to create the network container.
2014-08-08 13:12:42 -07:00
Brendan Burns
38900a9c58
Delete containers for a pod if we have to create the network container.
2014-08-08 12:34:59 -07:00
Daniel Smith
ac6d6ec974
Merge pull request #807 from smarterclayton/abstract_apiserver_encoding
...
Decouple apiserver from codec implementation
2014-08-08 11:57:04 -07:00
Victor Marmol
adc57da3f3
Merge pull request #825 from brendandburns/runin
...
Add support for "run in"
2014-08-07 23:47:19 -07:00
Brendan Burns
d31d0781b2
Add support for "run in"
2014-08-07 20:27:58 -07:00
Clayton Coleman
c9fc0bcf3d
Decouple apiserver from codec implementation
...
The apiserver on initialization must be provided with a codec
for encoding and decoding all handled objects including api.Status
and api.ServerOp. In addition, the RESTStorage Extract() method
has been changed to New(), which returns a pointer object that the
codec must decode into (the internal object). Switched registry
methods to use pointers for Create/Update instead of values.
2014-08-07 13:35:35 -04:00
Clayton Coleman
d7f46718a8
Kubelet should have a max think time before auto resync
...
The sync frequency should be part of the syncLoop and resync no
less often than every X seconds. The current implementation runs
even if a config update was delivered less than X seconds ago.
2014-08-07 10:40:03 -04:00
brendandburns
b43e3865b4
Merge pull request #789 from thockin/cleanups2
...
Rename files: stringlist -> list (similar to set)
2014-08-06 22:41:46 -07:00
csrwng
92be0b3f43
Fix the wrong action being recorded on GetService
...
Fix the action recorded when GetService gets called on FakeKubeClient
Also fix parameter names (controller -> service)
2014-08-07 00:15:44 -04:00
Tim Hockin
37309ece6d
Rename files: stringlist -> list (similar to set)
2014-08-06 20:13:40 -07:00
Tim Hockin
ebef8af8fe
Merge pull request #688 from Sarsate/volume-cleanup-loop
...
Volume reconciliation loop
2014-08-06 16:59:17 -07:00
Danny Jones
7c28e0849f
Reorganization; Directory traversal less ugly
...
Directory traversal is no longer recursive and only goes as deep as it
needs to. Moved GetActiveVolumes to volume packages and added a simple
test.
2014-08-06 11:20:34 -07:00
Daniel Smith
8c529187b5
Merge pull request #806 from smarterclayton/follow_up_to_encoding_abstraction
...
Address remaining comments from #756
2014-08-06 10:47:41 -07:00
Danny Jones
3f7f6cb2dc
Modifies tests to use new volume objects.
2014-08-06 10:21:59 -07:00
Danny Jones
6191ffc0de
Modifies directory walker to use a regex
...
Now a regex is used to determine active volume properties from
their directory paths.
2014-08-06 10:21:59 -07:00
Danny Jones
47bca30edc
Splits volume interface into Builders and Cleaners
...
Different information is needed to perform setup versus teardown. It
makes sense to separate these two interfaces since when we call teardown
from the reconciliation loop, we cannot rely on having the
information provided by the api definition of the volume.
2014-08-06 10:21:59 -07:00