Skip to content

Commit

Permalink
MINOR: support thread pin on stats
Browse files Browse the repository at this point in the history
  • Loading branch information
cxfcxf authored and oktalz committed Sep 2, 2024
1 parent 98f123b commit c3f3756
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
Expand Down
1 change: 1 addition & 0 deletions pkg/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,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"`
Expand Down

0 comments on commit c3f3756

Please sign in to comment.