Merge pull request #90314 from tangcong/fix-kubelet-staticcheck-err

fix kubelet stats staticcheck error
This commit is contained in:
Kubernetes Prow Robot
2020-04-21 20:56:05 -07:00
committed by GitHub

View File

@@ -700,6 +700,7 @@ func (p *criStatsProvider) cleanupOutdatedCaches() {
for k, v := range p.cpuUsageCache {
if v == nil {
delete(p.cpuUsageCache, k)
continue
}
if time.Since(time.Unix(0, v.stats.Timestamp)) > defaultCachePeriod {