Commit Graph

70 Commits

Author SHA1 Message Date
Brendan Burns
5d4f1cf8da Add Validate in addition to ValidateUpdate to validation for most resources. 2015-04-08 20:15:49 -07:00
derekwaynecarr
b745f51c65 Client must specifiy a resource version on finalize 2015-04-01 11:16:45 -04:00
Andy Goldstein
d7c5f427cb Pass ctx to Validate, ValidateUpdate
Pass ctx to Validate/ValidateUpdate. This is useful so strategies can
access data such as the current user.
2015-03-30 17:33:08 -04:00
Tim Hockin
0f36c68244 Add REST PrepareForUpdate() hook
As per discussion with @snmarterclayton.  I implemented this for most
types in the "obvious" way.  I am not sure how to implement
this for a couple types, though.
2015-03-26 13:48:41 -07:00
Tim Hockin
b2687c1a84 rename ResetBeforeCreate to PrepareForCreate 2015-03-26 13:48:34 -07:00
derekwaynecarr
84c9709299 Increase controller sync time for namespace cleanup 2015-03-24 10:44:34 -04:00
derekwaynecarr
29c491ef2e Namespace.Spec.Finalizer support 2015-03-24 10:36:06 -04:00
Clayton Coleman
9bb797fe93 Rename NewREST -> NewStorage to align on terminology 2015-03-23 16:52:21 -04:00
Clayton Coleman
5a3f0adbcc Remove older names 2015-03-23 16:52:21 -04:00
Clayton Coleman
d46087db50 Move REST* interfaces into pkg/api/rest
Dependency chain is now api -> api/rest -> apiserver.  Makes the
interfaces much cleaner to read, and cleans up some inconsistenties
that crept in along the way.
2015-03-23 16:52:21 -04:00
Clayton Coleman
65425f690c Move field errors to pkg/util/fielderrors
Allows pkg/api to take a reference to labels.Selector and fields.Selector
2015-03-22 17:43:34 -04:00
Clayton Coleman
428d2263e5 Graceful deletion of resources
This commit adds support to core resources to enable deferred deletion
of resources.  Clients may optionally specify a time period after which
resources must be deleted via an object sent with their DELETE. That
object may define an optional grace period in seconds, or allow the
default "preferred" value for a resource to be used. Once the object
is marked as pending deletion, the deletionTimestamp field will be set
and an etcd TTL will be in place.

Clients should assume resources that have deletionTimestamp set will
be deleted at some point in the future.  Other changes will come later
to enable graceful deletion on a per resource basis.
2015-03-19 15:33:32 -04:00
Clayton Coleman
bddef32193 Prepare EtcdHelper to extract more data from Node
In order to support graceful deletion, the resource object will
need access to the TTL value in etcd.  Also, in the future we
may want to get the creation index (distinct from modifiedindex)
and expose it to clients.  Change EtcdResourceVersioner to be
more type specific (objects vs lists) and provide a default
implementation that relies on the internal API convention.

Also, rename etcd_tools.go to etcd_helper.go and split a few
things up.
2015-03-16 15:33:50 -04:00
derekwaynecarr
9824d2b5f7 Embed generic etcd in namespace rest store 2015-03-16 10:45:04 -04:00
derekwaynecarr
2d13dfaf13 Improvements to namespace registry to align with pod model 2015-03-16 10:16:28 -04:00
Salvatore Dario Minonne
925fa6baf8 Adding fields selector 2015-03-10 22:13:10 +01:00
Clayton Coleman
a52b0f2619 Switch List/Watch to ListPredicate/WatchPredicate 2015-03-04 10:48:05 -05:00
Clayton Coleman
8440310ea0 Adapt to changes to generic etcd/registry 2015-02-13 13:11:33 -05:00
Clayton Coleman
26f08b7807 RESTStorage should not need to know about async behavior
Also make sure all POST operations return 201 by default.
Removes the remainder of the asych logic in RESTStorage and
leaves it up to the API server to expose that behavior.
2015-02-11 16:26:08 -05:00
derekwaynecarr
0bd0e12bbc Add support for Namespace as Kind
Add example for using namespaces
2015-02-10 09:50:50 -05:00