Skip to content

Commit c3f3756

Browse files
cxfcxfoktalz
authored andcommitted
MINOR: support thread pin on stats
1 parent 98f123b commit c3f3756

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/controller/controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ func (c *HAProxyController) setToReady() {
249249
return c.haproxy.FrontendBindCreate("stats",
250250
models.Bind{
251251
BindParams: models.BindParams{
252-
Name: "stats",
252+
Name: "stats",
253+
Thread: c.osArgs.StatsBindThread,
253254
},
254255
Address: fmt.Sprintf("*:%d", c.osArgs.StatsBindPort),
255256
},

pkg/utils/flags.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ type OSArgs struct {
9191
Help []bool `short:"h" long:"help" description:"show this help message"`
9292
LocalPeerPort int64 `long:"localpeer-port" default:"10000" description:"port to listen on for local peer"`
9393
StatsBindPort int64 `long:"stats-bind-port" default:"1024" description:"port to listen on for stats page"`
94+
StatsBindThread string `long:"stats-bind-thread" description:"default stats service bind thread params eg: 1-1" default:""`
9495
DefaultBackendPort int `long:"default-backend-port" description:"port to use for default service" default:"6061"`
9596
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 "`
9697
ControllerPort int `long:"controller-port" description:"port to listen on for controller data: prometheus, pprof" default:"6060"`

0 commit comments

Comments
 (0)