diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/kubelet_stats.go b/vendor/k8s.io/kubernetes/test/e2e/framework/kubelet_stats.go index 4be8e02121e0..a13ae3d45640 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/kubelet_stats.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/kubelet_stats.go @@ -609,12 +609,12 @@ func (r *resourceCollector) collectStats(oldStatsMap map[string]*stats.Container defer r.lock.Unlock() for _, name := range r.containers { cStats, ok := cStatsMap[name] - if !ok { + if !ok || cStats.CPU == nil { Logf("Missing info/stats for container %q on node %q", name, r.node) return } - if oldStats, ok := oldStatsMap[name]; ok { + if oldStats, ok := oldStatsMap[name]; ok && oldStats.CPU != nil { if oldStats.CPU.Time.Equal(cStats.CPU.Time) { // No change -> skip this stat. continue