Skip to content

Commit 909bdd7

Browse files
odoucetoktalz
authored andcommitted
MINOR: fix info message when global config is updated
Signed-off-by: Olivier Doucet <[email protected]>
1 parent bd2a662 commit 909bdd7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/controller/global.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ func (c *HAProxyController) globalCfg() {
4747
var newGlobal, global *models.Global
4848
var newLg models.LogTargets
4949
var err error
50-
var updated []string
5150
global, err = c.haproxy.GlobalGetConfiguration()
5251
if err != nil {
5352
logger.Error(err)
@@ -91,13 +90,12 @@ func (c *HAProxyController) globalCfg() {
9190
diff := newGlobal.Diff(*global)
9291
if len(diff) != 0 {
9392
logger.Error(c.haproxy.GlobalPushConfiguration(*newGlobal))
94-
instance.Restart("Global config updated: %s", strings.Join(updated, "\n"))
93+
instance.Restart("Global config updated: %v", diff)
9594
}
9695
diff = newLg.Diff(lg)
97-
// updated = deep.Equal(newLg, lg)
9896
if len(diff) != 0 {
9997
logger.Error(c.haproxy.GlobalPushLogTargets(newLg))
100-
instance.Restart("Global log targets updated: %s", strings.Join(updated, "\n"))
98+
instance.Restart("Global log targets updated: %v", diff)
10199
}
102100
c.globalCfgSnipp()
103101
}

0 commit comments

Comments
 (0)