Add Labels and Annotations to MetadataAccessor

Yeah, create a local type TypeMeta and give it the necessary attributes (or just add them to the parent type and leave runtime.TypeMeta).  The test is checking that an object that is not an internal / external api object works (ie a type created by someone else with the right name).


> On Nov 28, 2014, at 4:17 PM, Vojtech Vitek <notifications@github.com> wrote:
> 
> In pkg/runtime/types.go:
> 
> > @@ -38,12 +38,14 @@ type TypeMeta struct {
> >  	APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
> >  	Kind       string `json:"kind,omitempty" yaml:"kind,omitempty"`
> >  
> > -	Namespace         string    `json:"namespace,omitempty" yaml:"namespace,omitempty"`
> > -	Name              string    `json:"name,omitempty" yaml:"name,omitempty"`
> > -	UID               string    `json:"uid,omitempty" yaml:"uid,omitempty"`
> > -	CreationTimestamp util.Time `json:"creationTimestamp,omitempty" yaml:"creationTimestamp,omitempty"`
> > -	SelfLink          string    `json:"selfLink,omitempty" yaml:"selfLink,omitempty"`
> > -	ResourceVersion   string    `json:"resourceVersion,omitempty" yaml:"resourceVersion,omitempty"`
> > +	Namespace         string            `json:"namespace,omitempty" yaml:"namespace,omitempty"`
> > +	Name              string            `json:"name,omitempty" yaml:"name,omitempty"`
> > +	UID               string            `json:"uid,omitempty" yaml:"uid,omitempty"`
> > +	CreationTimestamp util.Time         `json:"creationTimestamp,omitempty" yaml:"creationTimestamp,omitempty"`
> > +	SelfLink          string            `json:"selfLink,omitempty" yaml:"selfLink,omitempty"`
> > +	ResourceVersion   string            `json:"resourceVersion,omitempty" yaml:"resourceVersion,omitempty"`
> > +	Labels            map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
> > +	Annotations       map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
> @smarterclayton This is the reason.. https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/api/meta/meta_test.go#L391 - should I rewrite this test to not use the runtime.TypeMeta, right?
> 
> —
> Reply to this email directly or view it on GitHub.
>