Commit 3234b0fa authored by Seth Jennings's avatar Seth Jennings

feature gate LSI capacity calculation

parent f8c4907b
...@@ -540,12 +540,14 @@ func (cm *containerManagerImpl) Start(node *v1.Node, ...@@ -540,12 +540,14 @@ func (cm *containerManagerImpl) Start(node *v1.Node,
// allocatable of the node // allocatable of the node
cm.nodeInfo = node cm.nodeInfo = node
rootfs, err := cm.cadvisorInterface.RootFsInfo() if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.LocalStorageCapacityIsolation) {
if err != nil { rootfs, err := cm.cadvisorInterface.RootFsInfo()
return fmt.Errorf("failed to get rootfs info: %v", err) if err != nil {
} return fmt.Errorf("failed to get rootfs info: %v", err)
for rName, rCap := range cadvisor.EphemeralStorageCapacityFromFsInfo(rootfs) { }
cm.capacity[rName] = rCap for rName, rCap := range cadvisor.EphemeralStorageCapacityFromFsInfo(rootfs) {
cm.capacity[rName] = rCap
}
} }
// Ensure that node allocatable configuration is valid. // Ensure that node allocatable configuration is valid.
......
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