mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-22 02:18:51 +00:00
Fix data race in node lifecycle controller
This commit is contained in:
@@ -1042,6 +1042,8 @@ func (nc *Controller) ReducedQPSFunc(nodeNum int) float32 {
|
||||
|
||||
// addPodEvictorForNewZone checks if new zone appeared, and if so add new evictor.
|
||||
func (nc *Controller) addPodEvictorForNewZone(node *v1.Node) {
|
||||
nc.evictorLock.Lock()
|
||||
defer nc.evictorLock.Unlock()
|
||||
zone := utilnode.GetZoneKey(node)
|
||||
if _, found := nc.zoneStates[zone]; !found {
|
||||
nc.zoneStates[zone] = stateInitial
|
||||
|
Reference in New Issue
Block a user