mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
fix: npe when renew hiddenCollectors
Signed-off-by: haoyun <yun.hao@daocloud.io>
This commit is contained in:
parent
011aef1222
commit
1a21a53f7e
@ -274,7 +274,7 @@ func (kr *kubeRegistry) enableHiddenCollectors() {
|
||||
cs = append(cs, c)
|
||||
}
|
||||
|
||||
kr.hiddenCollectors = nil
|
||||
kr.hiddenCollectors = make(map[string]Registerable)
|
||||
kr.hiddenCollectorsLock.Unlock()
|
||||
kr.MustRegister(cs...)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user