mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #90314 from tangcong/fix-kubelet-staticcheck-err
fix kubelet stats staticcheck error
This commit is contained in:
commit
168686a0ab
@ -700,6 +700,7 @@ func (p *criStatsProvider) cleanupOutdatedCaches() {
|
|||||||
for k, v := range p.cpuUsageCache {
|
for k, v := range p.cpuUsageCache {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
delete(p.cpuUsageCache, k)
|
delete(p.cpuUsageCache, k)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if time.Since(time.Unix(0, v.stats.Timestamp)) > defaultCachePeriod {
|
if time.Since(time.Unix(0, v.stats.Timestamp)) > defaultCachePeriod {
|
||||||
|
Loading…
Reference in New Issue
Block a user