diff --git a/deploy/tests/tnr/routeacl/suite_test.go b/deploy/tests/tnr/routeacl/suite_test.go index cd8231a6..3d0ab7cf 100644 --- a/deploy/tests/tnr/routeacl/suite_test.go +++ b/deploy/tests/tnr/routeacl/suite_test.go @@ -62,7 +62,6 @@ func (suite *UseBackendSuite) BeforeTest(suiteName, testName string) { suite.T().Logf("temporary configuration dir %s", suite.test.TempDir) } -//nolint:dupword var haproxyConfig = `global daemon master-worker @@ -75,25 +74,21 @@ peers localinstance frontend https mode http -bind 127.0.0.1:8080 name v4 http-request set-var(txn.base) base use_backend %[var(txn.path_match),field(1,.)] frontend http mode http -bind 127.0.0.1:4443 name v4 http-request set-var(txn.base) base use_backend %[var(txn.path_match),field(1,.)] frontend healthz -bind 127.0.0.1:1042 name v4 mode http monitor-uri /healthz option dontlog-normal frontend stats mode http - bind *:1024 name stats stats enable stats uri / stats refresh 10s diff --git a/fs/usr/local/etc/haproxy/haproxy.cfg b/fs/usr/local/etc/haproxy/haproxy.cfg index c2fd2ff4..0af2c93a 100644 --- a/fs/usr/local/etc/haproxy/haproxy.cfg +++ b/fs/usr/local/etc/haproxy/haproxy.cfg @@ -27,25 +27,21 @@ peers localinstance frontend https mode http - bind 127.0.0.1:8080 name v4 http-request set-var(txn.base) base use_backend %[var(txn.path_match),field(1,.)] frontend http mode http - bind 127.0.0.1:4443 name v4 http-request set-var(txn.base) base use_backend %[var(txn.path_match),field(1,.)] frontend healthz - bind 127.0.0.1:1042 name v4 mode http monitor-uri /healthz option dontlog-normal frontend stats mode http - bind *:1024 name stats http-request set-var(txn.base) base http-request use-service prometheus-exporter if { path /metrics } stats enable diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 82add6fb..e6d7a774 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -195,7 +195,7 @@ func (c *HAProxyController) updateHAProxy() { func (c *HAProxyController) setToReady() { healthzPort := c.osArgs.HealthzBindPort logger.Panic(c.clientAPIClosure(func() error { - return c.haproxy.FrontendBindEdit("healthz", + return c.haproxy.FrontendBindCreate("healthz", models.Bind{ BindParams: models.BindParams{ Name: "v4", @@ -228,7 +228,7 @@ func (c *HAProxyController) setToReady() { })) logger.Panic(c.clientAPIClosure(func() error { - return c.haproxy.FrontendBindEdit("stats", + return c.haproxy.FrontendBindCreate("stats", models.Bind{ BindParams: models.BindParams{ Name: "stats",