mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #77656 from yastij/check-cstat-mem
check if Memory is not nil for container stats
This commit is contained in:
		@@ -51,7 +51,7 @@ func cadvisorInfoToCPUandMemoryStats(info *cadvisorapiv2.ContainerInfo) (*statsa
 | 
			
		||||
			cpuStats.UsageCoreNanoSeconds = &cstat.Cpu.Usage.Total
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if info.Spec.HasMemory {
 | 
			
		||||
	if info.Spec.HasMemory && cstat.Memory != nil {
 | 
			
		||||
		pageFaults := cstat.Memory.ContainerData.Pgfault
 | 
			
		||||
		majorPageFaults := cstat.Memory.ContainerData.Pgmajfault
 | 
			
		||||
		memoryStats = &statsapi.MemoryStats{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user