Commit Graph

255 Commits (34924af63d8c049f740875f1a0ef69eb13ca0eb8)

Author SHA1 Message Date
Deyuan Deng 762e9a0f57 Create a backgroud task to register static list of machines. 2014-11-20 20:22:32 -05:00
Tim Hockin 8fdaa5d453 Merge pull request #2067 from hmrm/iptables-compatibility
Remove iptables >1.4.11 specific functionality
2014-11-18 08:54:38 -08:00
Haney Maxwell 5d69faa6d6 Allow proxy to run on systems with iptables <1.4.11 2014-11-17 13:37:46 -08:00
Tim Hockin 9c218f0a19 Cleanups of ipv6 changes.
I was late re-reviewing and some comments did not get resolved.
2014-11-17 09:33:14 -08:00
Brendan Burns 2aa52d043b Add external services v2 support. 2014-11-14 11:32:54 -08:00
Brendan Burns c2485a4056 Merge pull request #2147 from justinsb/ipv6
Initial ipv6 / iptables work
2014-11-14 10:34:37 -08:00
Clayton Coleman 6d31c2bf8a util.EncodeJSON proven harmful, remove it everywhere
People were misusing EncodeJSON in tests when they should be using
runtime.EncodeOrDie(testapi.Codec(), obj).  Removing the potential
for cutting self on sharp objects.
2014-11-13 10:38:13 -05:00
Justin SB 9a053a4b59 Initial ipv6 / iptables work 2014-11-03 15:23:04 -08:00
Brendan Burns a624630112 Add some blocking so that we don't generate identical UUIDs for API objects. 2014-11-03 13:27:59 -08:00
Deyuan Deng acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00
Daniel Smith d05dad6c59 Add runner utility. 2014-10-29 11:29:28 -07:00
Brendan Burns b59e49fa13 Add support for git volumes. 2014-10-27 16:35:52 -07:00
Daniel Smith 15c5012933 Add lock to fake handler to avoid races. 2014-10-15 17:46:28 -07:00
Clayton Coleman 935e97d59d Move ObjectDiff into util 2014-10-09 17:23:43 -04:00
deads2k e348b939bf make api match intent with less specific type 2014-10-08 10:01:55 -04:00
Tim Hockin 45f9f39b51 Merge pull request #1597 from thockin/iptables
Add a pkg for iptables support
2014-10-07 17:31:34 -07:00
Brendan Burns 5bdb061f14 Fix the exec test, on os x false and true have different paths, but they're in $PATH on all. 2014-10-07 13:26:25 -07:00
Tim Hockin 4bbe6a10ff Add a pkg for iptables support
This makes iptables an injectable dependency.  The test for this started off
simple, but got a bit out of hand.  It's starting to become a mocking
framework.
2014-10-07 11:36:46 -07:00
Daniel Smith 051d50e98d Merge pull request #1592 from thockin/utilexec
Add a util/exec interface for testing execs.
2014-10-07 11:26:27 -07:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Tim Hockin 0d74fe74cd Add a flag-compatible wrapper for net.IPNet 2014-10-06 18:28:49 -07:00
Daniel Smith 6449b30ca4 Merge pull request #1593 from thockin/utilerrlist
Move ErrorList to util
2014-10-06 16:59:34 -07:00
Tim Hockin 20a1829dad Add a util/exec interface for testing execs. 2014-10-06 16:52:25 -07:00
Tim Hockin 7e83211840 Move ErrorList to util 2014-10-06 12:12:35 -07:00
Tim Hockin 0ad0a247c4 Flag-compatible IP type 2014-10-06 11:29:22 -07:00
Clayton Coleman ff2eca97d9 Refactor the client (again) to better support auth
* Allows consumers to provide their own transports for common cases.
* Supports KUBE_API_VERSION on test cases for controlling which
  api version they test against
* Provides a common flag registration method for CLIs that need
  to connect to an API server (to avoid duplicating flags)
* Ensures errors are properly returned by the server
* Add a Context field to client.Config
2014-10-01 15:23:37 -04:00
Brendan Burns 3ac706a32e Add a rate limiter, use it to rate limit docker pulls. 2014-09-26 11:55:21 -07:00
Jessica Forrester becf6ca4e7 Move RecoverPanics to be the top level wrapped handler. Add new method to be sure a logger has been generated instead of assuming one has. Move regexp list compilation into a utility and pass regexp list into CORS. 2014-09-09 17:50:18 -04:00
Vojtech Vitek (V-Teq) 59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Daniel Smith dd862a7c53 Fix flaky scheduler factory test. 2014-08-28 20:32:20 -07:00
Clayton Coleman 9006eadcfe kube-proxy can read config from the apiserver
All clients that talk to a "master" as a host:port or URL
(scheme://host:port) parameter.  Add tests.
2014-08-27 15:49:01 -04:00
Clayton Coleman 286c3c543c Improve the wait.Poll GoDoc and api
Add more tests, and switch to timeouts instead of cycles.
Deflake TestPoller
2014-08-23 12:18:03 -04:00
Clayton Coleman 1c68247954 Merge pull request #909 from lavalamp/scheduler3
Scheduler plugin v1
2014-08-21 19:04:51 -04:00
Paul Morie 47fd5842ad Fix typo in tests 2014-08-21 17:02:28 -04:00
brendandburns 8f5dd8cf63 Merge pull request #984 from thockin/make_vs_new
Rename a bunch of "Make" functions to "New"
2014-08-20 22:06:57 -07:00
Tim Hockin 0f97a73c1b Rename a bunch of "Make" functions to "New"
Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
brendandburns 1bd4ae0c62 Merge pull request #943 from smarterclayton/only_wait_for_acceptance
Clients must wait for completion of actions
2014-08-20 21:01:21 -07:00
Daniel Smith 8a9eaf911f For testability & reuse, move scheduler setup into its own package. 2014-08-20 16:50:02 -07:00
Clayton Coleman 493863eb93 Return immediately when controllers/pods are committed
Add client waiting conditions.
2014-08-20 18:46:10 -04:00
Paul Morie 5331cd6ec0 Add missing case for IntOrString unit tests 2014-08-20 17:22:29 -04:00
derekwaynecarr 8c07a0f524 Fix verify-boilerplate 2014-08-15 13:12:01 -05:00
Paul Morie c69160059b Change CreationTimestamp to a util.Time and set in each storage implementation
Because time.Time doesn't work correctly with our YAML package, it is necessary
to introduce a type, util.Time, which serializes correctly to JSON and YAML.

Eventually we would like timestamping to cut across storage implementations;
for now, we set it in each storage.
2014-08-14 16:26:29 -04:00
Daniel Smith ab24790e8f Fix go files with wrong boilerplate 2014-08-12 17:48:00 -07:00
Tim Hockin 7201227cb1 Use IntOrString for HTTP health check ports
Clean up code to be more testable.  Add test cases for named and numeric
ports in HTTP health checks.  Improve tests.
2014-08-10 23:26:42 -07:00
Daniel Smith 079c9043bd Switch to new external fuzz package 2014-08-08 15:54:09 -07:00
Tim Hockin 37309ece6d Rename files: stringlist -> list (similar to set) 2014-08-06 20:13:40 -07:00
Brendan Burns 20a8f03d62 Add dns-952-identifier validation to service ids. 2014-08-05 11:40:48 -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
Clayton Coleman f7149926c0 Remove expectNoError from client, kubelet, and util 2014-08-04 09:39:06 -04: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 d09b164e67 Add TODOs, clean up, clarify comments, and add one more test. 2014-07-27 19:32:37 -07: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
Jonathan Boulle c43035088b assorted formatting and typo fixes 2014-07-24 15:10:36 -07: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
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
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
Jonathan Boulle 9e63c3a633 assorted formatting and typo fixes 2014-07-18 13:02:59 -07:00
Clayton Coleman 38ec4ff8c0 Create a configuration update utility
Extracted from proxy/config
2014-07-16 14:13:25 -04:00
Tim Hockin 7d5398bda7 Fix go idiom feedback 2014-07-11 11:43:42 -07:00
Kouhei Ueno 93def86a9e fix go lint errors in util 2014-07-11 21:04:34 +09:00
Tim Hockin c134a16c36 fix go lint errors in util 2014-07-10 17:32:42 -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
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
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 50bbf39925 improvements to integration test organization 2014-07-01 14:02:14 -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 99f85e3897 Merge pull request #309 from monnand/race-controller
fix data races in controller
2014-07-01 11:34:05 -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
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
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
Daniel Smith 011ce9d871 Add crash handler bypass for testing. 2014-06-29 12:35:43 -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
Daniel Smith 3d1e8a92d3 Move stringSet to util.StringSet 2014-06-28 11:46:51 -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
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
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
Tim Hockin 228156dbc6 Remove noisy non-error lines from logs 2014-06-23 17:58:21 -07:00
Daniel Smith b850d36166 Fix boilerplate everywhere 2014-06-23 11:32:11 -07:00
Johan Euphrosine fe589a3f64 pkg/client: refactor tests 2014-06-19 23:12:27 -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 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 65d6280936 Move etcd helper to util so it can be used elsewhere, too 2014-06-18 13:10:39 -07:00
Daniel Smith 50b9c34cf1 Fix error recovery. 2014-06-13 18:11:32 -07:00
Brendan Burns 164160adef Address package level comments for readability. 2014-06-12 20:26:12 -07:00
Daniel Smith 881613e3f5 First part of parsing settings client-side 2014-06-12 17:23:28 -07:00
Daniel Smith 4f848b6d3b Need proper package comment. 2014-06-11 17:20:16 -07:00
Brendan Burns 9f76f13205 gofmt 2014-06-11 12:50:01 -07:00
Brendan Burns 9010ef954c Update tests 2014-06-09 07:16:43 -07:00
Joe Beda 2c4b3a562c First commit 2014-06-06 16:40:48 -07:00