Add support for applying set of resources via kubectl

Discussion: https://github.com/GoogleCloudPlatform/kubernetes/issues/1905
It should.  If we get that in before that simplifies this bit of codeX


> On Nov 3, 2014, at 10:04 PM, bgrant0607 <notifications@github.com> wrote:
> 
> In pkg/config/config.go:
> 
> > +	}
> > +
> > +	return allErrors.Prefix("Config")
> > +}
> > +
> > +// Apply creates the obj using the provided clients and the resource URI
> > +// mapping. It reports ValidationError when the object is missing the Metadata
> > +// or the Name and it will report any error occured during create REST call
> > +func Apply(client *client.RESTClient, mapping *meta.RESTMapping, obj runtime.Object) *errs.ValidationError {
> > +	name, err := mapping.MetadataAccessor.Name(obj)
> > +	if err != nil || name == "" {
> > +		e := errs.NewFieldRequired("name", err)
> > +		return &e
> > +	}
> > +
> > +	request := client.Verb("POST").Path(mapping.Resource).Body(obj)
> Should this be using the RESTHelper from #2000, or at least use a similar approach?
> 
> c.Post().Path(resourcePath).Namespace(namespace).Body(data).Do().Error()
> —
> Reply to this email directly or view it on GitHub.