Move Capacity from NodeSpec to NodeStatus

This commit is contained in:
gmarek
2015-03-25 14:44:40 +01:00
parent 8183a4805e
commit 5a11748018
20 changed files with 136 additions and 115 deletions

View File

@@ -393,9 +393,9 @@ func describeNode(node *api.Node, pods []api.Pod, events *api.EventList) (string
addresses = append(addresses, address.Address)
}
fmt.Fprintf(out, "Addresses:\t%s\n", strings.Join(addresses, ","))
if len(node.Spec.Capacity) > 0 {
if len(node.Status.Capacity) > 0 {
fmt.Fprintf(out, "Capacity:\n")
for resource, value := range node.Spec.Capacity {
for resource, value := range node.Status.Capacity {
fmt.Fprintf(out, " %s:\t%s\n", resource, value.String())
}
}