Commit Graph

40 Commits (e1998e5a07e56543a60f4f4bfaac0cc9a96a1424)

Author SHA1 Message Date
Daniel Smith 5cdce0e35a Prepare for external scheduler
1. Change names of Pod statuses (Waiting, Running, Terminated).
2. Store assigned host in etcd.
3. Change pod key to /registry/pods/<podid>. Container location remains
   the same (/registry/hosts/<machine>/kublet).
2014-08-10 15:05:36 -07:00
Daniel Smith 5dd130a350 Prevent accidental setting of sync or timeout 2014-08-08 14:09:14 -07:00
Daniel Smith 49cded3800 Simplify ResourceWatcher interface to one function. 2014-08-08 14:09:13 -07:00
Daniel Smith 71709ae09e Make replication controller use client 2014-08-08 14:09:13 -07:00
Daniel Smith b430cebe72 Remove etcd dependency from controller manager. 2014-08-04 14:29:49 -07: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
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
Dan McPherson d94f5c3360 Fixing typo 2014-07-30 16:45:53 +02:00
Daniel Smith 31a78c3e2b Merge pull request #619 from brendandburns/controller
Make individual controller actions asynchronous.
2014-07-28 15:35:19 -07: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
Brendan Burns bf5ae4bb9d Fork API types. 2014-07-24 21:47:08 -07:00
Daniel Smith 91375f4c04 Split httpWatcher into watch.StreamWatcher and tools.APIEventDecoder. 2014-07-21 16:07:58 -07:00
Kelsey Hightower a9e0b0d1a3 use %v instead of %#v when logging failures 2014-07-20 11:58:22 -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
Clayton Coleman 1831cf1711 Remove some verbose logging 2014-07-18 10:48:21 -04:00
Claire Li ba9c370014 pkg/controller: cleanup replication_controller.go 2014-07-12 14:21:51 -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
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
Yuki Sonoda (Yugui) 056f871bed Fixes golint errors in pkg/controller 2014-07-10 21:27:01 +09: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 229b8fca2a Don't double-close the channel when etcd returns an error. 2014-07-01 12:49:57 -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
Brendan Burns 13d7a5959a Add sync behavior to the pod registry. Expand tests. 2014-07-01 11:31:21 -07:00
Nan Deng 905c6dcb10 gofmt -r "WaitToWatch->WaitForWatchCompletion" 2014-06-30 16:09:15 -07:00
Nan Deng 62055090b4 fix data races in controller 2014-06-30 14:48:57 -07:00
Brendan Burns 78d9538358 Set id width at 8 and pad with zeros. 2014-06-26 19:24:12 -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
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
Daniel Smith cfce408266 Rename ReplicasInSet to ReplicaSelector 2014-06-19 13:31:42 -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
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 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 a24116c7bd Move controller to it's own package, it's not part of the registry. 2014-06-18 13:10:39 -07:00