mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #79057 from rphillips/fixes/e2e_kubelet_stats_fix
kubelet_stats: fix potential e2e crash dereferencing ContainerStats.CPU
This commit is contained in:
		@@ -599,6 +599,9 @@ func (r *resourceCollector) collectStats(oldStatsMap map[string]*kubeletstatsv1a
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if oldStats, ok := oldStatsMap[name]; ok {
 | 
			
		||||
			if oldStats.CPU == nil || cStats.CPU == nil || oldStats.Memory == nil || cStats.Memory == nil {
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
			if oldStats.CPU.Time.Equal(&cStats.CPU.Time) {
 | 
			
		||||
				// No change -> skip this stat.
 | 
			
		||||
				continue
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user