mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-06 08:05:34 +00:00
fix: npe when renew hiddenCollectors
Signed-off-by: haoyun <yun.hao@daocloud.io>
This commit is contained in:
@@ -274,7 +274,7 @@ func (kr *kubeRegistry) enableHiddenCollectors() {
|
|||||||
cs = append(cs, c)
|
cs = append(cs, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
kr.hiddenCollectors = nil
|
kr.hiddenCollectors = make(map[string]Registerable)
|
||||||
kr.hiddenCollectorsLock.Unlock()
|
kr.hiddenCollectorsLock.Unlock()
|
||||||
kr.MustRegister(cs...)
|
kr.MustRegister(cs...)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user