Commit Graph

1291 Commits

Author SHA1 Message Date
Tim Hockin
caadf10197 clarity: rename minionRegistryMaker to makeMinionRegistry 2014-08-20 20:17:16 -07:00
Daniel Smith
138b560efb Implement bindings
This will effectively cause no changes until we remove the assignPod
call from CreatePod().
2014-08-18 16:55:44 -07:00
Daniel Smith
26e2256178 Remove unused and not completely correct code 2014-08-15 18:20:37 -07:00
Clayton Coleman
bbf3b55e76 Extract RESTHandler and allow API groupings
Prepare for running multiple API versions on the same HTTP server
by decoupling some of the mechanics of apiserver.  Define a new
APIGroup object which represents a version of the API.
2014-08-13 10:53:34 -04:00
Kelsey Hightower
c21a0ca39f Breakup the registry package into separate packages.
Currently all registry implementations live in a single package,
which makes it bit harder to maintain. The different registry
implementations do not follow the same coding style and naming
conventions, which makes the code harder to read.

Breakup the registry package into smaller packages based on
the registry implementation. Refactor the registry packages
to follow a similar coding style and naming convention.

This patch does not introduce any changes in behavior.
2014-08-11 20:58:09 -07:00
brendandburns
3222f61bca Merge pull request #557 from lavalamp/podLocation
Prepare for external scheduler
2014-08-11 15:27:24 -07:00
Daniel Smith
7d605467dc New scheduler API
This commit adds a Binding object. The idea is that schedulers can write
these to cause pods to be asssigned to hosts. I'll provide an implementation
along with a rudimentary scheduler plugin.

This continues k8s' tradition of phrasing all APIs as RESTful handlers.
2014-08-10 19:05:03 -07:00
Daniel Smith
5cdce0e35a Prepare for external scheduler
1. Change names of Pod statuses (Waiting, Running, Terminated).
2. Store assigned host in etcd.
3. Change pod key to /registry/pods/<podid>. Container location remains
   the same (/registry/hosts/<machine>/kublet).
2014-08-10 15:05:36 -07:00
Clayton Coleman
c9fc0bcf3d Decouple apiserver from codec implementation
The apiserver on initialization must be provided with a codec
for encoding and decoding all handled objects including api.Status
and api.ServerOp.  In addition, the RESTStorage Extract() method
has been changed to New(), which returns a pointer object that the
codec must decode into (the internal object).  Switched registry
methods to use pointers for Create/Update instead of values.
2014-08-07 13:35:35 -04:00
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
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
Brendan Burns
6c734b1c55 integrate minion health checking and caching. 2014-07-21 21:52:33 -04: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
Brendan Burns
c6255afe37 Make the service reconciller use the API, not a PodRegistry 2014-07-18 13:54:33 -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
Kouhei Ueno
938d9e811b don't reuse random 2014-07-16 15:58:16 +09:00
Yuki Yugui Sonoda
2861955025 Corrects wording of godoc comments. 2014-07-15 22:03:08 +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
c875a6d3ba rename FirstFitScheduler to RandomFitScheduler 2014-07-12 23:23:53 +09:00
Claire Li
d0aad153ee pkg/master: correct error string for GetPodInfo 2014-07-11 23:09:43 -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
88284171f2 Fixes golint errors in pkg/master 2014-07-11 22:28:27 +09:00
Burcu Dogan
6a2703627b scheduler: use New rather than Make for construction helpers. 2014-07-10 22:56:14 -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
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
Brendan Burns
d5516e4cdc Activate gce minion list. 2014-07-01 11:33:58 -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
Brendan Burns
431fcac8b0 Initial integration of the cloud based minion registry. 2014-06-27 22:49:27 -07:00
Brendan Burns
a391b2ff03 Implement sync behavior for controllers. 2014-06-26 19:44:28 -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
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
79ee5aa250 Implement minion registry. Minions now a first-class object. 2014-06-23 13:27:52 -07:00
Daniel Smith
d57531d924 Cleanup: no need for stacked timing loops 2014-06-22 11:17:23 -07:00
Brendan Burns
302ec0f37b Wire in the pod cache. Just used for List for now. 2014-06-18 22:26:35 -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
420b2fdd57 Add support for populating host ip address. 2014-06-18 14:57:50 -07:00
Brendan Burns
2759b2367f Add load balancing support to services. 2014-06-17 12:37:39 -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