mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
fix kubelet stats staticcheck error
This commit is contained in:
parent
8b0a7dea1d
commit
2b984b3e3a
@ -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