feature gate LSI capacity calculation
This commit is contained in:
		@@ -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 {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user