Commit Graph

34136 Commits (332d62a94a2bc8a7d0c69ca85fcd5c458816d677)

Author SHA1 Message Date
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