Commit Graph

6617 Commits

Author SHA1 Message Date
Danny Jones
dfc9cb86f0 Initial reconciliation loop.
Determines the set of active volumes versus the set of valid volumes
defined by the manifests. If there is an active volume that is not
defined in any of the manifests, deletes and cleans up that volume.
2014-08-06 10:21:59 -07:00
Clayton Coleman
67dbd15929 Address remaining comments from #756
Rename Encoding to Codec, Versioning to ResourceVersioner.  Add
GoDoc.  Add Delete(key, recursive) to EtcdHelper
2014-08-06 11:25:35 -04:00
Clayton Coleman
836d2b9808 Fix proxy error condition and simplify method
Add new minion proxy test case.
2014-08-06 01:03:17 -04:00
Tim Hockin
63a7c37650 Merge pull request #799 from sborman/master
Corrected a typo in comment.
2014-08-05 17:17:02 -07:00
Kouhei Ueno
22522cd003 PodConfigListener is never used 2014-08-06 06:43:16 +09:00
Sean Borman
1fc29e20cc Corrected a typo. 2014-08-05 13:53:52 -07:00
Daniel Smith
860050b507 Merge pull request #745 from smarterclayton/add_structured_reason
Evolve the api.Status object with Reason/Details
2014-08-05 13:28:19 -07:00
Clayton Coleman
4f88b778a6 Evolve the api.Status object with Reason/Details
Contains breaking API change on api.Status#Details (type change)

Turn Details from string -> StatusDetails - a general
bucket for keyed error behavior.  Define an open enumeration
ReasonType exposed as Reason on the status object to provide
machine readable subcategorization beyond HTTP Status Code. Define
a human readable field Message which is common convention (previously
this was joined into Details).

Precedence order: HTTP Status Code, Reason, Details. apiserver would
impose restraints on the ReasonTypes defined by the main apiobject,
and ensure their use is consistent.

There are four long term scenarios this change supports:

1. Allow a client access to a machine readable field that can be
   easily switched on for improving or translating the generic
   server Message.

2. Return a 404 when a composite operation on multiple resources
   fails with enough data so that a client can distinguish which
   item does not exist.  E.g. resource Parent and resource Child,
   POST /parents/1/children to create a new Child, but /parents/1
   is deleted.  POST returns 404, ReasonTypeNotFound, and
   Details.ID = "1", Details.Kind = "parent"

3. Allow a client to receive validation data that is keyed by
   attribute for building user facing UIs around field submission.
   Validation is usually expressed as map[string][]string, but
   that type is less appropriate for many other uses.

4. Allow specific API errors to return more granular failure status
   for specific operations.  An example might be a minion proxy,
   where the operation that failed may be both proxying OR the
   minion itself.  In this case a reason may be defined "proxy_failed"
   corresponding to 502, where the Details field may be extended
   to contain a nested error object.

At this time only ID and Kind are exposed
2014-08-05 16:17:53 -04:00
Daniel Smith
dc0a475be9 Merge pull request #796 from nyaxt/fixrace
Avoid data race in Proxier.OnUpdate
2014-08-05 12:56:05 -07:00
Kouhei Ueno
2e02967aca Avoid data race in Proxier.OnUpdate
The bug was that the proxier is passed as value on method decleration.
This caused a copy of Proxier to be created when the method was invoked.
The copy being a shallow copy turned out to have them both reference
a same map instance, but their mutexes were different instances.
This turned out to use different mutexes before operating on a same map
instance, which didn't make sense.
2014-08-06 04:34:54 +09:00
Daniel Smith
e75854a1f9 Merge pull request #759 from brendandburns/valid
Add c-identifier validation to service ids.
2014-08-05 12:32:02 -07:00
Daniel Smith
6f85a5b8aa Merge pull request #794 from nyaxt/reland_atomicetcd
Remove duplicated defs and reland #694.
2014-08-05 12:07:59 -07:00
Daniel Smith
2d3373664f Merge pull request #765 from brendandburns/service
Add support for regions, and use them for cloud load balancing.
2014-08-05 11:59:36 -07:00
brendandburns
cc4300c3ec Merge pull request #757 from lavalamp/repCtl
Remove etcd dep from controller manager
2014-08-05 11:47:31 -07:00
brendandburns
f87a93af7a Merge pull request #754 from kelseyhightower/proxy-cleanup
proxy: cleanup and minor refactoring
2014-08-05 11:46:52 -07:00
brendandburns
bf40981197 Merge pull request #758 from lavalamp/clientCache
Watch based client cache
2014-08-05 11:46:22 -07:00
Kouhei Ueno
c1ec1d6d72 Remove duplicated def of IsEtcdNodeExist 2014-08-06 03:45:50 +09:00
Kouhei Ueno
c7947abd9c Revert "Revert "Use atomic create in EtcdHelper.AtomicUpdate""
This reverts commit 73b64aa490.
2014-08-06 03:43:19 +09:00
Brendan Burns
20a8f03d62 Add dns-952-identifier validation to service ids. 2014-08-05 11:40:48 -07:00
Brendan Burns
c27ab18481 Don't use zone for regional load balancers. 2014-08-05 11:38:33 -07:00
Brendan Burns
1d8407cf7d Don't hard code load balancer zone. 2014-08-05 11:38:33 -07:00
Daniel Smith
73b64aa490 Revert "Use atomic create in EtcdHelper.AtomicUpdate" 2014-08-05 11:34:00 -07:00
Daniel Smith
51872d65c9 Merge pull request #694 from nyaxt/atomicetcd
Use atomic create in EtcdHelper.AtomicUpdate
2014-08-05 11:19:22 -07:00
Daniel Smith
5ff072030c Merge pull request #746 from smarterclayton/atomic_create
Make create atomic for etcd on Services/ReplControllers
2014-08-05 11:08:55 -07:00
Kouhei Ueno
dea1b8c48b Remove 10ms timeout from TestWatch 2014-08-06 01:02:58 +09:00
Kouhei Ueno
cf117d5b48 Add test for EtcdHelper.AtomicUpdate concurrent create 2014-08-06 00:30:55 +09:00
Kouhei Ueno
4799b546c9 Make fake_etcd_client threadsafe 2014-08-05 23:37:32 +09:00
Kouhei Ueno
3f9ec452e4 use atomic create in EtcdHelper.AtomicUpdate 2014-08-05 23:37:32 +09:00
Kouhei Ueno
b3e5f40988 Fix bug where debug "return" prevented whole TestAtomicUpdate run 2014-08-05 23:37:32 +09:00
Kelsey Hightower
1d3e660248 proxy: cleanup and minor refactoring
This change includes minor refactoring and cleanup of the proxy
package including the following items:

 * Rename source files with misspelling of round robin
 * Remove unnecessary and redundant comments
 * Update comments for clarity
 * Add locking when updating the round-robin index
 * Improve method receiver names
 * Rename the LoadBalance method to NextEndpoint to add clarity

No changes in behaviour have been introduced.
2014-08-05 07:18:12 -07:00
Clayton Coleman
325f9ef005 Make create atomic on etcd for Services/ReplControllers 2014-08-05 01:12:27 -04:00
Clayton Coleman
babb7528ce httptest.NewTLSServer is ~0.2s of setup per test
We're not exercising anything TLS related in client and request,
set these back to NewServer.  Should add a new TLS end-to-end
test for hack/test-cmd.sh with real (test) certs.
2014-08-05 00:59:42 -04:00
Kouhei Ueno
6288336436 Rename IsEtcdConflict to IsEtcdTestFailed 2014-08-05 08:07:20 +09:00
Daniel Smith
041d56f3d0 finish testing client/cache 2014-08-04 14:50:01 -07:00
Daniel Smith
03fe91cc4a Add ID to JSONBaseInterface 2014-08-04 14:50:01 -07:00
Daniel Smith
a47b65bf8a Add cache package. 2014-08-04 14:50:01 -07:00
Daniel Smith
b430cebe72 Remove etcd dependency from controller manager. 2014-08-04 14:29:49 -07:00
Tim Hockin
7f0d470979 Merge pull request #776 from nyaxt/respectzone
ServiceRegistryStorage.Delete should respect zone.
2014-08-04 14:29:46 -07:00
Tim Hockin
471955d310 Merge pull request #775 from nyaxt/misc_cleanup
Minor clean ups for readability
2014-08-04 14:29:07 -07:00
Kouhei Ueno
d7fc4637e9 ServiceRegistryStorage.Delete should respect zone. 2014-08-05 06:11:00 +09:00
Daniel Smith
38c4cdff99 Merge pull request #773 from smarterclayton/speed_up_proxy_tests
Remove 8 seconds of unnecessary sleeps from proxy tests
2014-08-04 13:49:07 -07:00
Kouhei Ueno
c6ebc4859e Reduce nesting on ServiceRegistryStorage.Create 2014-08-05 05:38:31 +09:00
Daniel Smith
f36d2a7ebd Merge pull request #740 from brendandburns/sync
Switched Set to Create in etcd tools
2014-08-04 13:15:08 -07:00
Kouhei Ueno
c8e1c6a02f dedupe apiserver.New 2014-08-05 05:11:25 +09:00
Kouhei Ueno
afa686ccc8 dedupe registry.MakeEndpointController init 2014-08-05 05:09:49 +09:00
derekwaynecarr
e5fd877052 Validate on replicas being non-negative 2014-08-04 15:39:45 -04:00
Clayton Coleman
0c33ed09d4 Remove long sleeps from proxy tests 2014-08-04 15:35:03 -04:00
Clayton Coleman
786b0399c3 Make interval a constant on proxy/config/etcd
Allow future testing of intervals
2014-08-04 15:34:43 -04:00
Brendan Burns
ab4918464e Switched Set to Create 2014-08-04 12:10:16 -07:00
roberthbailey
fb49ea331d Merge pull request #764 from brendandburns/expect
Fix unit test build.
2014-08-04 10:16:45 -07:00
brendandburns
27426db827 Merge pull request #756 from smarterclayton/expose_encoding_versioning_interfaces
Expose an Encoding/Versioning interface for use with etcd
2014-08-04 10:10:54 -07:00
Brendan Burns
d648b2350e Fix unit test build. 2014-08-04 09:50:25 -07:00
brendandburns
81a8ac723f Merge pull request #753 from smarterclayton/remove_expect_no_error_apiserver
Remove expectNoError from apiserver
2014-08-04 09:15:34 -07:00
brendandburns
d4860c21a9 Merge pull request #752 from smarterclayton/remove_expect_no_error_util
Remove expectNoError from client, kubelet, and util
2014-08-04 09:15:22 -07:00
brendandburns
97a6aaba53 Merge pull request #751 from smarterclayton/remove_expect_no_error
Remove expectNoError from pkg/registry
2014-08-04 09:14:59 -07:00
brendandburns
6531188f37 Merge pull request #750 from smarterclayton/operation_list_not_returned
/api/v1beta1/operations was returning Not Found
2014-08-04 09:13:27 -07:00
brendandburns
e52c62565b Merge pull request #692 from lavalamp/dockerObjWrap
Copy docker client structs into v1beta1
2014-08-04 09:10:57 -07:00
Clayton Coleman
f7149926c0 Remove expectNoError from client, kubelet, and util 2014-08-04 09:39:06 -04:00
Clayton Coleman
64bf2d9f63 Remove expectNoError from apiserver 2014-08-04 09:37:53 -04:00
Clayton Coleman
ef1329b6c8 Remove expectNoError from pkg/registry 2014-08-04 09:36:47 -04:00
Clayton Coleman
4448be2d95 Expose an Encoding/Versioning interface for use with etcd
etcd_tools.go is not dependent on the specific implementation
(which is provided by pkg/api).  All EtcdHelpers are created
with an encoding object which handles Encode/Decode/DecodeInto.
Additional tests added to verify simple atomic flows.

Begins to break up api singleton pattern.
2014-08-03 21:35:33 -04:00
Clayton Coleman
75aa364b3c /api/v1beta1/operations was returning Not Found
Splitting an empty string returns []string{""}, not []string{}
2014-08-03 19:35:17 -04:00
Clayton Coleman
10564e447b Generate valid file Pod Names and test for them
Ensure that pods coming from the unit test configuration validate,
and that proper names are generated.

Lowercases source filenames, strips all but a-z0-9, and tests
for consistent results.
2014-08-03 18:46:59 -04:00
Daniel Smith
2282f9ce3a Merge pull request #737 from brendandburns/atomic
Make updates atomic from the client side.
2014-08-01 17:30:37 -07:00
Daniel Smith
e8103e30a1 Merge pull request #715 from meirf/value-in-set-selector
structured message for selector; matching functionality
2014-08-01 16:47:47 -07:00
Brendan Burns
1101c00014 Make updates atomic from the client side. 2014-08-01 16:47:25 -07:00
erictune
5b589cf115 Merge pull request #735 from brendandburns/tcp-health
Add TCP socket based health checking.
2014-08-01 16:35:12 -07:00
Daniel Smith
828aed4cc8 Copy docker client structs, adding yaml/json tags.
Use these in our v1beta1 package so that we can pass fuzz test encode/decode.
2014-08-01 15:31:39 -07:00
Daniel Smith
1cc7fce523 Add documentation and tests to conversion. 2014-08-01 14:26:36 -07:00
Daniel Smith
5c0f5e85e2 Make api use converter package. 2014-08-01 14:26:35 -07:00
Daniel Smith
a73e4f4623 Separate generic parts of api library into conversion package. 2014-08-01 14:25:42 -07:00
Brendan Burns
490bb28bf9 Add TCP socket based health checking. 2014-08-01 14:13:56 -07:00
brendandburns
30b6ab5278 Merge pull request #728 from smarterclayton/improve_apiserver_tests
Expand apiserver test cases
2014-08-01 09:32:19 -07:00
Clayton Coleman
8b2b325103 Merge pull request #730 from lavalamp/rename
Begin systemizing files in pkg/registry
2014-08-01 10:57:31 -04:00
Yuki Yugui Sonoda
331fd0d986 Extract "pkg/version".PrintAndExitIfRequested() to its own package
because it causes a runtime panic if a binary which has its own implementation
of "-version" flag tries to reuse a package library which indirectly depend on
"pkg/version".

e.g. If such an user-defined binary tires to link "pkg/api" or "pkg/client",
the binary fails with a runtime panic "flag redefined: version".
2014-08-01 15:05:27 +09:00
Meir Fischer
9076e78654 change strValues's type to util.StringSet; rename Comparator to Operator; small syntax fix 2014-07-31 23:56:37 -04:00
Daniel Smith
7dbb6f02fe Begin systemizing files in pkg/registry
Files that have RESTStorage implementations now end in "storage", and
files that have registries now end in "registry". I removed some
underscores in file names, since it seems to be go style not to have
them. I split minion_registry.go into two files.

We should consider splitting this package into two, to make more clear
the separation between the layers.
2014-07-31 17:24:15 -07:00
Clayton Coleman
af4d57b39a Expand apiserver tests 2014-07-31 18:59:54 -04:00
Clayton Coleman
8986a0fc4b Remove debugging statement 2014-07-31 18:52:15 -04:00
Daniel Smith
928092e79e Etcd watcher verification
To make sure the etcd watcher works, I changed the replication
controller to use watch.Interface. I made apiserver support watches on
controllers, so replicationController can be run only off of the
apiserver. I made sure all the etcd watch testing that used to be in
replicationController is now tested on the new etcd watcher in
pkg/tools/.
2014-07-31 14:54:30 -07:00
Daniel Smith
aa454fea93 Merge pull request #711 from smarterclayton/more_info_about_format_conversion_error
More verbose error on missing field
2014-07-31 14:34:09 -07:00
Clayton Coleman
e1b0000404 Merge pull request #717 from nyaxt/atomicupdate_test
Add test for AtomicUpdate
2014-07-31 16:44:24 -04:00
Clayton Coleman
7ce23e43e7 More verbose error on missing field 2014-07-31 14:38:38 -04:00
Clayton Coleman
28d42a79a4 Merge pull request #719 from csrwng/list_replication_controllers
Add a method to list replication controllers
2014-07-31 14:34:58 -04:00
csrwng
19ddfe72df Fixed FakeKubeClient in kubecfg_test 2014-07-31 13:59:58 -04:00
Kouhei Ueno
d4a5ba863d Add test for AtomicUpdate 2014-08-01 02:35:38 +09:00
Kouhei Ueno
648b80e5d7 Implement FakeEtcdClient.ExpectNotFoundGet 2014-08-01 02:35:38 +09:00
Kouhei Ueno
a3771c9042 AtomicUpdate should use api.Encode 2014-08-01 02:35:38 +09:00
Kouhei Ueno
6dd1e9cbb5 Implement FakeEtcdClient.CompareAndSwap 2014-08-01 02:35:38 +09:00
Kouhei Ueno
ccb7e8793b return EtcdErrorNodeExist when Create is called for existing node 2014-08-01 02:35:37 +09:00
Kouhei Ueno
d46bfcb132 Fail immediately if f.Err is set 2014-08-01 02:35:37 +09:00
Kouhei Ueno
e40cdd50ed Generate modification index only if f.TestIndex is specified.
This is for compatibility with existing tests.
2014-08-01 02:34:08 +09:00
Kouhei Ueno
b82bb37c89 FakeEtcdClient: Maintain change index 2014-08-01 02:34:08 +09:00
Dawn Chen
2e8020be8c Update the entire cAdvisor package. There is a version mismatch issue
which cause #707
2014-07-31 10:11:25 -07:00
csrwng
a3476fcbca Add a method to list replication controllers 2014-07-31 12:37:02 -04:00
Dawn Chen
76ec7acf91 bump(github.com/google/cadvisor): bdd574b728e8a1e5eb08649d631197620dd09650 2014-07-31 09:14:04 -07:00
Meir Fischer
80b1fa000e structured message for selector; matching functionality 2014-07-31 00:29:42 -04:00
Filipe Brandenburger
de405ac126 Improve generation of version information from the git tree
Detect whether the tree is dirty and append a "-dirty" indication to the
git commit (common practice with other repos, e.g. kernel, docker.)

Properly handle the case where a git tree is not found (e.g. building
from archive.)

In the sed expression, look for the variable to be updated
(commitFromGit) instead of hardcoding a line number.

Tested:

- Built from a dirty tree:
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build 2d784c684c75-dirty

- Built from a clean tree:
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build 505f23a31172

- Built from an archive:
    $ hack/build-go.sh
    WARNING: unable to find git commit, falling back to commitFromGit = `(none)`
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build (none)

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-07-30 18:48:57 -07:00
Filipe Brandenburger
7e56609139 Handle -version flag on all commands
Tested: Passed -version argument to kubelet (and all other binaries):
  $ output/go/bin/kubecfg -version
  Kubernetes version 0.1, build 6454a541fd56

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-07-30 18:48:56 -07:00
brendandburns
76e2cd70f7 Merge pull request #683 from smarterclayton/slightly_pause_on_return
Slightly pause on requests to allow most to finish
2014-07-30 16:05:15 -07:00
Dawn Chen
21513b1e08 Merge pull request #691 from dchen1107/restart
Add RestartPolicy to Pod and PodTemplate
2014-07-30 15:32:20 -07:00
Dawn Chen
2740fb0abf Add RestartPolicy to Pod and PodTemplate 2014-07-30 15:31:27 -07:00
Daniel Smith
c5ca032287 Merge pull request #706 from brendandburns/proxy
Revert the revert and fix tests.
2014-07-30 15:19:12 -07:00
brendandburns
59c5fb11c0 Merge pull request #672 from lavalamp/customConversionFuncs
Custom conversion funcs
2014-07-30 15:09:01 -07:00
Brendan Burns
2cbe2c18d4 Add a comment to tickle travis. 2014-07-30 15:06:56 -07:00
Daniel Smith
ce586c1448 Test both directions of the conversion. 2014-07-30 15:04:01 -07:00
Brendan Burns
9519a8049b Fixed tests. 2014-07-30 15:02:36 -07:00
Clayton Coleman
1bdeb058e1 Slightly pause on requests to allow most to finish
Currently, every write will result in a 202 (etcd adding a few
ms of latency to each request).  This forces clients to go into
a poll loop and pick a reasonable server poll frequency, which
results in 1 + N queries to the server for the single operation
and adds unavoidable latency to each request which affects their
perception of the service.

Add a very slight (25ms by default) delay to wait for requests
to finish.  For clients doing normal writes this reduces the
requests made against the server to 1.  For clients on long requests
this has no effect.  The downside is that http connections are held
on to for a longer period in high write loads.  The decrease in
perceived latency from the kubecfg is significant.
2014-07-30 17:49:47 -04:00
brendandburns
2486414c16 Merge pull request #690 from smarterclayton/refactor_apiserver_changes
Clean up pkg/apiserver
2014-07-30 14:41:00 -07:00
brendandburns
5443929b84 Merge pull request #702 from fsouza/update-go-dockerclient
third_party: update go-dockerclient
2014-07-30 14:25:37 -07:00
Daniel Smith
242c8cdaec Add custom conversion function system.
As an example, demonstrate how Env.Key's deprecation ought to work.
2014-07-30 14:18:23 -07:00
Clayton Coleman
e64a393e1a Move handle* methods to their respective locations
Fix names
2014-07-30 17:15:09 -04:00
Clayton Coleman
fe7f611d88 Split operations code and add comments 2014-07-30 17:15:09 -04:00
Clayton Coleman
9069696514 Rename write -> writeJSON 2014-07-30 17:15:09 -04:00
Clayton Coleman
b84c9f7a1c Rename methods and move parseTimeout 2014-07-30 17:15:09 -04:00
Clayton Coleman
82b78912fc Move prefix methods 2014-07-30 17:15:09 -04:00
Clayton Coleman
a2c86e4c97 Simplify helpers 2014-07-30 17:15:09 -04:00
Clayton Coleman
c7d311896e Shorten variable name 2014-07-30 17:15:09 -04:00
Clayton Coleman
8b511832ff Split minion 2014-07-30 17:15:09 -04:00
Clayton Coleman
a46f6313bc Split interfaces 2014-07-30 17:15:09 -04:00
Clayton Coleman
d5e22bfe2a Split index 2014-07-30 17:14:07 -04:00
Clayton Coleman
b70a145161 Split operations test 2014-07-30 17:14:06 -04:00
Clayton Coleman
db51ea2a17 Split async 2014-07-30 17:14:06 -04:00
Clayton Coleman
b911d9265a Split watch 2014-07-30 17:14:06 -04:00
erictune
a41aeeca67 Merge pull request #701 from SebastianM/misspelling
fix misspelling
2014-07-30 13:36:14 -07:00
Francisco Souza
2a345ffa9e third_party: update go-dockerclient
math.MaxInt64 represents 8 exabytes, which is a good limit for memory.
Also, this is the type used by Docker, so it's not possible to get any
value bigger than math.MaxInt64 as memory limit (both ram and swap) on a
Docker container.

Relevant discussion at #589 (more precisely,
https://github.com/GoogleCloudPlatform/kubernetes/pull/589#issuecomment-50640605).
2014-07-30 15:18:42 -03:00
Sebastian Müller
e1172fc78c fix misspelling 2014-07-30 20:10:12 +02:00
Clayton Coleman
dc6fdc423d Merge pull request #627 from lavalamp/fix
Add /version to server and check it in client.
2014-07-30 12:52:15 -04:00
Dan McPherson
d94f5c3360 Fixing typo 2014-07-30 16:45:53 +02:00
Brendan Burns
448a4b7d69 Revert "Revert "Add support for stopping a proxier.""
This reverts commit 19beaf71b5.
2014-07-30 06:52:03 -07:00
brendandburns
0ad9221f5c Merge pull request #695 from danmcp/fix_golint_warnings
Fixing golint warnings
2014-07-30 06:49:27 -07:00
Dan McPherson
d5fcaa1f03 Fixing golint warnings 2014-07-30 13:41:09 +02:00
Daniel Smith
19beaf71b5 Revert "Add support for stopping a proxier." 2014-07-29 23:24:57 -07:00
Daniel Smith
00bdeecb63 Merge pull request #682 from brendandburns/proxy
Add support for stopping a proxier.
2014-07-29 23:20:55 -07:00
brendandburns
b0d18b2af0 Merge pull request #571 from lavalamp/master
Decode/Encode everywhere
2014-07-29 17:19:33 -07:00
Daniel Smith
2396bdfa1b Incorporate new types into versioned api system.
* Made externalize/internalize generic to prevent boilerplate.
* Add fuzz testing.
* All objects pass fuzz tests now.
* This turned up some things we'll need to fix eventually. Left TODOs.
2014-07-29 15:46:57 -07:00
Brendan Burns
99f0d2e807 Add support for stopping a proxier. 2014-07-29 15:40:47 -07:00
Rohit Jnagal
fbd3e85e9c Fix handling of default cpu shares. 2014-07-29 18:34:16 +00:00
Daniel Smith
e10d85efce Merge pull request #685 from smarterclayton/error_on_empty_service
Cleanly delete service without endpoints key
2014-07-29 09:45:31 -07:00
Daniel Smith
4a1660be7c Merge pull request #679 from dchen1107/minionlogs
Fix #663
2014-07-29 09:37:55 -07:00
Daniel Smith
2a0b82a4ed Merge pull request #681 from brendandburns/noisy
Make file error logging edge triggered to reduce log spam.
2014-07-29 09:27:25 -07:00
Clayton Coleman
a49b331794 Cleanly delete service without endpoints key
If a service is deleted before the etcd key corresponding to its
endpoints has been created, a 500 error is returned (etcd key
not found).  Instead, key not found should be ignored silently.

There is a potential race condition with the controller creating
endpoints after the service has been deleted which a cleanup task
should handle in the future.

Closes #684
2014-07-29 11:44:46 -04:00
Brendan Burns
aa703a4e72 Make file error logging edge triggered to reduce log spam. 2014-07-29 05:38:07 -07:00
Dawn Chen
58008510a0 Fix #663
Return all healthy minions instead of only returning the first several
healthy minions. Without the PR, if the first minion failed with health
check, the machine list is empty, thus GET /api/v1beta1/pods failed
with code 500
2014-07-29 00:24:53 -07:00
Daniel Smith
f87bd6b8f9 Merge pull request #628 from jdef/master
named container ports should have sane env var names
2014-07-28 23:05:48 -07:00
Daniel Smith
cd0b25f1e5 Merge pull request #639 from rafael/validate_pods
Validate pod on create and update.
2014-07-28 18:49:51 -07:00
Rafael Chacón
c9a3ab168d Validate pod on create and update.
* This commit adds pod validations on when creating and updating a pod.
2014-07-28 18:02:30 -07:00
Daniel Smith
1d044e5912 Merge pull request #649 from kelseyhightower/improve_volume_test_coverage
volume: improve test coverage and minor refactoring
2014-07-28 17:46:23 -07:00
Daniel Smith
811d710385 Merge pull request #674 from brendandburns/service
Don't hard code load balancer zone.
2014-07-28 17:15:22 -07:00
Dawn Chen
3627bb5190 Merge pull request #675 from dchen1107/minionlogs
Instead of apiserver panic when proxy a request to a dead minion,
2014-07-28 17:03:02 -07:00
Dawn Chen
8e9864e8fc Instead of apiserver panic when proxy a request to a dead minion,
print out proper message through http.Response
2014-07-28 16:40:29 -07:00
Brendan Burns
c717b872a3 Don't hard code load balancer zone. 2014-07-28 15:54:16 -07:00
Daniel Smith
3b8488028d Add /version to server and check it in client.
Will help detect client/version skew and prevent e2e test from passing
while running a version other than the one you think it's running.
2014-07-28 15:45:25 -07:00
Daniel Smith
31a78c3e2b Merge pull request #619 from brendandburns/controller
Make individual controller actions asynchronous.
2014-07-28 15:35:19 -07:00
Brendan Burns
1a3e4f8baf Add some more synchronization. 2014-07-28 15:05:39 -07:00
brendandburns
71b14b464a Merge pull request #623 from smarterclayton/validate_replication_controllers
Add validation to ReplicationControllers
2014-07-28 14:46:47 -07:00
Clayton Coleman
46bb48cf13 Merge pull request #648 from kelseyhightower/improve_health_test_coverage
health: Improve test coverage
2014-07-28 17:08:33 -04:00
Daniel Smith
c92e8d38b6 Merge pull request #642 from kelseyhightower/cleanup_master_configs
Add master.Config type and cleanup master configuration
2014-07-28 12:53:31 -07:00
Daniel Smith
b3cc696486 All types stored in etcd are now API objects.
This means I made an api.ContainerManifestList, and added a JSONBase to
endpoints (and changed Name -> JSONBase.ID).
2014-07-28 11:27:36 -07:00
Brendan Burns
f1d6069b01 Use Decode/Encode in etcd_tools 2014-07-28 11:27:36 -07:00
brendandburns
b34a3c8c21 Merge pull request #630 from lavalamp/fuzz
Add go fuzzer in preparation for testing.
2014-07-28 10:44:59 -07:00
brendandburns
f073cee13b Merge pull request #636 from kelseyhightower/load_auth_info_tests
kubecfg: improve tests around authentication
2014-07-28 10:44:27 -07:00
Clayton Coleman
4ee3deaaf7 Merge pull request #647 from kelseyhightower/fix_extra_test_flags
Remove extra test flags from all commands
2014-07-28 12:58:57 -04:00
Dan McPherson
c4f4f69b93 Fixing Typos 2014-07-28 15:56:20 +02:00
Dan McPherson
7bbc5e2a19 Fixing typos 2014-07-28 15:15:50 +02:00
Daniel Smith
d09b164e67 Add TODOs, clean up, clarify comments, and add one more test. 2014-07-27 19:32:37 -07:00
Clayton Coleman
5bc19584a5 Update Service and ReplControllers to validate
Validations are performed on update and on create.
2014-07-27 19:55:03 -04:00
Daniel Smith
aa92dd7fb2 Add go fuzzer in preparation for testing. Also gofmt a few files that needed it. 2014-07-27 14:54:48 -07:00
Kelsey Hightower
87fa19cdfe Remove extra test flags from all commands
Currently all commands are being build with extra flags. The extra
flags appear because of a direct import of the testing package from
the fake_etcd_client.go source file.

Remove the direct import of the testing package. Add a tools.T
interface to support existing behavior. Also clean up two TODO items
by remove using of the expectError and expectNoError functions.

Fixes #579
2014-07-27 14:19:18 -07:00
Kelsey Hightower
7b59845843 volume: improve test coverage and minor refactoring
The volume package does not test enough use-cases.

Improve test coverage by adding additional tests and refactoring
current tests to use table testing.

This change introduces a new error var to make testing unsupported
volume type errors easier.

This change does not introduce any changes in behavior.
2014-07-27 14:11:19 -07:00
Clayton Coleman
1047c57c6d Use http.StatusInternalServerError instead of 500 2014-07-27 15:37:03 -04:00
Kelsey Hightower
c860ac3afc health: Improve test coverage 2014-07-27 08:44:59 -07:00
Kelsey Hightower
1ca199379f kubecfg: improve tests around authentication
This change adds additional test coverage for the kubecfg
command. There is now a test for the case when the auth info
file does not exist. LoadAuthInfo tests have been refactored
to use table testing.
2014-07-26 22:21:17 -07:00
Kelsey Hightower
6d1be5f0ee Add master.Config type and cleanup master configuration
Setting up a new master.Master instance requires passing
around too many arguments.

Add a master.Config type and group related master configs.
Refactor all commands to instantiate new masters using a
master.Config struct.
2014-07-26 22:07:24 -07:00
Kelsey Hightower
200b2c0ba7 httplog: Improve test coverage 2014-07-26 21:17:10 -07:00
James DeFelice
8e3e65e0f3 named container ports should have sane env var names 2014-07-25 17:55:52 -04:00
Clayton Coleman
d32024870a Extend validation for ReplicationController
Provide type safe checks for empty sets of selectors.
2014-07-25 12:15:17 -04:00
Jeromy Carriere
9cad657b4c Fix internalize for ReplicationControllerList. items were created
in a new var hiding the function-scoped var.
2014-07-25 10:44:45 -04:00
Clayton Coleman
fbd71c9c02 Merge pull request #535 from lavalamp/etcdWatcher
Etcd watcher
2014-07-25 08:40:05 -04:00
Daniel Smith
e3927b428d Merge pull request #618 from brendandburns/async
Make replication controller synchronizations independent.
2014-07-24 22:58:45 -07:00
Brendan Burns
51c5907c55 Make individual controller actions asynchronous. 2014-07-24 22:57:56 -07:00
Brendan Burns
ae0baf3fab Make replication controller synchronizations independent. 2014-07-24 22:46:04 -07:00
Daniel Smith
321ce0e1ce Merge pull request #565 from brendandburns/api2
Fork API types.
2014-07-24 22:29:57 -07:00
Brendan Burns
bf5ae4bb9d Fork API types. 2014-07-24 21:47:08 -07:00
Daniel Smith
f3b6090a38 Make kubecfg work for minions. 2014-07-24 18:04:55 -07:00
Daniel Smith
9e9d9b8913 Merge pull request #607 from smarterclayton/return_correct_content_type
Write the json content type for API responses
2014-07-24 15:27:31 -07:00
Daniel Smith
8881adc905 Merge pull request #606 from jonboulle/master
assorted formatting and typo fixes
2014-07-24 15:25:08 -07:00
Jonathan Boulle
c43035088b assorted formatting and typo fixes 2014-07-24 15:10:36 -07:00
Clayton Coleman
30e881c3f9 Write JSON content type for API responses 2014-07-24 17:45:02 -04:00
Daniel Smith
5ae20f9edb Merge pull request #605 from Sarsate/setup-error
SetUp now returns an error.
2014-07-24 14:13:22 -07:00
Danny Jones
1117da4a55 SetUp now returns an error.
SetUp returns an error, kubelet now skips pod if error occurs.
2014-07-24 13:53:44 -07:00
Victor Marmol
b131da1cf5 Sync pods asynchronously in the Kubelet.
This makes two main changes:
- Runs syncPod in a separate Go routine (and enforces only one of those
  runs at a time).
- Uses the pod list to determine if a container should be running or
  should be killed (used to use the output of syncPod).

Since Docker pulls are synchronized by the Docker daemon we still block
on that, but pods can now be removed and prepared for starting without
blocking on long pulls.
2014-07-24 13:47:51 -07:00
Daniel Smith
41eb15bcff Merge pull request #527 from Sarsate/rootdir-flag
Adds a flag to specify root working directory.
2014-07-24 13:12:55 -07:00
Danny Jones
bfa4642055 Adds a flag to specify root working directory.
--root_dir specifies the directory kubelet will use for it's
procedures. Currently used for volume mounts.
2014-07-24 13:04:05 -07:00
Daniel Smith
65575953c0 Merge pull request #589 from monnand/update-docker-client
update github.com/fsouza/go-dockerclient
2014-07-23 18:00:24 -07:00
Nan Deng
ea4224cbe7 update github.com/fsouza/go-dockerclient 2014-07-23 17:42:03 -07:00
Daniel Smith
b630c7bcb4 Implement watch.Interface via etcd. 2014-07-23 15:04:08 -07:00
Daniel Smith
e2e2ce44c1 Merge pull request #587 from VojtechVitek/data_race
Fix data race in kubelet fake_docker_client
2014-07-23 13:00:55 -07:00
Vojtech Vitek (V-Teq)
1f78b0fc6f Fix reslice and data races in kubelet fake_docker_client
- Fix reslice in Pull() to remove the just returned error
- Fix data races found during the integration testing
- Remove one-liner helper method for better readability
2014-07-23 20:44:42 +02:00
Daniel Smith
7a8e268c0e Merge pull request #548 from kelseyhightower/improve_kubecfg_tests
Use table testing for makePort tests
2014-07-23 09:50:21 -07:00
Kelsey Hightower
609050da39 Use table testing for makePort tests 2014-07-23 00:18:09 -07:00
Brendan Burns
c3f313784d Actually fix kubecfg. 2014-07-22 23:40:55 -07:00
Brendan Burns
fcb9201c3b Add a name to containers created by RunController so that validation works. 2014-07-22 22:58:41 -07:00
Daniel Smith
ec0f639a21 Merge pull request #551 from erictune/private_kubelet
Private kubelet
2014-07-22 18:58:43 -07:00
Daniel Smith
0ef600c8cd Merge pull request #569 from smarterclayton/fix_bad_watch_in_etcd
Kubelet etcd watch skipping indices
2014-07-22 18:23:00 -07:00
Clayton Coleman
fbd7bc375f kubecfg doesn't allow updates because of path checks
Check for 1 path segment on create/list, 2 on update/delete, and
allow any number of path segments on get (for now).

Also pretty prints the list of actual types that are supported for
create/update, which today corresponds to the list of types that
are supported period.
2014-07-22 20:25:06 -04:00
Clayton Coleman
bc0ac1e81b Kubelet etcd watch skipping indices
The next index to watch should always be current+1 if we got a
response from etcd, but otherwise it should always be current.
Moved the increment into fetchNextState which returns the next
index to watch for (or the same if an error occurs)
2014-07-22 20:24:18 -04:00
Eric Tune
ded67ead1e Make Kubelet type members private and provide New functions. 2014-07-22 14:40:59 -07:00
Dawn Chen
47ad71f92d HandleIndex when URL.Path == "/" 2014-07-22 14:12:16 -07:00
Clayton Coleman
2a2fdb4773 Merge pull request #505 from lavalamp/clientWatch
Add client watch capability
2014-07-21 22:11:02 -04:00
Brendan Burns
6c734b1c55 integrate minion health checking and caching. 2014-07-21 21:52:33 -04:00
Clayton Coleman
7767c2a2ac Switch the Kubelet to use kubelet/config
Also transfer the Kubelet from using ContainerManifest.ID to source specific
identifiers with namespacing.  Move goroutine behavior out of kubelet/ and
into integration.go and cmd/kubelet/kubelet.go for better isolation.
2014-07-21 21:27:26 -04:00
Clayton Coleman
09294b90ce Refactor Kubelet config sources for clarity
Create a new "Pod" concept which can identify pods from
many config sources.
2014-07-21 21:18:36 -04:00
Daniel Smith
91375f4c04 Split httpWatcher into watch.StreamWatcher and tools.APIEventDecoder. 2014-07-21 16:07:58 -07:00
Daniel Smith
dbd0d419df Add watch capability to our client.
Next steps: Make an etcd watcher... decide on a state field for pods...
move the scheduler to its own binary.
2014-07-21 16:07:58 -07:00
Daniel Smith
f672edd1cf Merge pull request #457 from dchen1107/minionlogs
Add support to query kubelet's logs and cadvisor's stats through apiserver by passing rawquery
2014-07-21 16:02:44 -07:00
Daniel Smith
5f13c4b048 Merge pull request #545 from kelseyhightower/heath_tests
Improve test coverage for the health package and remove mocks
2014-07-21 15:49:10 -07:00
Daniel Smith
3f33bf78c5 Merge pull request #539 from vmarmol/pause
Add a pause image for the net container.
2014-07-21 15:47:39 -07:00
Kelsey Hightower
fce90dc761 Improve test coverage for the health package and remove mocks
The current tests for the health package utilize a fake HTTP client
for testing health checks and only cover a limited set of test cases.

This patch removes the need for mocks by using the httptest package
from the standard library. After removing the fake HTTP client a bug
was found in the health.Check function; it incorrectly assumes that
a http.Response is always non-nil. Fix the issue by moving the defer
that closes the http.Response.Body after error handling.

Related tests in the registry package have be refactored to work with
the changes made to the health.Check function. All methods that implement
the health.HTTPGetInterface interface now return a http.Response with
with a noop http.Response.Body.

This patch does not introduce any changes in behavior.
2014-07-21 15:30:29 -07:00
Dawn Chen
dc921b8c65 comment changes 2014-07-21 14:46:59 -07:00
Dawn Chen
064237a5b8 Add support to query kubelet's logs and cadvisor's stats through
apiserver by passing rawquery.

minor changes

Fixed a minor rebase issues.

Using ioutil.ReadAll instead of httputil.DumpResponse
2014-07-21 11:52:32 -07:00
Victor Marmol
88317efb42 Add a pause image for the net container.
The pause image is a 240KB image that simply pauses waiting on a signal.
Use this for the net container which only needs to act as a placeholder.
Current net image is ~2.5MB. From my tests, this reduces startup time
for the net container from ~14s to ~6s.
2014-07-21 10:28:49 -07:00
Daniel Smith
7910ae8159 Merge pull request #538 from kelseyhightower/replication_controller_test
remove unnecessary expectNoError helper function
2014-07-20 23:02:56 -07:00
Daniel Smith
d11b6246a1 Merge pull request #547 from kelseyhightower/kubelet_tests
Add test cases for Docker image name parsing and cleanup
2014-07-20 20:55:33 -07:00
Kelsey Hightower
67efa0a53a Add test cases for Docker image name parsing and cleanup
The tests for Docker image name parsing are repetitive and do not
cover enough test cases.

Refactor the tests to use table testing and add additional test cases.
2014-07-20 19:22:54 -07:00
Kelsey Hightower
682efb7ca5 Remove unnecessary expectNoError helper function
This patch completes a TODO item for the kubecfg package test suite by
removing the expectNoError helper function, which does not reduce enough
typing to justify its usage.
2014-07-20 18:28:55 -07:00
Daniel Smith
b577f36492 Merge pull request #541 from kelseyhightower/httplog_test
add tests for the httplog package
2014-07-20 13:42:15 -07:00
Kelsey Hightower
713cadac52 add tests for the healthz package
Currently there are no tests for the healthz package. This patch adds
an initial set of tests and improves test coverage.
2014-07-20 12:28:02 -07:00
Kelsey Hightower
a9e0b0d1a3 use %v instead of %#v when logging failures 2014-07-20 11:58:22 -07:00
Kelsey Hightower
34c80bb976 add tests for the httplog package
Currently there are no tests for the httplog package. This patch adds
an initial set of tests and improves test coverage.
2014-07-20 11:26:13 -07:00
Clayton Coleman
28b7b53c72 Merge pull request #529 from lavalamp/recursiveApiObj
Add APIObject for generic inclusion of API objects
2014-07-20 14:25:35 -04:00
Victor Marmol
0a2b1bf644 If no tag was specified, pull "latest" explicitly.
When no tag is given to Docker pull, it downloads all tags. This could be a
significantly large number of images and in the end we only ever run
:latest.
2014-07-20 10:51:31 -07:00
Kelsey Hightower
3b9029ee94 remove unnecessary expectNoError helper function
This patch completes a TODO item for the replication_controller test
suite by removing the expectNoError helper function, which does not
reduce enough typing to justify its usage.
2014-07-20 09:13:11 -07:00
Kelsey Hightower
dc7ee7c333 normalize -etcd_servers flag across all commands
The -etcd_servers flag is used inconsistently by the Kubernetes commands,
both externally and internally.

This patch fixes the issue by using the same type to represent a list of
etcd servers internally, and declares the -etcd_servers flag consistently
across all commands.

This patch should be 100% backwards compatible with no changes in behavior.
2014-07-20 07:48:47 -07:00
Daniel Smith
69c483f620 Add APIObject for generic inclusion of API objects.
Includes test and json/yaml getters and setters.
2014-07-18 22:35:08 -07:00
Clayton Coleman
d1de579070 Merge pull request #493 from lavalamp/scheduler
Add websocket dep & watch api support
2014-07-18 22:18:03 -04:00
Daniel Smith
05f01a3654 Revert "assorted formatting and typo fixes" 2014-07-18 17:16:30 -07:00
Daniel Smith
211f6b312f Merge pull request #520 from jonboulle/master
assorted formatting and typo fixes
2014-07-18 17:15:30 -07:00
Daniel Smith
eda30d4f20 Add watch mechanism to apiserver
Implemented via HTTP and websocket. A test is present but this isn't
yet wired into anything.

Eventual purpose of this is to allow a scheduler to watch for new pods.
Or allow replication controller to watch for new items it controlls.
Generally, it'll be good to turn everything possible into a push instead
of a poll.
2014-07-18 16:47:17 -07:00
Daniel Smith
60b6f5b6bd Merge pull request #524 from brendandburns/service
Make the service reconciller use the API, not a PodRegistry
2014-07-18 15:01:09 -07:00
Tim Hockin
94c9c96cb7 Merge pull request #525 from Sarsate/superset-hasall
Renames HasAll to IsSuperset; HasAll uses slice.
2014-07-18 13:59:18 -07:00
Danny Jones
136c9e112c Renames HasAll to IsSuperset; HasAll uses slice.
For the pedants. HasAll is now called IsSuperset and
the new HasAll method takes a slice instead of a set.
2014-07-18 13:58:43 -07:00
Brendan Burns
c6255afe37 Make the service reconciller use the API, not a PodRegistry 2014-07-18 13:54:33 -07:00
Daniel Smith
dd36c45bfe Merge pull request #522 from Sarsate/has-all
Added HasAll utility method for string set.
2014-07-18 13:38:11 -07:00
Danny Jones
2d9bad95f8 Added HasAll utility method for string set.
Added HasAll method which detects if one set contains all
of the memebers of another set.

A.HasAll(B) returns true if A is a superset of B.
2014-07-18 13:19:55 -07:00
Daniel Smith
d8faca9e81 Merge pull request #512 from smarterclayton/communicate_missing_pod_info
PodInfo should indicate when a pod is not found
2014-07-18 13:03:16 -07:00
Jonathan Boulle
9e63c3a633 assorted formatting and typo fixes 2014-07-18 13:02:59 -07:00
Tim Hockin
fda69bcca2 Merge pull request #452 from Sarsate/extvol-hostdir
Initial framework for external volumes.
2014-07-18 12:44:38 -07:00
Clayton Coleman
a17f0d04d4 PodInfo should indicate when a pod is not found
Client should react.  Also, dial down the chattiness of errors for
pods which do not exist and stop processing NotFound earlier in
the podinfo chain
2014-07-18 13:32:10 -04:00
Daniel Smith
e9dbc4e8ad Merge pull request #509 from xiangli-cmu/kubelet
kubelet: cleanup
2014-07-18 10:24:11 -07:00
Daniel Smith
64d4e55624 Merge pull request #515 from brendandburns/fix
Add some more logging to service updates.
2014-07-18 10:18:04 -07:00
Xiang Li
86288ca82a kubelet: cleanup 2014-07-18 10:12:59 -07:00
Clayton Coleman
0ccf1b7812 Operation server was not returning in error cases 2014-07-18 12:36:27 -04:00
Brendan Burns
fa69781b41 Add some more logging to service updates. 2014-07-18 09:29:49 -07:00
Clayton Coleman
7d0b8e0c1c Merge pull request #514 from brendandburns/fix
Insert a couple of sleeps to slow things down.
2014-07-18 12:25:12 -04:00
Brendan Burns
744072a71e Insert a couple of sleeps to slow things down. 2014-07-18 09:24:01 -07:00
Daniel Smith
2188907022 Merge pull request #486 from yugui/fix/404-if-notfound
Make RESTful operations return 404 Not Found when the target resource does not exist.
2014-07-18 09:03:17 -07:00
Clayton Coleman
1831cf1711 Remove some verbose logging 2014-07-18 10:48:21 -04:00
Tim Hockin
2f593c92fa Merge pull request #487 from yugui/fix/golint
Fixes Go lint errors and a style fix
2014-07-17 22:44:31 -07:00
Yuki Yugui Sonoda
2aa3de12d4 Make RESTful operations return 404 Not Found when the target resource
does not exist.

In the original implementation, GET, DELETE and PUT operations on
non-existent resources used to return 500 but not 404.
2014-07-18 14:16:56 +09:00
Yuki Yugui Sonoda
e0d749f952 fix typo 2014-07-18 14:13:55 +09:00
Danny Jones
bb2843498d API modified to use source; now supports EmptyDirectory
API is now modified to use a Source struct to handle multiple volumes.

Two volume types are supported now, HostDirectory and EmptyDirectory.
2014-07-17 15:25:50 -07:00
Nan Deng
564a58722c Retrieve machine spec from cAdvisor 2014-07-17 15:21:47 -07:00
Clayton Coleman
15e791fc5b Rename kubelet_server*.go to server*.go 2014-07-17 13:42:24 -04:00
Danny Jones
f1a7850454 Adds EmptyDirectory volume struct
Adds EmptyDirectory to volumes. This represents a directory
on the host, given to a pod that should not persist beyond.

The current draft does not cleanup after itself.
2014-07-17 10:09:14 -07:00
Danny Jones
f84ff740f0 Adds initial volumes package; Supports host-dirs
Adds the framework for external volume mounts.

Currently supports bare host directory mounts.

Modifies the API to support host directory mounts from Volumes
instead of VolumeMounts.
2014-07-17 10:08:45 -07:00
Yuki Yugui Sonoda
5e31ca3b27 Correct godoc messages according to review comments 2014-07-17 12:27:58 +09:00
Clayton Coleman
831ab28759 Merge pull request #483 from brendandburns/health
Add a caching minion registry.
2014-07-16 20:51:27 -04:00
Clayton Coleman
17053f5950 Merge pull request #465 from smarterclayton/simplify_config_for_reuse
Extract proxy/config common functions for reuse
2014-07-16 18:28:07 -04:00
Brendan Burns
dceafbadab Add a caching minion registry. 2014-07-16 14:52:32 -07:00
Daniel Smith
7127eefd36 Merge pull request #469 from smarterclayton/unify_container_lookup
Make container lookup in the Kubelet cleaner
2014-07-16 12:15:52 -07:00
Clayton Coleman
021cf64808 Change proxy config to reuse util/config
Splits endpoint and service configuration into their own objects.  Also makes
the endpoint and service configuration tests correct - there was a race condition
previously that meant tests were passing but not checking correct code.
2014-07-16 14:13:25 -04:00
Clayton Coleman
38ec4ff8c0 Create a configuration update utility
Extracted from proxy/config
2014-07-16 14:13:25 -04:00
Clayton Coleman
185a97b037 Make container lookup in the Kubelet cleaner
Reduce duplicate calls to list lookups for parallel go routines.
2014-07-16 14:12:13 -04:00
brendandburns
02b06a2f2f Merge pull request #482 from monnand/cadvisor-update-2
Add code in client package to use kubelet's API to retrieve data from cAdvisor
2014-07-16 10:39:31 -07:00
brendandburns
8ddc33998c Merge pull request #464 from yugui/fix/golint2
Fixes Go lint errors
2014-07-16 09:55:30 -07:00
Yuki Sonoda (Yugui)
df9da65939 Rename a function according to go convention 2014-07-16 22:05:06 +09:00
Yuki Sonoda (Yugui)
1395b0fbf0 Fixes golint errors in pkg/healthz 2014-07-16 21:59:23 +09:00
Yuki Sonoda (Yugui)
f368e4be68 Fixes golint errors in pkg/health 2014-07-16 21:59:21 +09:00
Yuki Sonoda (Yugui)
d2db5cdffc Fix a build failure of a test 2014-07-16 21:33:26 +09:00
Yuki Sonoda (Yugui)
c1eee00a57 Correct an error message 2014-07-16 21:33:26 +09:00
Yuki Sonoda (Yugui)
a702be8e63 Fixes new golint errors in pkg/kubelet after merge 2014-07-16 21:33:26 +09:00
Yuki Sonoda (Yugui)
07b8be4d4c Merge branch 'master' into fix/golint2
Conflicts:
	pkg/api/types.go
	pkg/health/health_check.go
	pkg/kubelet/kubelet.go
	pkg/kubelet/kubelet_server.go
	pkg/kubelet/kubelet_server_test.go
	pkg/kubelet/kubelet_test.go
2014-07-16 21:33:21 +09:00
Kouhei Ueno
938d9e811b don't reuse random 2014-07-16 15:58:16 +09:00
Nan Deng
6878f105c0 add a client to get container info from kubelet 2014-07-16 01:08:56 -04:00
Daniel Smith
90afdb06c1 Move logger to own package; clean up apiserver to use serve mux. 2014-07-15 21:25:33 -07:00
Daniel Smith
c7d31fabbc Merge pull request #480 from monnand/cadvisor-update-1
Update kubelet package to use most recent cAdvisor's code
2014-07-15 18:25:54 -07:00
Brendan Burns
c331849e69 Add support for CPU limiting to the kubelet. 2014-07-15 16:49:34 -07:00
brendandburns
74e17022e4 Merge pull request #474 from yifan-gu/close_chan
Changed op.notify<-true to close(op.notify).
2014-07-15 16:03:53 -07:00
Daniel Smith
3d63d733e3 Merge pull request #456 from brendandburns/health
Move health checking logic out to a utility. Add a minion registry that health checks.
2014-07-15 15:39:21 -07:00
Brendan Burns
c5db874090 Addressed comments. 2014-07-15 15:16:36 -07:00
Yifan Gu
0e9e2ee7f4 Changed op.notify<-true to close(op.notify). 2014-07-15 15:08:04 -07:00
Nan Deng
30bc2af9f1 gofmt -r "GetContainerStats->GetContainerInfo" 2014-07-15 11:53:00 -07:00
Nan Deng
8c573ee727 Update to latest cAdvisor and use data structures directly from cAdvisor 2014-07-15 11:53:00 -07:00
Daniel Smith
8ef60138e5 Merge pull request #466 from smarterclayton/move_docker_function_out
Move Docker specific function out of the Kubelet
2014-07-15 10:38:28 -07:00
Daniel Smith
61917a0628 Revert "Changed op.notify<-true to close(op.notify)." 2014-07-15 10:34:05 -07:00
Daniel Smith
e659688f6d Merge pull request #458 from yifan-gu/close_chan
Changed op.notify<-true to close(op.notify).
2014-07-15 09:29:49 -07:00
Tim Hockin
3a9295add0 Merge pull request #407 from yugui/fix/golint
Fixes Go lint errors.
2014-07-15 08:44:57 -07:00
Clayton Coleman
e02ea37d9f Move Docker specific function out of the Kubelet 2014-07-15 11:34:48 -04:00
Yuki Yugui Sonoda
edac5ce0b8 Fixes golint errors in pkg/kubelet 2014-07-15 22:56:31 +09:00
Yuki Yugui Sonoda
c6b27bb87d Fixes golint errors in pkg/kubecfg 2014-07-15 22:56:17 +09:00
Yuki Yugui Sonoda
af38bf1ef7 Fixes golint errors in pkg/api 2014-07-15 22:56:09 +09:00
Clayton Coleman
07fafb1252 Merge pull request #453 from brendandburns/memory
Add support for memory limits in the kubelet.
2014-07-15 09:37:42 -04:00
Yuki Yugui Sonoda
2861955025 Corrects wording of godoc comments. 2014-07-15 22:03:08 +09:00
Yuki Yugui Sonoda
1bd7276aca Correct the style of nested conditionals 2014-07-15 20:58:03 +09:00
Yuki Yugui Sonoda
60dd1f7cc0 Eliminates tautological comments 2014-07-15 20:58:01 +09:00
Yuki Yugui Sonoda
41febcee5e Merge branch 'master' into fix/golint
Conflicts:
	pkg/master/master.go
	pkg/master/pod_cache.go
	pkg/proxy/config/file.go
	pkg/proxy/proxier.go
	pkg/proxy/roundrobbin.go
	pkg/scheduler/randomfit.go
	pkg/scheduler/randomfit_test.go
2014-07-15 20:57:47 +09:00
Kouhei Ueno
bba23e28c2 Define EtcdErrorCode as constant and reuse EtcdError instances 2014-07-15 20:48:06 +09:00
Yifan Gu
90cc060699 Changed op.notify<-true to close(op.notify). 2014-07-15 00:29:43 -07:00
Brendan Burns
62dfc74606 Move health checking logic out to a utility.
Add a minion registry that health checks.
2014-07-14 22:38:28 -07:00
Daniel Smith
314eb1ae2d Merge pull request #454 from brendandburns/template
Add a template printer to kubecfg.
2014-07-14 21:46:21 -07:00
Clayton Coleman
0839f454fe Merge pull request #433 from brendandburns/service
Update services to use the internal IP and port, now that its available.
2014-07-15 00:22:34 -04:00
Brendan Burns
f7bd5a6f0f Add a template printer to kubecfg. 2014-07-14 21:13:06 -07:00
Brendan Burns
92d83640c0 Add support for memory limits in the kubelet. 2014-07-14 20:57:26 -07:00
Brendan Burns
ae179121c6 Address comments. 2014-07-14 20:38:43 -07:00
Brendan Burns
9f99767b6c Add a /healthz handler to the kubelet server, so that the master can validate kubelet health. 2014-07-14 20:38:18 -07:00
Brendan Burns
3cc5ff15cf Update services to use the internal IP and port, now that its available. 2014-07-14 20:24:58 -07:00
Daniel Smith
dcbb309e4f Merge pull request #440 from brendandburns/link
Add Docker link style env vars to link containers to services.
2014-07-14 16:47:49 -07:00
Brendan Burns
0e798bcc3c Add link env vars. 2014-07-14 16:37:17 -07:00
Yifan Gu
3a95572290 Changed the keepChannel to buffered channel.
Since the keepChannel is used to send data, not just for synchronizaiton,
so make it a buffered channel can avoid unnecessary goroutine yields.
2014-07-14 14:22:19 -07:00
Clayton Coleman
f474879bad Merge pull request #431 from claire921/controller
pkg/controller: cleanup replication_controller.go
2014-07-13 10:13:12 -04:00
Claire Li
ba9c370014 pkg/controller: cleanup replication_controller.go 2014-07-12 14:21:51 -07:00
Kouhei Ueno
c875a6d3ba rename FirstFitScheduler to RandomFitScheduler 2014-07-12 23:23:53 +09:00
Kouhei Ueno
070b4ffe9f make firstfit.go threadsafe and fix its comments 2014-07-12 23:23:53 +09:00
Kouhei Ueno
2a03a4d502 make random.go threadsafe 2014-07-12 23:23:52 +09:00
Clayton Coleman
f84a948c9c Merge pull request #426 from claire921/cleanup
pkg/proxy/config: clean up file.Run()
2014-07-12 15:12:05 -04:00
Clayton Coleman
de51331808 Merge pull request #435 from claire921/kubelet_server
pkg/kubelet: clean up server http error handling
2014-07-12 14:35:36 -04:00
Clayton Coleman
1603e17c4a Merge pull request #436 from claire921/k
pkg/kubelet: explicitly return nil as error and nil as a result on error
2014-07-12 14:20:04 -04:00
Claire Li
10de5b12fe pkg/kubelet: explicitly return nil as error and nil as a result on error 2014-07-12 11:03:08 -07:00
Clayton Coleman
1af753a396 Merge pull request #420 from claire921/proxy
pkg/proxy: remove unnecessary go routine
2014-07-12 13:58:42 -04:00
Clayton Coleman
5ad37f0f38 Merge pull request #427 from nyaxt/lint_registry2
Add comments on registry/etcd_registry.go to address some of golint errors.
2014-07-12 13:54:13 -04:00
Clayton Coleman
3fd730c5fe Merge pull request #428 from claire921/selector
pkg/selector: set the cap for slice in SelectorFromSet
2014-07-12 13:52:36 -04:00
Claire Li
cdc44387c6 pkg/kubelet: clean up server http error handling 2014-07-12 10:44:29 -07:00
Claire Li
d0aad153ee pkg/master: correct error string for GetPodInfo 2014-07-11 23:09:43 -07:00
Claire Li
2b183943c2 pkg/selector: set the cap for slice in SelectorFromSet 2014-07-11 22:59:50 -07:00
Kouhei Ueno
12c9a73205 Add comments on registry/etcd_registry.go 2014-07-12 14:44:13 +09:00
Claire Li
78cad3fd5e pkg/proxy/config: clean up file.Run() 2014-07-11 22:41:06 -07:00
brendandburns
89655584eb Merge pull request #423 from claire921/onpudate
pkg/proxy: filtering before comparing
2014-07-11 22:33:09 -07:00
brendandburns
cde7b5841b Merge pull request #422 from claire921/use_splithostport
pkg/proxy: use net.SplitHostPort instead of strings.Split
2014-07-11 22:32:50 -07:00
brendandburns
ee4ec2af9e Merge pull request #421 from claire921/proxy_checking
pkg/proxy: remove unnecessary io.EOF checking
2014-07-11 22:32:32 -07:00
Claire Li
094b78d7de pkg/proxy: filtering before comparing 2014-07-11 22:13:29 -07:00
Claire Li
ba07dc804c pkg/proxy: use net.SplitHostPort instead of strings.Split 2014-07-11 22:08:53 -07:00
Claire Li
abcbce55ce pkg/proxy: remove unnecessary io.EOF checking 2014-07-11 21:51:24 -07:00
brendandburns
cdf75c57df Merge pull request #411 from nyaxt/lint_registry
Fixes go lint errors on pkg/registry/controller_registry.go
2014-07-11 21:41:58 -07:00
brendandburns
2ee074f9fa Merge pull request #410 from nyaxt/lint_scheduler
Add comments to pkg/scheduler/ to pass golint
2014-07-11 21:40:18 -07:00
Claire Li
4d47db8b5f pkg/proxy: remove unnecessary go routine 2014-07-11 21:34:42 -07:00
Kouhei Ueno
f932891428 removes a comment on New and a typo fix 2014-07-12 13:21:52 +09:00
Kouhei Ueno
bf137c38e7 remove comments on Make.+() 2014-07-12 13:16:16 +09:00
brendandburns
93d45c1e71 Merge pull request #414 from thockin/cleanups
Fix go idiom feedback
2014-07-11 14:47:05 -07:00
Tim Hockin
779cb84625 Merge pull request #397 from brendandburns/service
Add initial validation of Service objects
2014-07-11 14:43:47 -07:00
Brendan Burns
c9babe619e Updated to use the makeInvalidError helper function. 2014-07-11 14:24:55 -07:00
Brendan Burns
b59dcbbb80 Fix tests. 2014-07-11 14:24:54 -07:00
Brendan Burns
e9edfc754e Add initial validation of Service objects 2014-07-11 14:24:54 -07:00
Tim Hockin
1e05d1ac4e Merge pull request #394 from brendandburns/poddata
Try to grab live data if the cache has errors.
2014-07-11 11:55:54 -07:00
Tim Hockin
7d5398bda7 Fix go idiom feedback 2014-07-11 11:43:42 -07:00
Tim Hockin
f532038281 Merge pull request #345 from smarterclayton/fix_ids
Ensure pod and manifest have a UUID in apiserver
2014-07-11 11:29:00 -07:00
Brendan Burns
1b4dfe7d14 Move from bool to HealthCheckStatus 2014-07-11 10:15:31 -07:00
Brendan Burns
6312ffebcf Address some comments from thockin@ 2014-07-11 10:14:45 -07:00
Kouhei Ueno
bcbdbf6558 use New instead of Make and add comments to make golint happy 2014-07-11 22:46:22 +09:00
Yuki Yugui Sonoda
7373695e33 Fixes golint errors in pkg/proxy 2014-07-11 22:35:57 +09:00
Yuki Yugui Sonoda
88284171f2 Fixes golint errors in pkg/master 2014-07-11 22:28:27 +09:00
Yuki Yugui Sonoda
85fa11da93 Fixes golint errors in pkg/labels 2014-07-11 22:28:27 +09:00
Kouhei Ueno
e53658a3ed s/controllerId/controllerID/ to make golint happy. 2014-07-11 22:16:51 +09:00
Kouhei Ueno
e268e4bb7a Add comments to pkg/scheduler/ to pass golint 2014-07-11 22:01:12 +09:00
Kouhei Ueno
93def86a9e fix go lint errors in util 2014-07-11 21:04:34 +09:00
Burcu Dogan
1816a63d55 proxy: lock should be above the fields it protects. 2014-07-11 00:23:43 -07:00
Burcu Dogan
6a2703627b scheduler: use New rather than Make for construction helpers. 2014-07-10 22:56:14 -07:00
Burcu Dogan
e4d966744d proxy: fixing linting errors. 2014-07-10 22:36:06 -07:00
Burcu Dogan
f4d989ae92 labels: Fixing linting errors. 2014-07-10 22:08:12 -07:00
Tim Hockin
c134a16c36 fix go lint errors in util 2014-07-10 17:32:42 -07:00
Andrew Gerrand
a9fdf1f6b5 rename client.ClientInterface to client.Interface 2014-07-11 09:51:34 +10:00
Clayton Coleman
5896ac14da Ensure pod and manifest always have a UUID
* Fixes implication #2 in docs/identifiers.md
* Replication controller lets the apiserver set the pod ID
2014-07-10 18:03:48 -04:00
brendandburns
e6ee45d38e Merge pull request #395 from thockin/cleanups
IntOrString for use in JSON/YAML
2014-07-10 12:46:05 -07:00
Tim Hockin
32bcdbeb53 Merge pull request #396 from brendandburns/hostname
Add Hostname to the docker run command.
2014-07-10 12:28:30 -07:00
Brendan Burns
dc61547b95 Add Hostname to the docker run command. 2014-07-10 12:25:57 -07:00
Tim Hockin
06ac51e6e5 Merge pull request #389 from brendandburns/podip
Add PodIP to the info returned for a pod.
2014-07-10 11:18:05 -07:00
Tim Hockin
85effbbc3f IntOrString for use in JSON/YAML
Specifying an API type as IntOrString will allow JSON and YAML to accept
either ints or strings with the same name.  For example, port names or
numbers.
2014-07-10 11:09:47 -07:00
Brendan Burns
5a4621f451 Try to grab live data if the cache has errors. 2014-07-10 10:26:40 -07:00
Brendan Burns
b4811abbd6 Address Clayton's comment. 2014-07-10 09:24:49 -07:00
Yuki Sonoda (Yugui)
45b48e1668 Fixes golint errors in pkg/kubelet 2014-07-10 21:57:26 +09:00
Yuki Sonoda (Yugui)
2d888539dc Fixes golint errors in pkg/kubecfg 2014-07-10 21:27:05 +09:00
Yuki Sonoda (Yugui)
056f871bed Fixes golint errors in pkg/controller 2014-07-10 21:27:01 +09:00
Yuki Sonoda (Yugui)
820b67e41f Fixes golint errors in pkg/cloudprovider 2014-07-10 20:46:56 +09:00
Yuki Sonoda (Yugui)
6914681ed0 Fixes golint errors in pkg/api 2014-07-10 20:46:35 +09:00
brendandburns
0748ac39e8 Merge pull request #374 from yugui/feature/show-progress
Periodically shows message while waiting for completion of REST operations
2014-07-09 23:15:05 -07:00
Yuki Yugui Sonoda
602f7d8112 Use glog instead of printing to stderr. 2014-07-10 14:59:56 +09:00
Brendan Burns
d5b7c4eb6d Fix integration tests with a check for nil
Add a unit test to validate behavior
2014-07-09 22:31:17 -07:00
Brendan Burns
7b11cbd622 Add PodIP to the info returned for a pod. 2014-07-09 22:13:07 -07:00
Tim Hockin
b0b9606aea Merge pull request #365 from brendandburns/health
add http health checks.
2014-07-09 16:14:30 -07:00
brendandburns
4c309862e3 Merge pull request #371 from thockin/valid3
Accumulate errors during validation
2014-07-09 13:36:37 -07:00
Tim Hockin
95fb7bc1ae Merge pull request #379 from brendandburns/host
Add support for host up binding to the API (and kubelet)
2014-07-09 12:54:32 -07:00
Brendan Burns
41c6680943 add http health checks. 2014-07-09 12:01:43 -07:00
Dan Mace
00df67b0bf Namespace "local" volume mounts by ContainerManifest ID on disk
Local volume mounts in a pod should result in host mounted directories
which are namespaced by the ContainerManifest ID.
2014-07-09 14:45:22 -04:00
Brendan Burns
4b22f7a462 Add support for host ip binding to the API (and kubelet) 2014-07-09 11:13:38 -07:00
Tim Hockin
4ecefd1ba3 Define an errorList type and use it to accumulate 2014-07-09 07:56:27 -07:00
Tim Hockin
54790080b3 Accumulate validation errors
Rather than report the first error, accumulate all errors and report them all
at once.
2014-07-09 07:55:15 -07:00
brendandburns
242627eaf0 Merge pull request #358 from thockin/valid2
Add validation of VolumeMounts
2014-07-08 21:58:32 -07:00
brendandburns
2ea8a68001 Merge pull request #375 from thockin/valid/dns_lengths
Simplify DNS validation checks
2014-07-08 21:48:46 -07:00
Dawn Chen
a0f94757a4 Instantiate cAdvisor client for kubelet to query both machine and container
information.
2014-07-08 16:37:43 -07:00
Tim Hockin
2eb2784725 Validation of HostPorts and Manifest IDs
Check that HostPorts are unique across the whole host and that Manifest IDs
are unique.
2014-07-08 15:22:47 -07:00
Tim Hockin
ad88fa48a5 Add validation of Ports
Also do caseless compares for "enum" strings.
2014-07-08 15:22:44 -07:00
Tim Hockin
dd6b209617 Add validation of VolumeMounts 2014-07-08 15:21:27 -07:00
Tim Hockin
8d6e832b8e Simplify DNS validation checks
Move DNS length checks to util/validation.go.  Make the max subdomain be 253,
which is what the RFC actually says.
2014-07-08 15:14:17 -07:00
brendandburns
40c71e8292 Merge pull request #372 from yugui/feature/golint
Fixes Go lint errors.
2014-07-08 12:55:41 -07:00
Tim Hockin
92cf6662ed Merge pull request #351 from discordianfish/use-api-for-pull
Use api for pulling images instead of shelling out
2014-07-08 09:08:12 -07:00
Johannes 'fish' Ziemke
3fa6c9671d Use docker client lib instead of binary for pulls 2014-07-08 12:21:39 +02:00
Yuki Yugui Sonoda
325c5cd47e Fixes golint errors in pkg/client 2014-07-08 16:15:41 +09:00
Yuki Yugui Sonoda
5cfbed4453 Fixes golint errors in pkg/apiserver 2014-07-08 16:10:11 +09:00
Yuki Yugui Sonoda
780c441d19 Fixes golint errors in pkg/api 2014-07-08 16:08:58 +09:00
Brendan Burns
e3838e1153 Make poll period and timeout configurable.
Make poll period short for integration testing.
2014-07-07 10:13:27 -07:00
Brendan Burns
2f5eeee1f6 Make sync false by default. Works around timeout/retry issues. 2014-07-03 21:23:21 -07:00
Nan Deng
b351578ddd fix data race in config.go. This is a hard one. 2014-07-02 23:23:14 -07:00
Nan Deng
aa808a6505 fix data race introduced by 1798e0f 2014-07-02 23:23:14 -07:00
Nan Deng
e13e31866d fix data races in controller 2014-07-02 23:22:09 -07:00
brendandburns
bf44347340 Merge pull request #350 from brendandburns/async
Fix an error in the async-path that led to dropping pods.
2014-07-02 23:15:35 -07:00
Brendan Burns
0655370ea2 Fix an error in the async-path that led to dropping pods. 2014-07-02 23:05:30 -07:00
brendandburns
d386c02dfd Merge pull request #328 from monnand/root-container
Get root container stats from cAdvisor
2014-07-02 22:57:28 -07:00
Nan Deng
42fd4383a1 Get machine stats from cAdvisor 2014-07-02 16:59:50 -07:00
brendandburns
1fc71893cf Merge pull request #344 from lavalamp/version
A package to get version information from
2014-07-02 16:41:18 -07:00
brendandburns
0b9f36b761 Merge pull request #307 from lavalamp/atomic
All PUTs now atomic
2014-07-02 16:31:35 -07:00
Tim Hockin
3f057baa0a Use structured errors during validation 2014-07-02 16:17:47 -07:00
Daniel Smith
3b9735d787 Test atomic PUTs, and make them work.
Improve apiserver/logger.go's interface (it's pretty cool now).

Improve apiserver's error reporting to clients.

Improve client's handling of errors from apiserver.

Make failed PUTs return 409 (conflict)-- http status codes are amazingly
well defined for what we're doing!
2014-07-02 15:42:05 -07:00
Daniel Smith
a6144f656c Move etcd helpers to tools package so they can depend on api package. Add ResourceVersion, hook it up to etcd index to get atomic PUTs. 2014-07-02 15:42:05 -07:00
Daniel Smith
60f05c8d8d update version package when building. 2014-07-02 15:32:30 -07:00
Daniel Smith
68bef4ac0c add version package 2014-07-02 15:26:13 -07:00
Tim Hockin
3cd56e85d6 Simplify supported manifest versions 2014-07-02 14:57:24 -07:00
Tim Hockin
d3da6b168e nit: s/Id/ID/ for go style 2014-07-02 11:21:29 -07:00
Tim Hockin
48074d4ae7 Fix wrong json name for Key field 2014-07-02 10:30:27 -07:00
Tim Hockin
839f2aed7b Add validation for Container.Env
This includes backwards compat with the older "key" field.
2014-07-01 22:16:46 -07:00
brendandburns
a8a0039a39 Merge pull request #335 from vmarmol/add-kubelet-new
Add a New() for Kubelet.
2014-07-01 22:16:24 -07:00
brendandburns
8d2ee4b7ae Merge pull request #330 from thockin/valid7
Add basic validation of Containers
2014-07-01 22:14:40 -07:00
Tim Hockin
fe67ef79b9 Add basic validation of Containers 2014-07-01 22:05:42 -07:00
Victor Marmol
e29ff512fc Add a New() for Kubelet.
This will make it easier to add new fields that need to be initialized. Also refactors tests to ease making fake Kubelets.
2014-07-01 19:23:26 -07:00
Daniel Smith
969586a214 Add logging, fix crash
Crash was in kublet_server when fake docker client gives it nil pointer.
2014-07-01 17:38:07 -07:00
Daniel Smith
bf3b34c2e9 Allow master's pod info getter to be faked. Wire up in integration tests in futile attempt to make travis pass. 2014-07-01 17:08:32 -07:00
Daniel Smith
587fb75a7a rearrange RunKubelet's parameters so that address and port are next to each other 2014-07-01 16:47:37 -07:00
Daniel Smith
11d6451d2a Change kublet to serve podInfo instead of containerInfo. Plumb through system. 2014-07-01 16:41:10 -07:00
Daniel Smith
049bc6b6d4 Fix interface{} in api/types.go; plumb through system. 2014-07-01 16:41:09 -07:00
Tim Hockin
045f1bda0c Add validation of Volumes 2014-07-01 16:30:39 -07:00
brendandburns
664c9faa43 Merge pull request #327 from lavalamp/etcdChanFix
Improvements to integration test & logging
2014-07-01 15:40:48 -07:00
brendandburns
ec01289aeb Merge pull request #326 from thockin/valid2
First piece ofn actual validation
2014-07-01 15:40:13 -07:00
brendandburns
67eae1f645 Merge pull request #331 from dchen1107/cleanup
Fixed the data race found in kubelet_test.go
2014-07-01 15:30:36 -07:00
Dawn Chen
17bad028ce Fixed the data race found in kubelet_test.go 2014-07-01 15:15:40 -07:00
Daniel Smith
b820e026f6 Improve logging. 2014-07-01 14:02:14 -07:00
Daniel Smith
50bbf39925 improvements to integration test organization 2014-07-01 14:02:14 -07:00
Tim Hockin
8bc49a02c3 Document api types wrt validation
Part 3 in a series of changes towards data validation.
2014-07-01 13:58:44 -07:00
Tim Hockin
a92e1aa1bf First piece of validation
I'm adding pieces incrementally to make sure we get full testing of each
piece.

Make syncLoop() private
2014-07-01 13:48:57 -07:00
Daniel Smith
229b8fca2a Don't double-close the channel when etcd returns an error. 2014-07-01 12:49:57 -07:00
Daniel Smith
a10ac51224 Merge pull request #320 from brendandburns/async
Make each pod synchronization in the kubelet an independent thread.
2014-07-01 12:42:33 -07:00
Brendan Burns
1798e0fea3 Make each pod synchronization async. 2014-07-01 12:20:13 -07:00
Daniel Smith
212a393404 Merge pull request #293 from brendandburns/minion
Activate cloud minion registry.
2014-07-01 12:11:22 -07:00
Daniel Smith
9da5fed7f4 Merge pull request #277 from brendandburns/sync
Add sync behavior to the pod registry.  Expand tests.
2014-07-01 11:43:40 -07:00
Daniel Smith
99f85e3897 Merge pull request #309 from monnand/race-controller
fix data races in controller
2014-07-01 11:34:05 -07:00
Brendan Burns
d5516e4cdc Activate gce minion list. 2014-07-01 11:33:58 -07:00
Brendan Burns
13d7a5959a Add sync behavior to the pod registry. Expand tests. 2014-07-01 11:31:21 -07:00
Nan Deng
44935c2f94 comment 2014-07-01 11:21:17 -07:00
Nan Deng
7f9d66525a remove lock for broadcast 2014-07-01 11:13:05 -07:00
Brendan Burns
7999983311 Added async behavior. 2014-07-01 11:11:10 -07:00
Clayton Coleman
15c96508a9 Use ID instead of Id (go style) everywhere
Fixes #278
2014-07-01 13:16:47 -04:00
Nan Deng
f68446fed9 comment 2014-06-30 20:51:38 -07:00
brendandburns
65a62278b1 Merge pull request #286 from lavalamp/exampleEtcd
Separate scheduler from registry
2014-06-30 20:17:07 -07:00
Nan Deng
101806cb5e do not recreate 2014-06-30 18:27:41 -07:00
Nan Deng
7b432eac5c gofmt -r "condChannelsReady->condWatchCompleted" 2014-06-30 18:05:01 -07:00
Daniel Smith
53618f5db7 Merge pull request #311 from thockin/valid3
Add validation primitives to util
2014-06-30 17:13:24 -07:00
Dawn Chen
85152fc137 Add a FileServer for master's logs 2014-06-30 16:33:54 -07:00
Nan Deng
905c6dcb10 gofmt -r "WaitToWatch->WaitForWatchCompletion" 2014-06-30 16:09:15 -07:00
Nan Deng
f13f1a5da6 use sync.Cond 2014-06-30 16:07:46 -07:00
Nan Deng
014165ded6 style 2014-06-30 15:39:03 -07:00
Nan Deng
fa1fbe88c1 use wait group 2014-06-30 15:32:55 -07:00
Tim Hockin
b3dd86a21e Add validation primitives to util
Part 2 in a series of changes towards data validation.
2014-06-30 15:17:53 -07:00
Nan Deng
62055090b4 fix data races in controller 2014-06-30 14:48:57 -07:00
Tim Hockin
74e1b03a80 Break the dep from util -> api
Part 1 in a series of changes towards data validation.
2014-06-30 14:28:41 -07:00
Nan Deng
f99a50ba69 use mutex instead of rwmutex 2014-06-30 11:13:42 -07:00
Nan Deng
3083a33e5f pkg/registry now passed race detector. 2014-06-30 11:04:57 -07:00
Daniel Smith
011ce9d871 Add crash handler bypass for testing. 2014-06-29 12:35:43 -07:00
Daniel Smith
0760e9bc2c Fix up usage and tests, split into multiple files.
Doing this in multiple commits in an attempt to preserve the file movement history.
2014-06-29 12:35:43 -07:00
Daniel Smith
21e63cf75a Move scheduler to own package. 2014-06-29 12:30:49 -07:00
Tim Hockin
6c79937a42 Reduce logging noise
Don't use %#v for errors.
Do use %+v when more detail than %v is needed.
Fix typos Kublet -> Kubelet.
2014-06-28 22:16:26 -07:00
Tim Hockin
b65d685a39 Add a NewStringSet() function
Also beef up tests to cover len(ss).
2014-06-28 19:36:44 -07:00
Tim Hockin
73a494c928 Merge pull request #283 from lavalamp/stringSet
Move stringSet to util.StringSet
2014-06-28 13:15:47 -07:00
Daniel Smith
3d1e8a92d3 Move stringSet to util.StringSet 2014-06-28 11:46:51 -07:00
Justin Huff
28afe91855 Allow empty lists when polling manifests via http 2014-06-27 23:46:02 -07:00
Daniel Smith
134f44e3fa Merge pull request #276 from brendandburns/minion
Initial integration of the cloud based minion registry.
2014-06-27 22:56:47 -07:00
Brendan Burns
431fcac8b0 Initial integration of the cloud based minion registry. 2014-06-27 22:49:27 -07:00
Daniel Smith
b21facafb1 Merge pull request #273 from brendandburns/kubelet
Make the docker endpoint a flag.
2014-06-27 17:09:25 -07:00
Brendan Burns
f8060c5b3d Make the docker endpoint a flag. 2014-06-27 17:01:12 -07:00
Daniel Smith
54ad4582e2 Fix unstable map ordering issue in test 2014-06-27 15:40:23 -07:00
Daniel Smith
9a0f89170e Fix comments. Add timeout to integration test; don't make travis run for 15 minutes any more. 2014-06-27 15:40:23 -07:00
Daniel Smith
999ea50c2a Cleanup to use AtomicUpdate. 2014-06-27 15:14:57 -07:00
Daniel Smith
529870d121 Generic atomic update code 2014-06-27 15:14:57 -07:00
Justin Huff
8c5562ef77 DockerContaineId->DockerId 2014-06-27 14:03:50 -07:00
Justin Huff
81663fdb80 Introduce a type for docker container ids 2014-06-27 14:03:50 -07:00
Justin Huff
fe0066d2e4 Cleaning up container ID handling inside kubelet 2014-06-27 14:03:50 -07:00
Brendan Burns
b25f950362 Use etcd compare and swap to update the list of pods, to remove a race. 2014-06-27 11:09:36 -07:00
Brendan Burns
a391b2ff03 Implement sync behavior for controllers. 2014-06-26 19:44:28 -07:00
Daniel Smith
ab308ad13a Merge pull request #264 from brendandburns/padding
Set id width at 8 and pad with zeros.
2014-06-26 19:37:17 -07:00
Brendan Burns
78d9538358 Set id width at 8 and pad with zeros. 2014-06-26 19:24:12 -07:00
Daniel Smith
ffc2f82bed Merge pull request #238 from brendandburns/update
Initial add of the update demo for Google I/O
2014-06-26 19:21:38 -07:00
brendandburns
9e90c14369 Merge pull request #259 from lavalamp/api_long_op
Implement client polling.
2014-06-26 19:06:18 -07:00
Justin Huff
6fdebd6560 Watch and Get on the same Etcd key.
Kubelet was killing existing pods when creating a new one because new
files were being set as /registry/hosts/<machine>/pods/<id> and
/registry/hosts/<machine>/kubelet.
2014-06-26 18:59:49 -07:00
brendandburns
ccc04336af Merge pull request #258 from lavalamp/misc_cleanup
Use net.JoinHostPort
2014-06-26 18:56:52 -07:00
Brendan Burns
23c971605e Initial add of cloud-demo 2014-06-26 18:52:08 -07:00
Daniel Smith
be39c3d646 Fix crash in test 2014-06-26 16:56:02 -07:00
Meir Fischer
a2513eb1d6 Test rejection of bad JSON. 2014-06-26 19:27:56 -04:00
Daniel Smith
001b07b292 Use net.JoinHostPort 2014-06-26 16:20:37 -07:00
Daniel Smith
fd5e3b0b04 Implement client polling. 2014-06-26 16:10:38 -07:00
Daniel Smith
de06869d30 Merge pull request #244 from brendandburns/minion
Add a minion registry that is backed by a cloud provider.
2014-06-26 13:13:59 -07:00
Brendan Burns
14838df51e Update the proxy server. 2014-06-26 13:09:23 -07:00
Brendan Burns
93019b8563 Add a minion registry that is backed by a cloud provider. 2014-06-26 13:00:07 -07:00
brendandburns
46a615864c Merge pull request #249 from lavalamp/api_long_op
Give api server operation tracking ability
2014-06-26 12:10:40 -07:00
Daniel Smith
afd13edd6a Address comments; also, demonstrate one more property in test. 2014-06-26 11:36:15 -07:00
Brendan Burns
9bd4e441b3 better error handling. 2014-06-26 10:44:57 -07:00
Daniel Smith
c9246dc130 Implement required sync changes everywhere.
Make requests sync by default, so that usage of them doesn't have to
change.
2014-06-26 10:33:21 -07:00
Daniel Smith
59a6489e84 Add tracked operations to apiserver 2014-06-26 10:33:21 -07:00
Daniel Smith
c97c514742 Rename cloudcfg to kubecfg 2014-06-25 18:01:37 -07:00
Tim Hockin
3f0e7e790b Less verbose logging for "normal" things.
Don't log things that we expect to happen every sync loop, unless the user
asks for --v > 0.
2014-06-24 22:05:25 -07:00
Tim Hockin
a570b81220 Default --logtostderr=true
This retains compatibility with existing logging to stderr, until we can agree
on log dirs for each cmd.
2014-06-24 21:29:53 -07:00
Tim Hockin
9f9e75f508 Switch to glog for logging, bridge logging to glog.
1) imported glog to third_party (previous commit)
2) add support for third_party/update.sh to update just one pkg
3) search-and-replace:
  s/log.Printf/glog.Infof/
  s/log.Print/glog.Info/
  s/log.Fatalf/glog.Fatalf/
  s/log.Fatal/glog.Fatal/
4) convert glog.Info.*, err into glog.Error*

Adds some util interfaces to logging and calls them from each cmd, which
will set the default log output to write to glog.  Pass glog-wrapped
Loggers to etcd for logging.

Log files will go to /tmp - we should probably follow this up with a
default log dir for each cmd.

The glog lib is sort of weak in that it only flushes every 30 seconds, so
we spin up our own flushing goroutine.
2014-06-24 20:51:57 -07:00
Justin Huff
ddf0fd18f0 Remove extractMultipleFromReader and extractSingleFromReader. Unused now after improvements in #212 and #213 2014-06-24 18:59:57 -07:00
Daniel Smith
c3da356cd6 Merge pull request #237 from brendandburns/tests
Added some tests
2014-06-24 18:04:32 -07:00
brendandburns
8b44f34e0f Merge pull request #213 from lavalamp/fix_manifest
Better fix of #212
2014-06-24 17:42:22 -07:00
Brendan Burns
60ce1296d4 Added some tests 2014-06-24 17:41:30 -07:00
Daniel Smith
f7968ce00b Make integration test the manifest url feature. Make kubelet's docker pull command testable. 2014-06-24 16:57:35 -07:00
Daniel Smith
cfa1ef3c4c Merge pull request #229 from brendandburns/fix
Several small fixes.
2014-06-24 15:35:50 -07:00
brendandburns
19fa068de4 Merge pull request #232 from lavalamp/master
Make minion printing prettier; standardize on MinionList.Items
2014-06-24 15:34:06 -07:00
Brendan Burns
84e5c37f74 Several small fixes. 2014-06-24 15:30:14 -07:00
Daniel Smith
2cc038298b Make minion printing prettier; standardize on MinionList.Items like the other list types. 2014-06-24 15:29:17 -07:00
Daniel Smith
fd66a8b59b Readability fixes & address review comments. 2014-06-24 15:16:21 -07:00
Daniel Smith
6900431b13 Add kubelet testing to integration test. Test that kubelet makes the requested containers. Check that the url manifest feature works. 2014-06-24 15:14:40 -07:00
Daniel Smith
9d8a16f180 Make manifest url reader accept both single and multiple manifests. 2014-06-24 15:13:18 -07:00
Tim Hockin
c705593b62 Logging cleanup in Kubelet
Make it easier to see the signal when looking at kubelet logs.  Make the
signal more consistent and legible.
2014-06-24 13:50:08 -07:00
Daniel Smith
cf041acc29 Merge pull request #227 from thockin/cleanups
Rename Kubelet.Client -> EtcdClient
2014-06-24 13:26:59 -07:00
Tim Hockin
7622bb871b Rename Kubelet.Client -> EtcdClient
All the other *Client members are so named.  Makes easier reading.
2014-06-24 13:17:38 -07:00
Daniel Smith
dec3e09aa7 Merge pull request #226 from gottwald/TestYAMLPrinter
Add test for YAMLPrinter
2014-06-24 13:16:51 -07:00
Ingo Gottwald
79a9e0d849 Add test for YAMLPrinter 2014-06-24 21:44:39 +02:00
Justin Huff
4f714dd0fe Ignore files that start with '.' when processing a config dir. 2014-06-24 12:02:49 -07:00
Brendan Burns
8b50e45dcc Update the proxy server. 2014-06-24 11:25:45 -07:00
Brendan Burns
5756189f0d Added a proxy server to cloudcfg 2014-06-24 11:15:08 -07:00
brendandburns
b94ceffbed Merge pull request #205 from lavalamp/api2
Small client refactor; interpret 202 responses
2014-06-24 11:12:10 -07:00
Daniel Smith
175e998258 Fix nil/[]byte{} consistency, and other review comments. 2014-06-24 10:07:51 -07:00
Tim Hockin
8c2a8b65c3 Escape manifest IDs when hunting the network container.
This makes it possible to have manifests with _ in the ID.  I'm not sure we
want to allow this, but we do for now.  I hope to follow this up with a deeper
change to make this a bit more robust.
2014-06-24 09:52:43 -07:00
Daniel Smith
dccfe8046a Remove dead code 2014-06-24 09:38:22 -07:00
Daniel Smith
72809f8e67 catch 202 early 2014-06-24 09:38:22 -07:00
Daniel Smith
5ce54bb77b Use new method. 2014-06-24 09:38:22 -07:00
Daniel Smith
61a494d303 First step of combination. 2014-06-24 09:38:22 -07:00
brendandburns
e811e24b23 Merge pull request #216 from thockin/logging
Minor: log cleanups
2014-06-23 22:38:06 -07:00
Tim Hockin
60ad86c972 Minor: Log cleanups
Clean up log messages to be more obvious. Fix a typo (exit -> exist).
2014-06-23 22:11:18 -07:00
Tim Hockin
7218a4d165 Clarify config file code to be clear that it handles directories. ...
… Add a check for IsRegular() before reading a config path.  Add a comment
about exec.Command("hostname", "-f").
2014-06-23 21:14:15 -07:00
Daniel Smith
e96cfaf115 Merge pull request #214 from thockin/logging
Remove noisy non-error lines from logs
2014-06-23 21:02:35 -07:00
brendandburns
974d3f3999 Merge pull request #180 from lavalamp/master
Make minions first class citizens
2014-06-23 19:52:00 -07:00
Tim Hockin
228156dbc6 Remove noisy non-error lines from logs 2014-06-23 17:58:21 -07:00
Daniel Smith
77af24e7dc manifest_url needs to take a single ContainerManifest. 2014-06-23 15:06:28 -07:00
Daniel Smith
f62440a65e Fix call to removed function EncodeIndent 2014-06-23 13:35:14 -07:00
Daniel Smith
c12a3773f5 Add minion types, address other comments 2014-06-23 13:27:52 -07:00
Daniel Smith
79ee5aa250 Implement minion registry. Minions now a first-class object. 2014-06-23 13:27:52 -07:00
Daniel Smith
d460c01ade Add minion registry 2014-06-23 13:27:52 -07:00
Daniel Smith
6ccd9b2361 Move to new file. Build and tests pass. 2014-06-23 13:24:27 -07:00
Daniel Smith
7667c7de42 Add test 2014-06-23 13:24:27 -07:00
Daniel Smith
b1d8a41049 Add new api usage mechanism. 2014-06-23 13:24:26 -07:00
brendandburns
49c25a4e28 Merge pull request #196 from lavalamp/marshal
Make api able to marshal its types correctly
2014-06-23 13:22:52 -07:00
Daniel Smith
b850d36166 Fix boilerplate everywhere 2014-06-23 11:32:11 -07:00
Daniel Smith
ee75bb8dbe Address comments; Also internally start using JSONBase instead of reflect.Value of JSONBase. 2014-06-23 09:54:17 -07:00
Daniel Smith
41534c1cc5 Encode/decode working everywhere now. 2014-06-23 09:54:17 -07:00
Daniel Smith
14361e336a Make apiserver work with new encode/decode 2014-06-23 09:54:17 -07:00
Daniel Smith
d7b4915111 Don't make people have to worry about the Kind field. 2014-06-23 09:54:17 -07:00
Daniel Smith
2bcb44b6bd make Registry use Encode 2014-06-23 09:54:17 -07:00
Daniel Smith
fb991fb84e Change type to []byte 2014-06-23 09:54:17 -07:00
Daniel Smith
a9d9bb9d47 Add intelligent type marshalling/unmarshalling 2014-06-23 09:54:17 -07:00
brendandburns
86f837d47e Merge pull request #192 from lavalamp/misc_cleanup
Logging + Misc cleanup
2014-06-23 09:42:39 -07:00
Daniel Smith
a718f6fdb8 minor fixes to scheduler_test 2014-06-22 11:17:23 -07:00
Daniel Smith
d57531d924 Cleanup: no need for stacked timing loops 2014-06-22 11:17:23 -07:00
Daniel Smith
5de9071b5c Add improved logging: record latency & call stack on error 2014-06-22 11:17:23 -07:00
Daniel Smith
14e18a5308 Fix missing <- 2014-06-22 11:15:10 -07:00
Justin Huff
1441a84673 Cleanup handling of config channels in RunSyncLoop by passing a map
instead of a bunch of vars.
2014-06-22 09:32:49 -07:00
Justin Huff
460821e370 Add a k8s prefix to docker containers that we manage 2014-06-21 13:30:10 -07:00
Ingo Gottwald
8bc07747fe Add unit test for cloudcfg.LoadAuthInfo 2014-06-21 15:03:02 +02:00
Brendan Burns
b84cc9c895 Deflake a test w/ go1.3 random maps. 2014-06-20 10:41:15 -07:00
Daniel Smith
b3fbc47bd4 Make selector parsing deterministic 2014-06-20 10:03:56 -07:00
Daniel Smith
671a7f1c27 File name should have changed during query->selector rename. 2014-06-20 09:58:09 -07:00
Justin Huff
ecf7d11477 Make config dir handling deterministic 2014-06-20 09:31:52 -07:00
Justin Huff
d5bf045a6c Make sure that config files are closed properly 2014-06-20 09:31:52 -07:00
Justin Huff
d204f76484 Add config dir support to kubelet 2014-06-20 09:31:52 -07:00
Justin Huff
f49b9c2429 Fix merge conflicts 2014-06-20 09:31:18 -07:00
Daniel Smith
8a13e5300d Merge pull request #182 from brendandburns/net
Update IP assignment to be per-pod, not per-container
2014-06-20 09:06:34 -07:00
Brendan Burns
b46d8d2337 Merge branch 'net' of https://github.com/brendandburns/kubernetes-1 into net 2014-06-20 09:01:17 -07:00
brendandburns
3a9a3b1114 Merge pull request #174 from monnand/kubelet-cadvisor
Letting kubelet retrieve container stats from cAdvisor
2014-06-20 08:36:22 -07:00
Johan Euphrosine
fe589a3f64 pkg/client: refactor tests 2014-06-19 23:12:27 -07:00
brendandburns
0c8d556afb Fix IP affinity to be per-pod, not per-container. 2014-06-19 23:09:21 -07:00
brendandburns
168ec29f54 Merge pull request #178 from vmarmol/add-external-mounts
Adding support for external mounts
2014-06-19 21:28:40 -07:00
Nan Deng
a10a64856d use json.Marshal directly 2014-06-20 04:21:57 +00:00
Victor Marmol
e794f539d8 Adding support for external mounts 2014-06-19 21:14:19 -07:00
Nan Deng
7c7dfe3eeb style 2014-06-20 04:06:28 +00:00
Brendan Burns
ae9fce1358 Fix the container manifest to so that Command is an array, not a string. 2014-06-19 20:21:20 -07:00
Daniel Smith
466be48c74 Merge pull request #166 from brendandburns/sync
Part #1 of synchronous requests: Add channels and a mechanism for waiting
2014-06-19 16:40:25 -07:00
Brendan Burns
2640de5c02 Part #1 of synchronous requests: Add channels and a mechanism for waiting on them 2014-06-19 16:13:13 -07:00
Nan Deng
865ba190ff write headers after error checking 2014-06-19 22:28:48 +00:00
Nan Deng
979f832a0c write StatusOK to the header after json.Encode() 2014-06-19 22:12:32 +00:00
Nan Deng
d001110df1 gofmt -s -w -l 2014-06-19 20:59:20 +00:00
brendandburns
e031c193a3 Merge pull request #164 from lavalamp/master
Standardize terminology on "selector"
2014-06-19 13:55:27 -07:00
Nan Deng
2cc3a88411 unit test for GetContainerStats() 2014-06-19 20:44:53 +00:00
Nan Deng
1b9cb5d501 more unit test 2014-06-19 20:44:53 +00:00
Nan Deng
b01a12fe34 more unit test for GetContainerStats() 2014-06-19 20:44:53 +00:00
Nan Deng
3080262f12 unit test for cadvisor 2014-06-19 20:44:53 +00:00
Nan Deng
c7eaa2095c GOPATH... 2014-06-19 20:44:52 +00:00
Nan Deng
037cfd257f add /containerStats 2014-06-19 20:44:52 +00:00
Nan Deng
2402e939c2 Add cAdvisor into third_party 2014-06-19 20:44:52 +00:00
Daniel Smith
936ce13862 Merge pull request #171 from brendandburns/poll
Wire in the pod cache.  Just used for List for now.
2014-06-19 13:37:53 -07:00
Daniel Smith
5a1a793784 fix after rebase 2014-06-19 13:33:36 -07:00
Daniel Smith
cfce408266 Rename ReplicasInSet to ReplicaSelector 2014-06-19 13:31:42 -07:00
Daniel Smith
bc02b3c21a Rename [label] query to selector 2014-06-19 13:31:42 -07:00
Daniel Smith
c4649d539b Separate labels and selector in services for clarity 2014-06-19 13:30:04 -07:00
Brendan Burns
302ec0f37b Wire in the pod cache. Just used for List for now. 2014-06-18 22:26:35 -07:00
Daniel Smith
4c7cc33066 Merge pull request #165 from brendandburns/replicas
On delete, also attempt to update controller state
2014-06-18 22:10:13 -07:00
Brendan Burns
84b2a9e9f3 On delete, also attempt to update controller state, in case we
missed a previous update.  Add a test to validate that this works
2014-06-18 21:32:55 -07:00
Brendan Burns
4f549aae54 Add a PodCache that is responsible for caching pod information.
Not wired in yet.
2014-06-18 20:04:52 -07:00
Brendan Burns
b3f0e1724d Add IP to hostname in cloudcfg printing. 2014-06-18 15:25:47 -07:00
Brendan Burns
420b2fdd57 Add support for populating host ip address. 2014-06-18 14:57:50 -07:00
Brendan Burns
57869958bc Add IP look up if the Cloud Provider is not null
Add Instance info to the Cloud Provider interface
2014-06-18 14:27:43 -07:00
Brendan Burns
31427d2d6f Add a fake cloud impl.
Update the service registry with unit tests.
2014-06-18 14:22:41 -07:00
Daniel Smith
a253209a2c Add test for watch goroutine handling, fix other review comments 2014-06-18 13:10:39 -07:00
Daniel Smith
1b94f7b244 Fix race 2014-06-18 13:10:39 -07:00
Daniel Smith
7e464aa55c Test controller's synchronize method. Requires fake etcd client to be relocated. 2014-06-18 13:10:39 -07:00
Daniel Smith
b6a260940c Fix fake handler so it can be used for more than one call. 2014-06-18 13:10:39 -07:00
Daniel Smith
3737b4e4e2 Fix bad lock handling. 2014-06-18 13:10:39 -07:00
Daniel Smith
e74ac01a62 Move run logic into package 2014-06-18 13:10:39 -07:00
Daniel Smith
65d6280936 Move etcd helper to util so it can be used elsewhere, too 2014-06-18 13:10:39 -07:00
Daniel Smith
a24116c7bd Move controller to it's own package, it's not part of the registry. 2014-06-18 13:10:39 -07:00
Brendan Burns
77dd0afc26 Fix a bug in pod listing introduced in a recent refactor.
Add a test to catch a regression in the future.
2014-06-18 10:39:14 -07:00
Brendan Burns
5f66d33880 Add load balancing support to services. 2014-06-17 21:28:20 -07:00
brendandburns
1b1662d22d Merge pull request #145 from lavalamp/test_fix
Ensure that MockPodRegistry verifies the query it's passed.
2014-06-17 21:00:59 -07:00
Daniel Smith
246db91cb5 Merge pull request #135 from brendandburns/lb
Add load balancing support to services.
2014-06-17 18:40:42 -07:00
Daniel Smith
372e7b7727 Ensure that MockPodRegistry verifies the query it's passed. 2014-06-17 18:33:51 -07:00
brendandburns
1fd954b1d3 Merge pull request #138 from lavalamp/master
Normalize etcd_registry's storage & error handling
2014-06-17 17:34:42 -07:00
brendandburns
a3036d2c81 Merge pull request #143 from jjhuff/fix_scheduler_panic
FirstFitScheduler was triggering a panic by passing nil as the query to EtcdRegistry.ListPods
2014-06-17 17:33:17 -07:00
Justin Huff
1bef7fdd04 FirstFitScheduler was triggering a panic by passing nil as the query to
EtcdRegistry.ListPods. I think this was just missed during the recent
label refactor.
2014-06-17 15:48:37 -07:00
Justin Huff
3072ccf088 When the apiserver panics, log a stacktrace. 2014-06-17 14:59:37 -07:00
Daniel Smith
500ef4c46c Extract yet more redundancy 2014-06-17 13:53:47 -07:00
Daniel Smith
77556a5eb0 Extract more redundancy 2014-06-17 13:53:47 -07:00
Daniel Smith
25ab3b695e Move duplicated logic into single function. 2014-06-17 13:53:47 -07:00
Brendan Burns
2759b2367f Add load balancing support to services. 2014-06-17 12:37:39 -07:00
Daniel Smith
e10e5b99d5 Fix typo 2014-06-16 22:21:43 -07:00
Daniel Smith
c4e575d4ac switch to different types for different parts of the label query 2014-06-16 22:05:12 -07:00
Daniel Smith
3b980bd9dc Make deterministic 2014-06-16 22:05:12 -07:00
Daniel Smith
c534d070e5 Rename LabelSet labels.Set 2014-06-16 22:05:12 -07:00
Daniel Smith
5c3e4fab58 add another test 2014-06-16 22:05:12 -07:00
Daniel Smith
7d05ba4dc4 Implement new label system 2014-06-16 22:05:12 -07:00
Daniel Smith
ad2ec27e91 Implement label queries for controller registry 2014-06-16 22:05:12 -07:00
Daniel Smith
154ec0db1e apiserver builds again 2014-06-16 22:05:12 -07:00
Daniel Smith
1c6342a794 Move labels to own package 2014-06-16 22:05:11 -07:00
Daniel Smith
3ab2f8a3a2 First piece of improving labels 2014-06-16 22:05:11 -07:00
Daniel Smith
6d3af1f8ff Make success status public so it will actually get sent to clients 2014-06-16 22:05:11 -07:00
Brendan Burns
b8eaa8634e Remove dot syntax. 2014-06-16 11:16:18 -07:00
Daniel Smith
ea5cbd44bb Refactor apiserver command; move logic to a package for reuse and eventual testing 2014-06-15 23:30:58 -07:00
Daniel Smith
b3ab658c71 consistent filenames 2014-06-15 23:30:58 -07:00
Brendan Burns
32071289e6 Add some documentation 2014-06-15 22:42:19 -07:00
Brendan Burns
76148dc85f gofmt 2014-06-15 21:57:29 -07:00
Brendan Burns
2e68d087a9 Add udp support. 2014-06-15 21:19:35 -07:00
Daniel Smith
229ccb0fa3 Merge pull request #110 from jbeda/test-fix
Stable comparison of stuff that transits through map.
2014-06-14 16:05:30 -07:00
Daniel Smith
c7a307ceb2 Merge pull request #105 from lavalamp/improve_e2e
Add a new e2e test; fix some bugs/usability problems
2014-06-14 16:03:56 -07:00
Joe Beda
c6dd6cb410 Stable comparison of stuff that transits through map.
There are probably more of these in the codebase.  Looks like this happens with the go tip via travis.
2014-06-14 14:42:00 -07:00
Daniel Smith
50b9c34cf1 Fix error recovery. 2014-06-13 18:11:32 -07:00
Daniel Smith
5626703634 Add a new e2e test; fix some bugs/usability problems 2014-06-13 16:30:26 -07:00
Joe Beda
239e1273cf The Mac is picky about the syntax for listening on ephemeral ports. 2014-06-13 16:04:17 -07:00
Daniel Smith
2324dc1510 Merge pull request #102 from brendandburns/errors
Make all error strings lower case, for readability.
2014-06-13 15:56:40 -07:00
brendandburns
7342b6cee9 Merge pull request #100 from lavalamp/fix_panic
Add nice(r) error message on api server panic. Fix nil ptr derefs.
2014-06-13 15:46:52 -07:00
Brendan Burns
482a360f9e Make all error strings lower case, for readability. 2014-06-13 15:45:19 -07:00
Daniel Smith
b95eef522b Add nice(r) error message on api server panic. Fix nil ptr derefs. 2014-06-13 14:59:36 -07:00
Brendan Burns
d393838dfd Only manage containers with '--' in the name. 2014-06-13 12:09:48 -07:00
Daniel Smith
9cd9754693 Merge pull request #92 from brendandburns/container_info
Add status message population.
2014-06-13 10:49:32 -07:00
Brendan Burns
c2c6055d70 Add status message population. 2014-06-13 09:42:04 -07:00
Daniel Smith
e1bc4d2eba Port 2223 is in use on my machine sometimes, so this test was flaky. 2014-06-12 21:55:55 -07:00
Daniel Smith
f9a5fadf45 Merge pull request #86 from brendandburns/dot
Remove dot import syntax from registry package.
2014-06-12 20:58:13 -07:00
Brendan Burns
164160adef Address package level comments for readability. 2014-06-12 20:26:12 -07:00
brendandburns
f053a49988 Merge pull request #71 from brendandburns/container_info
Fix some problems in container info handling if the container's no present.
2014-06-12 20:17:05 -07:00
brendandburns
4a8c53e7bd Merge pull request #74 from danielnorberg/dano/cloudcfg-start
cloudcfg: resize <name> <replicas> command
2014-06-12 20:16:31 -07:00
Brendan Burns
0c3b9f2b69 fix dot import. 2014-06-12 20:14:41 -07:00
Daniel Smith
078451053b gofmt -s && change gofmt reminder to specify -s in prepare-commit-msg 2014-06-12 17:25:46 -07:00
Daniel Smith
867daadbdb Yaml parses json, too; no need to try both. 2014-06-12 17:23:28 -07:00
Daniel Smith
2abfd95d6b Tests pass now. 2014-06-12 17:23:28 -07:00
Daniel Smith
601f6bb4ad Add inline attribute 2014-06-12 17:23:28 -07:00
Daniel Smith
853a4e26a8 Call parsing code from cloudcfg 2014-06-12 17:23:28 -07:00
Daniel Smith
881613e3f5 First part of parsing settings client-side 2014-06-12 17:23:28 -07:00
Brendan Burns
b05bc22a62 Refactor the kubelet for testability.
Add unit tests.  Test coverage to 56.9%
2014-06-12 14:44:46 -07:00
Johan Euphrosine
4f6bed03ae gofmt -s pkg/ cmd/ 2014-06-12 14:16:19 -07:00
Daniel Norberg
339623736d cloudcfg: resize <name> <replicas> command 2014-06-12 17:07:06 -04:00
Daniel Norberg
75957dc5b9 cloudcfg: fix TestDoRequest 2014-06-12 16:35:00 -04:00
Brendan Burns
c36a7896fd Added a comment explaining the function. 2014-06-12 11:27:50 -07:00
Daniel Smith
ac65cc7094 Address comments 2014-06-12 09:35:04 -07:00
Daniel Smith
69acbf5a74 Fix build 2014-06-12 09:35:04 -07:00
Daniel Smith
7c17db672e Move hostname detection logic to allow replacement 2014-06-12 09:35:04 -07:00
Daniel Smith
187f7d2534 cloudcfg working locally now 2014-06-12 09:35:04 -07:00
Daniel Smith
8178240bbe Add a binary and scripts for running a local kubernetes cluster. 2014-06-12 09:35:04 -07:00
Joe Beda
02d9cf2eb9 Merge pull request #69 from brendandburns/scheduler
Fix the first fit scheduler to randomize.
2014-06-11 21:29:51 -07:00
Daniel Smith
12c1d660a3 Fix link 2014-06-11 17:20:16 -07:00
Daniel Smith
4f848b6d3b Need proper package comment. 2014-06-11 17:20:16 -07:00
Brendan Burns
5563459178 Fix the first fit scheduler to randomize. 2014-06-11 17:11:48 -07:00
Brendan Burns
9f76f13205 gofmt 2014-06-11 12:50:01 -07:00
Brendan Burns
d83f407e43 Fix tests. 2014-06-09 16:50:44 -07:00
Brendan Burns
62f6291377 Fix a bug if the container is non-existent. 2014-06-09 16:45:17 -07:00
Brendan Burns
9010ef954c Update tests 2014-06-09 07:16:43 -07:00
Brendan Burns
c96b14aba0 Fixes for task->pod changes & a TODO 2014-06-08 23:29:04 -07:00
Brendan Burns
f204bd52bc Add some more docs. 2014-06-08 23:07:29 -07:00
Brendan Burns
3e211272a7 Added. 2014-06-08 23:07:29 -07:00
Brendan Burns
fdcf273d50 Add pretty printing. 2014-06-08 23:07:29 -07:00
Brendan Burns
5cb4444176 Task -> Pod #4, the final chapter 2014-06-08 23:00:12 -07:00
Brendan Burns
6018497174 Task -> Pod part #3 2014-06-08 22:38:45 -07:00
Brendan Burns
79b7976cbf Add pod registry. 2014-06-08 21:43:17 -07:00
Brendan Burns
66e2575f2b More Task -> Pod 2014-06-08 21:43:17 -07:00
Brendan Burns
c8d493f532 Part one of the grand rename: Task -> Pod 2014-06-08 21:17:53 -07:00
brendandburns
139be599e9 Merge pull request #25 from lavalamp/rename_kl
Change 'this' varable to more sensible abbreviation
2014-06-08 20:38:32 -07:00
Daniel Smith
62aba06180 Change 'this' varable to more sensible abbreviation 2014-06-08 20:35:07 -07:00
Daniel Smith
c3c739d6b4 Fix spelling 2014-06-08 19:48:04 -07:00
Daniel Smith
19343c6014 Add test to kubelet, coverage up to 37% 2014-06-08 16:10:29 -07:00
Brendan Burns
0181953242 Add kind in all cases for list. 2014-06-07 21:57:36 -07:00
Brendan Burns
6e7b3fd969 Fix a compile error. 2014-06-07 21:56:14 -07:00
Brendan Burns
ef7cce5dad Populate 'Kind' field in all API types being returned. 2014-06-07 21:07:20 -07:00
Joe Beda
2c4b3a562c First commit 2014-06-06 16:40:48 -07:00