Accessible build logs

Adding option to retrieve logs form a build.
Usage:
        `kube buildLogs --id="buildID"`


----- Original Message -----
> > @@ -473,6 +478,27 @@ func (c *KubeConfig) executeControllerRequest(method
> > string, client *kubeclient.
> >  	return true
> >  }
> >  
> > +// executeBuildLogRequest retrieves the logs from builder container
> > +func (c *KubeConfig) executeBuildLogRequest(method, masterServer string)
> > bool {
> > +	if method != "buildLogs" {
> > +		return false
> > +	}
> > +	if len(c.ID) == 0 {
> > +		glog.Fatal("Need build ID")
> > +	}
> > +	path :=
> > fmt.Sprintf("%s/osapi/v1beta1/redirect/buildLogs/%s",masterServer, c.ID)
> 
> @smarterclayton implementing the redirect method is doable, but not using the
> client if retrieving logs shall be streamed. The problem is that I cannot
> use the client for streaming, cause I need from the Request struct the
> io.Reader before I send the request, which is private, thus cannot be
> retrieved.
> So there are two options:
> 
> 1.  Modify this in the upstream, by adding something like DoStream method, or
> making finalURL() public, or making Request struct params public.

We should make Stream() (io.Reader, error) be an upstream method on request - we can carry a patch in our branch until the next rebase.

> 2.  Use the client as suggested, but the logs could not be stream, just
> snapshoted.
> 
> Thoughts ?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/openshift/origin/pull/136/files#r17972091