From 5af547aa70963c799d1ad93028b46f4e1766e8d5 Mon Sep 17 00:00:00 2001 From: Joao Morais Date: Thu, 6 Jun 2024 18:34:22 -0300 Subject: [PATCH] change default master-worker config to true Master worker mode has a better process handling, more config key options, and should be the option if the user doesn't have a reason to choose the standalone daemon. --- docs/content/en/docs/configuration/command-line.md | 7 ++++--- pkg/controller/config/options.go | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/content/en/docs/configuration/command-line.md b/docs/content/en/docs/configuration/command-line.md index 6012616e..ae4897ae 100644 --- a/docs/content/en/docs/configuration/command-line.md +++ b/docs/content/en/docs/configuration/command-line.md @@ -360,9 +360,10 @@ Since v0.14 Defines if haproxy should be configured in master-worker mode. If `false`, one single process is forked in the background. If `true`, a master process is started in the foreground and can -be used to manage current and old worker processes. The default value is `false`, which -preserves historical behavior of HAProxy Ingress. External HAProxy deployment needs -master-worker mode and will enforce `--master-worker` as `true` if configured. +be used to manage current and old worker processes. The default value is `false` in v0.14, which +preserves historical behavior of HAProxy Ingress. v0.15 and newer defaults to `true` if not +declared. External HAProxy deployment needs master-worker mode and will enforce +`--master-worker` as `true` if configured. --- diff --git a/pkg/controller/config/options.go b/pkg/controller/config/options.go index d706b257..c07d4e19 100644 --- a/pkg/controller/config/options.go +++ b/pkg/controller/config/options.go @@ -14,6 +14,7 @@ func NewOptions() *Options { IngressClass: "haproxy", ReloadStrategy: "reusesocket", WatchGateway: true, + MasterWorker: true, AcmeCheckPeriod: 24 * time.Hour, AcmeFailInitialDuration: 5 * time.Minute, AcmeFailMaxDuration: 8 * time.Hour,