Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ConsulRawClient of cluster-mode-repository-consul to be configured on ports other than 8500 #29419

Closed
linghengqian opened this issue Dec 15, 2023 · 0 comments · Fixed by #29621

Comments

@linghengqian
Copy link
Member

Feature Request

For English only, other languages will not be accepted.

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Is your feature request related to a problem?

Describe the feature you would like.

ConsulRawClient rawClient = Strings.isNullOrEmpty(config.getServerLists()) ? new ConsulRawClient() : new ConsulRawClient(config.getServerLists());
  • If we configure the following configuration in the shardingsphere configuration file, this will resolve to localhost:62391:8500. This section lacks corresponding unit tests.
mode:
  type: Cluster
  repository:
    type: Consul
    props:
      namespace: governance
      server-lists: localhost:62391
  • This should parse server-lists and switch from calling ConsulRawClient(String agentHost) to calling ConsulRawClient(String agentHost, int agentPort).

  • It is reasonable behavior to allow ConsulRawClient of cluster-mode-repository-consul to be configured on ports other than 8500.

  • Also, I looked at com.ecwid.consul.v1.ConsulRawClient, and server-lists is a weird word in a consul client context, since it's actually only possible to connect to a consul instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant