Commit Graph

7 Commits

Author SHA1 Message Date
markturansky
f762b303ad PersistentVolume & PersistentVolumeClaim API types 2015-03-25 10:09:25 -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
abe8adc2e2 Expose new REST strategy methods for Pods 2015-02-13 12:12:50 -05:00
Clayton Coleman
c24f4a24b4 Rename TryAgainLater status code to ServerTimeout 2015-02-12 15:01:12 -05:00
Clayton Coleman
1588970ec4 Turn 409 into 500 Try Again Later when using generateName
If a client says they want the name to be generated, a 409 is
not appropriate (since they didn't specify a name). Instead, we
should return the next most appropriate error, which is a 5xx
error indicating the request failed but the client *should* try
again.  Since there is no 5xx error that exactly fits this purpose,
use 500 with StatusReasonTryAgainLater set.

This commit does not implement client retry on TryAgainLater, but
clients should retry up to a certain number of times.
2015-02-02 14:46:25 -05:00
Clayton Coleman
e485dc93ca Minions should have common logic with create
TODO: disable / document generate names for cluster scoped resources.
2015-02-02 14:46:25 -05:00
Clayton Coleman
a7c9a12286 Add name generation and normalize common create flows
Adds `ObjectMeta.GenerateName`, an optional string field that defines
name generation behavior if a Name is not provided.

Adds `pkg/api/rest`, which defines the default Kubernetes API pattern
for creation (and will cover update as well). Will allow registries
and REST objects to be merged by moving logic on api out of those places.

Add `pkg/api/rest/resttest`, which will be the test suite that verifies
a RESTStorage object follows the Kubernetes API conventions and begin
reducing our duplicated tests.
2015-02-02 14:44:53 -05:00