Merge pull request #70645 from changyaowei/node_ephemeral-storage

Fix bug: when kubelet restart, the ephemeral-storage in node status upgrade to 0
This commit is contained in:
k8s-ci-robot
2018-11-29 21:44:53 -08:00
committed by GitHub

View File

@@ -270,7 +270,9 @@ func MachineInfo(nodeName string,
// capacity for every node status request
initialCapacity := capacityFunc()
if initialCapacity != nil {
node.Status.Capacity[v1.ResourceEphemeralStorage] = initialCapacity[v1.ResourceEphemeralStorage]
if v, exists := initialCapacity[v1.ResourceEphemeralStorage]; exists {
node.Status.Capacity[v1.ResourceEphemeralStorage] = v
}
}
}