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
commit 168686a0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {