mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
feature gate LSI capacity calculation
This commit is contained in:
parent
f8c4907bec
commit
3234b0fa5b
@ -540,6 +540,7 @@ func (cm *containerManagerImpl) Start(node *v1.Node,
|
|||||||
// allocatable of the node
|
// allocatable of the node
|
||||||
cm.nodeInfo = node
|
cm.nodeInfo = node
|
||||||
|
|
||||||
|
if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.LocalStorageCapacityIsolation) {
|
||||||
rootfs, err := cm.cadvisorInterface.RootFsInfo()
|
rootfs, err := cm.cadvisorInterface.RootFsInfo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to get rootfs info: %v", err)
|
return fmt.Errorf("failed to get rootfs info: %v", err)
|
||||||
@ -547,6 +548,7 @@ func (cm *containerManagerImpl) Start(node *v1.Node,
|
|||||||
for rName, rCap := range cadvisor.EphemeralStorageCapacityFromFsInfo(rootfs) {
|
for rName, rCap := range cadvisor.EphemeralStorageCapacityFromFsInfo(rootfs) {
|
||||||
cm.capacity[rName] = rCap
|
cm.capacity[rName] = rCap
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure that node allocatable configuration is valid.
|
// Ensure that node allocatable configuration is valid.
|
||||||
if err := cm.validateNodeAllocatable(); err != nil {
|
if err := cm.validateNodeAllocatable(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user