Enforce namespace unique constraints

This is the update to actually enable namespace support.

At the moment, I pass a namespace as a query parameter in order to support namespace scoping on the v1beta urls.  Once v1beta3 lands, I will modify to pass namespace in the path.  Note the client libraries were modified to make this easy to do, so should be a trivial change once ready.

I broke the commits into logical sections to improve readability.
You guys have until EOD tomorrow to settle this, please.

On Tue, Oct 14, 2014 at 3:16 PM, Daniel Smith <notifications@github.com>
wrote:

> In pkg/api/context.go:
>
> > @@ -71,3 +77,12 @@ func ValidNamespace(ctx Context, resource *TypeMeta) bool {
> >  	}
> >  	return ns == resource.Namespace && ok
> >  }
> > +
> > +// WithNamespaceDefaultIfNone returns a context whose namespace is the default if and only if the parent context has no namespace value
>
> Right. You should have to do something special to get a context with the
> "search everything" namespace, if you do nothing special you should get a
> context with the "default" namespace.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/1564/files#r18863027>
> .
>