mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 18:14:24 +02:00
removing inner goroutine in cluster.Switchover and resolve race between processPodEvent and unregisterPodSubscriber
This commit is contained in:
@@ -451,17 +451,18 @@ func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) {
|
||||
panic("could not acquire initial list of clusters")
|
||||
}
|
||||
|
||||
wg.Add(5)
|
||||
wg.Add(5 + util.Bool2Int(c.opConfig.EnablePostgresTeamCRD))
|
||||
go c.runPodInformer(stopCh, wg)
|
||||
go c.runPostgresqlInformer(stopCh, wg)
|
||||
go c.clusterResync(stopCh, wg)
|
||||
go c.apiserver.Run(stopCh, wg)
|
||||
go c.kubeNodesInformer(stopCh, wg)
|
||||
|
||||
if c.opConfig.EnablePostgresTeamCRD {
|
||||
go c.runPostgresTeamInformer(stopCh, wg)
|
||||
}
|
||||
|
||||
go c.apiserver.Run(stopCh, wg)
|
||||
|
||||
c.logger.Info("started working in background")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user