mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 02:08:13 +00:00 
			
		
		
		
	Merge pull request #102781 from fromanirh/fix-issue102780
cm: handle nil cpumanager avoiding segfault
This commit is contained in:
		| @@ -1073,11 +1073,17 @@ func (cm *containerManagerImpl) GetAllocatableDevices() []*podresourcesapi.Conta | ||||
| } | ||||
|  | ||||
| func (cm *containerManagerImpl) GetCPUs(podUID, containerName string) []int64 { | ||||
| 	return cm.cpuManager.GetCPUs(podUID, containerName).ToSliceNoSortInt64() | ||||
| 	if cm.cpuManager != nil { | ||||
| 		return cm.cpuManager.GetCPUs(podUID, containerName).ToSliceNoSortInt64() | ||||
| 	} | ||||
| 	return []int64{} | ||||
| } | ||||
|  | ||||
| func (cm *containerManagerImpl) GetAllocatableCPUs() []int64 { | ||||
| 	return cm.cpuManager.GetAllocatableCPUs().ToSliceNoSortInt64() | ||||
| 	if cm.cpuManager != nil { | ||||
| 		return cm.cpuManager.GetAllocatableCPUs().ToSliceNoSortInt64() | ||||
| 	} | ||||
| 	return []int64{} | ||||
| } | ||||
|  | ||||
| func (cm *containerManagerImpl) ShouldResetExtendedResourceCapacity() bool { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kubernetes Prow Robot
					Kubernetes Prow Robot