Skip to content

Commit

Permalink
fix: ConfigStore duplicate lead to aeraki unable to get istiod connec…
Browse files Browse the repository at this point in the history
…tion status update (#408)

Signed-off-by: shenyixiong <shenyixiong@huawei.com>

Co-authored-by: shenyixiong <shenyixiong@huawei.com>
  • Loading branch information
shencurl521 and shenyixiong authored Feb 17, 2024
1 parent 09e181d commit 37e78e5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/controller/istio/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,14 @@ func (c *Controller) connectIstio() {
time.Sleep(5 * time.Second)
continue
}
configController := memory.NewController(c.Store)
c.xdsMCP.Store = configController

if c.configCache == nil {
controllerLog.Warn("configCache is nil")
c.xdsMCP.Store = memory.NewController(c.Store)
} else {
c.xdsMCP.Store = c.configCache
}

if err = c.xdsMCP.Run(); err != nil {
controllerLog.Errorf("adsc: failed running %v", err)
c.closeConnection()
Expand Down

0 comments on commit 37e78e5

Please sign in to comment.