Unverified Commit af6bf1e4 authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #70645 from changyaowei/node_ephemeral-storage

Fix bug: when kubelet restart, the ephemeral-storage in node status upgrade to 0
parents 15556551 3f422d97
......@@ -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
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment