mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
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:
commit
af6bf1e436
@ -270,7 +270,9 @@ func MachineInfo(nodeName string,
|
|||||||
// capacity for every node status request
|
// capacity for every node status request
|
||||||
initialCapacity := capacityFunc()
|
initialCapacity := capacityFunc()
|
||||||
if initialCapacity != nil {
|
if initialCapacity != nil {
|
||||||
node.Status.Capacity[v1.ResourceEphemeralStorage] = initialCapacity[v1.ResourceEphemeralStorage]
|
if v, exists := initialCapacity[v1.ResourceEphemeralStorage]; exists {
|
||||||
|
node.Status.Capacity[v1.ResourceEphemeralStorage] = v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user