Skip to content

Commit

Permalink
MINOR: Run Global Cfg handler before haproxy startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mo3m3n committed Nov 30, 2021
1 parent 6296639 commit bcebb14
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions controller/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func (c *HAProxyController) initHandlers() {

func (c *HAProxyController) startupHandlers() error {
handlers := []UpdateHandler{
handler.GlobalCfg{},
handler.HTTPBind{
HTTP: !c.OSArgs.DisableHTTP,
HTTPS: !c.OSArgs.DisableHTTPS,
Expand All @@ -71,9 +72,6 @@ func (c *HAProxyController) startupHandlers() error {
IPv4Addr: c.OSArgs.IPV4BindAddr,
IPv6Addr: c.OSArgs.IPV6BindAddr,
}}
if c.OSArgs.External {
handlers = append(handlers, handler.GlobalCfg{})
}
for _, handler := range handlers {
_, err := handler.Update(c.Store, &c.Cfg, c.Client)
if err != nil {
Expand Down

0 comments on commit bcebb14

Please sign in to comment.