From f0e47fe8ed9d7a8d537ff998270dbb0a50374e90 Mon Sep 17 00:00:00 2001 From: cxfcxf Date: Wed, 7 Aug 2024 14:19:43 -0700 Subject: [PATCH] MINOR: support thread pin on stats --- pkg/controller/controller.go | 3 ++- pkg/utils/flags.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 96439b35..cf980431 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -249,7 +249,8 @@ func (c *HAProxyController) setToReady() { return c.haproxy.FrontendBindCreate("stats", models.Bind{ BindParams: models.BindParams{ - Name: "stats", + Name: "stats", + Thread: c.osArgs.StatsBindThread, }, Address: fmt.Sprintf("*:%d", c.osArgs.StatsBindPort), }, diff --git a/pkg/utils/flags.go b/pkg/utils/flags.go index 7e71370b..830af049 100644 --- a/pkg/utils/flags.go +++ b/pkg/utils/flags.go @@ -87,6 +87,7 @@ type OSArgs struct { Help []bool `short:"h" long:"help" description:"show this help message"` LocalPeerPort int64 `long:"localpeer-port" default:"10000" description:"port to listen on for local peer"` StatsBindPort int64 `long:"stats-bind-port" default:"1024" description:"port to listen on for stats page"` + StatsBindThread string `long:"stats-bind-thread" description:"default stats service bind thread params eg: 1-1" default:""` DefaultBackendPort int `long:"default-backend-port" description:"port to use for default service" default:"6061"` ChannelSize int64 `long:"channel-size" description:"sets the size of controller buffers used to receive and send k8s events.NOTE: increase the value to accommodate large number of resources "` ControllerPort int `long:"controller-port" description:"port to listen on for controller data: prometheus, pprof" default:"6060"`