Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).
* This change is based on pull request 2587.
* Most defaulting has been migrated to defaults.go where the defaulting
functions are added.
* validation_test.go and converter_test.go have been adapted to not testing the
default values.
* Fixed all tests with that create invalid objects with the absence of
defaulting logic.
This leaves `pkg/kubelet/server/server.go` looking a little ugly as there is an extra layer of "config" structs that isn't needed. This is left as a TODO for now.
1) Absolute paths without a hostname were being rewritten relative to
the current page, rather than relative to the current host.
e.g. When viewing /some/page.html, it would rewrite:
/other/page.html => proxyPrepend/some/other/page.html
Instead, it should rewrite:
/other/page.html => proxyPrepend/other/page.html
2) Trailing slashes were being stripped from all rewritten URLs.
This is because path.Join() always calls path.Clean() as well:
http://golang.org/pkg/path/#Join
Backport annotation support to v1beta1 and v1beta2 PodTemplateSpec. This
allows ReplicationController users to specify annotations for Pods in
addition to labels.
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.
Allow the master to have pod/node cache timeouts controlled via a config
flag for integration tests.
Move integration test to '127.0.0.1' so that it correctly returns a health
check, and enable health check testing on the integration test.
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.