Skip to content

Commit b34f5bc

Browse files
hdurand0710oktalz
authored andcommitted
BUG/MEDIUM: fix periodic reload due to wrong log target changes in Global CR
We were comparing the previous Global without the log target children with a new Global with the log target children, which always resulted in a diff and a reload if the new one had log targets.
1 parent 09a2785 commit b34f5bc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkg/controller/global.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func (c *HAProxyController) globalCfg() {
5858
logger.Error(errL)
5959
return
6060
}
61+
global.LogTargetList = lg
6162
newGlobal, err = annotations.ModelGlobal("cr-global", c.podNamespace, c.store, c.store.ConfigMaps.Main.Annotations)
6263
if err != nil {
6364
logger.Errorf("Global config: %s", err)
@@ -80,6 +81,7 @@ func (c *HAProxyController) globalCfg() {
8081
if newGlobal.TuneSslOptions == nil {
8182
newGlobal.TuneSslOptions = &models.TuneSslOptions{}
8283
}
84+
newGlobal.LogTargetList = newLg
8385

8486
env.SetGlobal(newGlobal, &newLg, c.haproxy.Env)
8587
diff := newGlobal.Diff(*global)

0 commit comments

Comments
 (0)