Skip to content

Commit

Permalink
add tiproxy advertise-addr
Browse files Browse the repository at this point in the history
  • Loading branch information
djshow832 committed Mar 27, 2024
1 parent ddbbc4d commit b365889
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/playground/instance/tiproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func (c *TiProxy) Start(ctx context.Context, version utils.Version) error {
if err := enc.Encode(spec.MergeConfig(userConfig, map[string]any{
"proxy.pd-addrs": strings.Join(endpoints, ","),
"proxy.addr": utils.JoinHostPort(c.Host, c.Port),
"proxy.advertise-addr": AdvertiseHost(c.Host),
"api.addr": utils.JoinHostPort(c.Host, c.StatusPort),
"log.log-file.filename": c.LogFile(),
})); err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/spec/tiproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func (i *TiProxyInstance) checkConfig(
}
cfg["proxy.pd-addrs"] = strings.Join(pds, ",")
cfg["proxy.addr"] = utils.JoinHostPort(i.GetListenHost(), i.GetPort())
cfg["proxy.advertise-addr"] = spec.Host
cfg["api.addr"] = utils.JoinHostPort(i.GetListenHost(), spec.StatusPort)
cfg["log.log-file.filename"] = filepath.Join(paths.Log, "tiproxy.log")

Expand Down

0 comments on commit b365889

Please sign in to comment.