Skip to content

Commit

Permalink
cluster: fix tiproxy config and version
Browse files Browse the repository at this point in the history
Signed-off-by: xhe <xw897002528@gmail.com>
  • Loading branch information
xhebox committed Jan 8, 2024
1 parent 1210bc2 commit 100c593
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/cluster/spec/tiproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ func (c *TiProxyComponent) Source() string {
func (c *TiProxyComponent) CalculateVersion(clusterVersion string) string {
// always not follow global version, use ""(latest) by default
version := c.Topology.ComponentVersions.TiProxy
if version == "" {
version = "nightly"
}
return version
}

Expand Down Expand Up @@ -224,7 +227,6 @@ func (i *TiProxyInstance) checkConfig(
pds = append(pds, pdspec.GetAdvertiseClientURL(enableTLS))
}
cfg["proxy.pd-addrs"] = strings.Join(pds, ",")
cfg["proxy.require-backend-tls"] = false
cfg["proxy.addr"] = utils.JoinHostPort(i.GetListenHost(), i.GetPort())
cfg["api.addr"] = utils.JoinHostPort(i.GetListenHost(), spec.StatusPort)
cfg["log.log-file.filename"] = filepath.Join(paths.Log, "tiproxy.log")
Expand Down Expand Up @@ -311,7 +313,7 @@ func (i *TiProxyInstance) setTLSConfig(ctx context.Context, enableTLS bool, conf
}
}

return nil, nil
return configs, nil
}

var _ RollingUpdateInstance = &TiProxyInstance{}
Expand Down

0 comments on commit 100c593

Please sign in to comment.