Ensure that kubectl get works with downstream resources

Commit a198a62 introduced a dependency linking the Kube API versions to the implementation
of watching resources used in kubectl.  This removes that dependency and allows conversion
to be handled by the ObjectConvertor defined in the kubectl factory.

@lavalamp review please



> On Nov 18, 2014, at 3:55 PM, Daniel Smith <notifications@github.com> wrote:
> 
> In pkg/kubectl/cmd/get.go:
> 
> >  				checkErr(err)
> >  
> > -				w, err := restHelper.Watch(namespace, rv, labelSelector, labels.Set{}.AsSelector())
> > -				checkErr(err)
> > +				if versioned {
> > +					w = watch.Filter(w, func(in watch.Event) (out watch.Event, keep bool) {
> > +						obj, err := mapping.ObjectConvertor.ConvertToVersion(in.Object, outputVersion)
> It's coming from the mapping, which is per resource name and might be dynamically defined by client input (fetch component plugins, use metadata to determine which api version is used), or it is defined statically by code that reuses kubectl.
> 
> I think it's pretty trivial to make the necessary changes to have the toVersionedMap function do the Right Thing, am I missing something?
> 
The example below (where the scheme is not api.Scheme) would not work - you would have to pass the scheme down into the printer all the way down.
> I don't think that resource printer is guaranteed to run on objects registered in api.Scheme. An example is when I want to version and convert objects independently of api.Scheme and use printer - such as a configuration object for the cluster My versioning scheme for that object is not the API versioning, but I still want to print the config object using a printer.
> 
> Isn't our normal answer to this to pass a codec into the printer?
> 
The convertor is what would vary, so rather than pass it in I call it up front.  Basically just removing the need for printers to know about versioning or the output version - printers just have to display an object.
> —
> Reply to this email directly or view it on GitHub.
>