Get root container stats from cAdvisor

I changed the GetContainerStats function, which will return the root container's stats if the container name is empty. This is useful when the master wants to know machine wide information. e.g. total memory usage of a certain node.
> /stats/container

Please don't do this, I spent half of yesterday making the containerInfo be
pod focused instead of container focused. Let's not make the same mistake
with stats.


On Wed, Jul 2, 2014 at 10:48 AM, brendandburns <notifications@github.com>
wrote:

> In pkg/kubelet/kubelet.go:
>
> > @@ -790,17 +790,23 @@ func (kl *Kubelet) GetContainerInfo(name string) (string, error) {
> >  	return string(data), err
> >  }
> >
> > -//Returns stats (from Cadvisor) for a container
> > +// Returns stats (from Cadvisor) for a container. If name is empty, then it
> > +// returns the root container's stats.
> >  func (kl *Kubelet) GetContainerStats(name string) (*api.ContainerStats, error) {
>
> I think you could either have:
> /stats/container
> /stats/root
> or
> /containerInfo
> /rootInfo
>
> your call.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/328/files#r14472025>
> .
>