mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
Add Allocatable to NodeStatus
Adds `Allocatable` to `NodeStatus`, as described in [17201](https://github.com/kubernetes/kubernetes/pull/17201)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user