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.
I think so - it's a moral enum...


On Fri, Jun 27, 2014 at 10:18 PM, Daniel Smith <notifications@github.com>
wrote:

> In pkg/api/validation.go:
>
> > +distributed under the License is distributed on an "AS IS" BASIS,
> > +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > +See the License for the specific language governing permissions and
> > +limitations under the License.
> > +*/
> > +
> > +package api
> > +
> > +import (
> > +	"fmt"
> > +
> > +	"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
> > +)
> > +
> > +func isValidProtocol(proto string) bool {
> > +	if proto == "TCP" || proto == "UDP" {
>
> Do we really require all caps?
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/280/files#r14322629>
> .
>