Add capacity information to 'kubectl describe minion'

pull/6/head
Rohit Jnagal 2015-03-02 19:51:30 +00:00
parent 4ef76aba5a
commit c63f4635a4
1 changed files with 6 additions and 0 deletions

View File

@ -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 {