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.
yes

On Wed, Oct 15, 2014 at 1:34 PM, Derek Carr <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
>
> I vote yes
> … <#149158515c230ada_>
> Sent from my iPhone
>  On Oct 15, 2014, at 4:29 PM, Tim Hockin <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 Final answer: is this PR done enough to commit tomorrow? @lavalamp
> <https://github.com/lavalamp> @derekwaynecarr
> <https://github.com/derekwaynecarr> @smarterclayton
> <https://github.com/smarterclayton> … — Reply to this email directly or
> view it on GitHub.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/1564/files#r18920554>
> .
>