WIP: First cut at input validation for Kubelet

* Add some util functions for basic validation
* Spec api fields more tightly
* Break a dep from util -> api, so I can do the reverse
* Add functions to validate structures
* Call those functions when running manifests

This does not validate as it unmarshals YAML or JSON because I want to be able
to validate structures that come from other inputs without forcing them to be
YAML.

This does not handle all api structures - I am not familiar wnough with the
rest to spec them this tightly - I hope someone else can do that.

There are a number of open questions, marked "FIXME".  Please offer feedback
or opinions.
Pushed a new commit that accepts MountPath or Path.


On Sun, Jun 29, 2014 at 1:19 PM, Tim Hockin <thockin@google.com> wrote:

> I agree that we need to clean this up to not spec the same ID and version
> all over.  Different change.
>
>
> On Sun, Jun 29, 2014 at 1:13 PM, Daniel Smith <notifications@github.com>
> wrote:
>
>> In api/examples/pod-list.json:
>>
>> > @@ -8,6 +8,8 @@
>> >              },
>> >              "desiredState": {
>> >                "manifest": {
>> > +                "version": "v1beta1",
>> > +                "id": "my-pod-1",
>>
>> Suggestion: Instead of forcing everyone to write the same ID for pod and
>> manifest everywhere, have apiserver copy the id from pod to manifest?
>> (maybe in another PR...)
>>
>> --
>> Reply to this email directly or view it on GitHub
>> <https://github.com/GoogleCloudPlatform/kubernetes/pull/280/files#r14331250>
>> .
>>
>
>