Commit Graph

295 Commits

Author SHA1 Message Date
Brendan Burns
dcfcf315e5 Revert "Add an api object for the kubelet, and a versioned endpoint."
This reverts commit d4b9979382.
2014-12-12 21:13:44 -08:00
Brendan Burns
d4b9979382 Add an api object for the kubelet, and a versioned endpoint. 2014-12-12 15:26:28 -08:00
Jordan Liggitt
51bfb50698 Use util.Time consistently in types.go 2014-12-11 11:14:25 -05:00
Daniel Smith
272bfc97ed Merge pull request #2788 from smarterclayton/roundtrip_node_nodelist
Rename Minions -> Nodes internally
2014-12-10 11:12:15 -08:00
Clayton Coleman
0d887ae7b3 Change podStatus from Nodes.List() -> Nodes.Get(name)
Retrieves a lot less data
2014-12-10 12:08:19 -05:00
Clayton Coleman
d1d7505272 Rename client Minions->Nodes, select the correct path for v1beta3
Replaces the client public interface but leaves old references to "minions"
for a later refactor.  Selects the path "nodes" for v1beta3 and "minions"
for older versions.
2014-12-10 12:08:19 -05:00
Clayton Coleman
19379b5a38 Internal rename api.Minion -> api.Node 2014-12-10 12:08:18 -05:00
Deyuan Deng
76552423f9 Move watch filter into storage level 2014-12-04 20:15:27 -05:00
Tim Hockin
89875ef09d Loosen DNS 952 for labels 2014-12-01 12:30:43 -08:00
Brendan Burns
a5bc6301a4 Revert "Using util.Time for ContainerStatus" 2014-11-24 21:32:31 -08:00
Daniel Smith
610ab9a0db Merge pull request #2586 from dchen1107/cleanup
Using util.Time for ContainerStatus
2014-11-24 15:35:07 -08:00
Dawn Chen
acb0f1198b Using util.Time for ContainerStatus 2014-11-24 15:15:33 -08:00
Eric Tune
f122fc94bf Move service enviroment vars code.
GetServiceEnvironmentVariables (originally in  pkg/registry/service/rest.go)
is split into two parts: one that lists services, and one that turns
a ServiceList into environment vars.  This will allow a subsequent PR
to add a call to the latter function with an existing ServiceList.
The former part is moved into pkg/registry/pod/bound_pod_factory.go.
The latter part is put in a new package, pkg/kubelet/envvars/envvars.go.
The new package is under kubelet because the container enviroment is more
associated with kubelet than with registry.
Test code moved too.
2014-11-23 05:50:34 -08:00
markturansky
8159c8fd25 Refactor PodCondition to PodPhase 2014-11-21 15:28:38 -05:00
markturansky
13cba21c6c Add old and new DesiredState/Status to podToSelectableFields for watches 2014-11-21 09:46:05 -05:00
Tim Hockin
ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
markturansky
8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
derekwaynecarr
15701ff403 Set uid during object create 2014-11-13 15:25:49 -05:00
markturansky
119f654a13 Refactor PodStatus to PodCondition in internal API for v1beta3 2014-11-05 17:26:47 -05:00
Daniel Smith
3bd10d4fb4 Merge pull request #2145 from lavalamp/eventing2
Add a placeholder to boundPod's SelfLink
2014-11-05 13:49:53 -08:00
markturansky
bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Daniel Smith
724db61c1d Add a placeholder to boundPod's SelfLink, and test that one can make references to them. 2014-11-03 17:46:33 -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
Clayton Coleman
5cb3c10289 Merge pull request #1782 from smarterclayton/allow_put_to_set_create
Allow clients to determine the difference between create or update on PUT
2014-10-28 13:40:41 -04:00
Clayton Coleman
d5ee171410 Allow clients to determine the difference between create or update on PUT
PUT allows an object to be created (http 201).  This allows REST code to
indicate an object has been created and clients to react to it.

APIServer now deals with <-chan RESTResult instead of <-chan runtime.Object,
allowing more data to be passed through.
2014-10-24 14:41:15 -04:00
derekwaynecarr
c6eb371c93 Fixup unit tests 2014-10-24 11:49:04 -04:00
derekwaynecarr
580cb5ea4f Rework client.Interface 2014-10-24 11:47:30 -04:00
Clayton Coleman
644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman
09800643e2 Change validation now that namespace is on ObjectMeta 2014-10-24 11:22:20 -04:00
Clayton Coleman
91d9a90e4e Replace use of "id" in strings with "name" 2014-10-22 15:59:12 -04:00
Clayton Coleman
bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
deads2k
34b5861b60 add unit tests for rejection of conflicting namespaces 2014-10-21 15:57:02 -04:00
Clayton Coleman
6ae611aedd Write BoundPods to etcd instead of ContainerManifestList
Rename ManifestFactory -> BoundPodFactory and change the general structure
of the call to focus on BoundPod.
2014-10-16 19:29:08 -04:00
Tim Hockin
e907011111 Core support for ip-per-service 2014-10-16 08:36:47 -07:00
Dawn Chen
f01fd8ff38 After all containers in a pod started. If any one container is still running,
or in the process of restarting, mark pod status running.

Fix #1758.
2014-10-14 10:26:31 -07:00
Brendan Burns
9ffa69ce15 Merge pull request #1696 from derekwaynecarr/pod_cache_needs_namespace
Pod cache needs to be namespace-aware
2014-10-10 08:28:32 -07:00
derekwaynecarr
9e60bf1e43 Pod cache needs to be namespace-aware 2014-10-10 09:35:31 -04:00
Eric Tune
8296f038ac Delete unused function. 2014-10-09 16:40:11 -07:00
Clayton Coleman
82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Daniel Smith
ee107d3fad fix extra un-cosmetic extraneous code. 2014-10-07 14:08:18 -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
Dawn Chen
8d0ed93aa1 Clean unittests 2014-10-06 13:37:22 -07:00
Dawn Chen
9861eb7c8e Initial support of propogating the termination reasons and image failure
to apiserver. Deprecated docker.Container from API completely.

Conflicts:
	pkg/api/types.go
	pkg/kubelet/kubelet.go
2014-10-06 13:37:22 -07:00
Tim Hockin
372aa07b58 Better handling of unbound pods.
A small collection of tweaks to better handle pods when they are not currently
bound to a host.
2014-10-06 12:27:18 -07:00
Brendan Burns
a115840e4f Add a caching layer, so we don't pound cloud providers for ip addresses. 2014-10-02 21:51:09 -07:00
derekwaynecarr
6625e58a20 Updates to review comments 2014-10-01 10:57:50 -04:00
derekwaynecarr
0312d80ffa Update test cases to use default context 2014-10-01 10:57:50 -04:00
derekwaynecarr
e4ec49ee6b Require namespace on controller, pod, service objects 2014-10-01 10:57:50 -04:00
derekwaynecarr
09365fed8d Add ctx to registry interfaces 2014-09-26 15:18:42 -04:00
derekwaynecarr
ee19ba186d Update to use api.Context 2014-09-26 11:50:34 -04:00
derekwaynecarr
be85ad7a3d Add context object in test cases flows 2014-09-26 11:50:34 -04:00
derekwaynecarr
3e685674e7 Add context object to interfaces 2014-09-26 11:50:34 -04:00
Brendan Burns
431caa93df Merge pull request #1335 from dchen1107/exit1
Convert existing kubernetes system to use ContainerStatus, instead of
2014-09-24 21:37:24 -07:00
Tim Hockin
b2472d8bec Fix docker-links-style env vars for services
This includes 3 changes:

1) Use the Service.Protocol field, rather than hardcoding TCP.
2) Use Service.Port rather than ContainerPort - ContainerPort can be a string
   and has absolutely no meaning to consumers.
3) Beef up tests for these env vars.
2014-09-24 12:29:06 -07:00
Dawn Chen
0e6ec3cbfc Convert existing kubernetes system to use ContainerStatus, instead of
docker.Container directly.

Conflicts:
	pkg/kubelet/dockertools/docker.go
	pkg/registry/pod/rest.go
2014-09-24 11:16:46 -07:00
Tim Hockin
089c5602fd Add per-service env vars for *_SERVICE_HOST
As a replacement of a single SERVICE_HOST variable, offer a FOO_SERVICE_HOST
variable.  This will help ease the transition to ip-per-service, where there
is no longer a single service host.

# *** ERROR: *** Some files are missing the required boilerplate
# header from hooks/boilerplate.txt:
#   examples/guestbook/redis-slave/run.sh
#
# Your commit will be aborted unless you fix these.
#   COMMIT_BLOCKED_ON_BOILERPLATE
2014-09-24 09:07:21 -07:00
Brendan Burns
253bce42fe Extract the minion registry from the etcd implementation into the pod registry where it belongs. 2014-09-23 15:42:59 -07:00
Deyuan Deng
f966a51fc0 Out of place test table 2014-09-18 21:44:52 -04:00
Brendan Burns
edf3eb04e2 Fix the build. 2014-09-18 15:29:17 -07:00
Daniel Smith
12b677ad56 Merge pull request #1356 from brendandburns/healthz
Adjust the logic, so that if the apiserver restarts, or has no pod info
2014-09-18 15:15:24 -07:00
Joe Beda
4487f311ab Merge pull request #1326 from lavalamp/scheduler
Fix cache to use the "List then Watch" pattern.
2014-09-18 09:00:52 -07:00
Brendan Burns
17cbde0c5a Adjust the logic, so that if the apiserver restarts, or has no pod info
for some other reason, pods on missing machines are still 'terminated'
2014-09-17 21:57:11 -07:00
Brendan Burns
99586b4da4 Fix a problem where if a minion went missing, we still thought the pod was running.
Also convert some tests to table driven.
2014-09-17 18:16:52 -07:00
Daniel Smith
4e9cf2ccb4 Add field selector to List, implement for pods. 2014-09-16 16:17:16 -07:00
Clayton Coleman
61e3ce7ddc Make runtime less global for Codec
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
  sets global defaults for "most recent encoding"
  * v1beta1 is the current "latest", v1beta2 exists
  * Kill DefaultCodec, replace it with "latest.Codec"
  * This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
  package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Clayton Coleman
fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
derekwaynecarr
0c20fffa06 No DNS in vagrant cross minions, need explicit IP as host 2014-09-11 13:38:50 -04:00
Daniel Smith
759c3f9033 Rename all XStorage types to REST for clarity 2014-09-08 15:19:13 -07:00
Dawn Chen
7ace5a3e83 Passing pod UUID to Kubelet. 2014-09-08 14:24:09 -07:00
Daniel Smith
fc09f988b4 Make tests pass again 2014-09-07 22:26:42 -07:00
Daniel Smith
0d30a656ef Do interface{} -> runtime.Object rename everywhere 2014-09-07 22:19:24 -07:00
Daniel Smith
1c2b65788d Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names 2014-09-07 22:19:24 -07:00
Clayton Coleman
34c40e4e48 Errors should be part of api/errors, not apiserver
Renames constructor methods to be errors.New<name> which changed a few
places.
2014-09-03 17:16:00 -04:00
Daniel Smith
a63966e73c Combine pkg/apitools and pkg/api/common and call the result pkg/runtime 2014-09-02 11:15:44 -07:00
Daniel Smith
099c8fd36f Propagate rename; tests pass again. 2014-09-02 10:42:06 -07:00
Vojtech Vitek (V-Teq)
42c656501c Add several missing pkg Godoc files
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:11 +02: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
Deyuan Deng
d528949547 Fix pod status error with List method. 2014-09-01 21:23:50 -04:00
Clayton Coleman
bafc422ac0 Add the resource version to api.*List items from etcd
Allows clients to watch more easily (can invoke Get, then
Watch).
2014-08-28 23:17:00 -04:00
Clayton Coleman
52923a1348 Return validation errors from storage create/update 2014-08-26 13:30:55 -04:00
Daniel Smith
72b35816cd Need to remove pods that change labels. 2014-08-25 15:56:54 -07:00
Daniel Smith
98ef76c164 Remove references to scheduler from pod storage. 2014-08-25 11:59:00 -07:00
Daniel Smith
ddba004ad0 Add constraint package to let us reject invalid assignments. 2014-08-25 11:59:00 -07:00
Daniel Smith
0a1dfa366e Make integration test pass. 2014-08-25 11:59:00 -07:00
Daniel Smith
29e9e13188 Remove synchronous assignPod call from create pod 2014-08-25 11:59:00 -07: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
Tim Hockin
95e0be9a63 Move FakeCloud into its own pkg 2014-08-20 20:16:41 -07:00
Clayton Coleman
493863eb93 Return immediately when controllers/pods are committed
Add client waiting conditions.
2014-08-20 18:46:10 -04:00
Brendan Burns
a198bbb0ae Switch api.Status to *api.Status in a bunch of places. 2014-08-20 10:21:49 -07:00
Daniel Smith
4b2867fd8a Standardize watch usage in registry/storage objects. Fix up extremely confusing pod test object. 2014-08-16 19:07:41 -07:00
Daniel Smith
e40e5b53a7 Add Watch to /pods. 2014-08-16 19:07:29 -07: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
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