From c63f4635a4653c280dd7ae9f7d20fa286cb44e22 Mon Sep 17 00:00:00 2001 From: Rohit Jnagal Date: Mon, 2 Mar 2015 19:51:30 +0000 Subject: [PATCH] Add capacity information to 'kubectl describe minion' --- pkg/kubectl/describe.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index e07663adfa7..1dc4b4e37b7 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -323,6 +323,12 @@ func (d *MinionDescriber) Describe(namespace, name string) (string, error) { c.Message) } } + if len(minion.Spec.Capacity) > 0 { + fmt.Fprintf(out, "Capacity:\n") + for resource, value := range minion.Spec.Capacity { + fmt.Fprintf(out, " %s:\t%s\n", resource, value.String()) + } + } fmt.Fprintf(out, "Pods:\t(%d in total)\n", len(pods)) for _, pod := range pods { if pod.Status.Host != name {