Add Allocatable to NodeStatus

Adds `Allocatable` to `NodeStatus`, as described in
[17201](https://github.com/kubernetes/kubernetes/pull/17201)
This commit is contained in:
Tim St. Clair
2015-12-14 18:01:30 -08:00
parent 7069a81116
commit 8fdd321dc1
13 changed files with 15653 additions and 15405 deletions

View File

@@ -1007,6 +1007,18 @@ func deepCopy_api_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Clone
} else {
out.Capacity = nil
}
if in.Allocatable != nil {
out.Allocatable = make(ResourceList)
for key, val := range in.Allocatable {
newVal := new(resource.Quantity)
if err := deepCopy_resource_Quantity(val, newVal, c); err != nil {
return err
}
out.Allocatable[key] = *newVal
}
} else {
out.Allocatable = nil
}
out.Phase = in.Phase
if in.Conditions != nil {
out.Conditions = make([]NodeCondition, len(in.Conditions))