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

[Features] Topology cannot be automatically synchronized between multiple shards in the clickhouse cluster #8007

Closed
RunningXie opened this issue Aug 20, 2024 · 6 comments

Comments

@RunningXie
Copy link

What is the user interaction of your feature
I deployed my clickhouse cluster by these two helm charts: kubeblocks/clickhouse:0.6.5, kubeblocks/clickhouse-cluster:0.6.5.
I found the cluster topology configuration is stored in these configmaps: {release name}-clickhouse-cluster-shard-{shard number}-clickhouse-tpl for each shard. And each shard is treated as an independent component.
However, if I changed the replica counts of shard 0, the configmap: {release name}-clickhouse-cluster-shard-0-clickhouse-tpl will be updated correctly, but other shards' configmaps will not update. This leads that the topologies of different nodes in one cluster are inconsistent.

If this is a new feature, please describe the motivation and goals.
I found the configSpecs api only can be configed by each component. Since different the topologies of different shards of one cluster should be same. I wonder if there is an API that can use a common configmap for multiple clickhouse shards.

@weicao
Copy link
Contributor

weicao commented Aug 20, 2024

@loomts have a look at this issue.

@loomts
Copy link
Contributor

loomts commented Aug 21, 2024

@RunningXie I don't really know that how you changed the replica count of shard 0, edit the values.yaml of helm charts and helm upgrade(this way is better) Or directly edit the configmap of shard 0?

Anyway, kubeblocks/clickhouse:0.6.5 is no longer maintained, maybe you can use latest release version(v0.9.0) of kubeblocks and kubeblocks-addons, then install the helm charts of clickhouse:v0.9.0.

Under this situation, although configmap will not rerender(maybe will fix it in the future), the cluster topology of each shard will become consistent after change the helm charts.

image

@weicao
Copy link
Contributor

weicao commented Aug 21, 2024

@RunningXie What's your kubeblocks's version?

kbcli version

@weicao
Copy link
Contributor

weicao commented Aug 21, 2024

@RunningXie What's your kubeblocks's version?

kbcli version

I see, it should be kb 0.6.5

@weicao
Copy link
Contributor

weicao commented Aug 21, 2024

With kb 0.6.5, each shard is a distinct component, which means, you should modify each ConfigMap one by one.

From kb v0.8, we introduces the ShardSpec API in Cluster (https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1alpha1.ShardingSpec), with this API, you can modify the replicas in the shard's template, and the change will be reflected to all shards.

However, the clickhouse addon v0.8 and v0.9 havn't use this new API. So you should expect to see it from clickhouse addon v1.0.

@weicao weicao closed this as completed Aug 21, 2024
@github-actions github-actions bot added this to the Release 0.9.2 milestone Aug 21, 2024
@weicao
Copy link
Contributor

weicao commented Aug 21, 2024

BTW, you can upgrade to kubeblocks v0.9, and modify the clickhouse addon using the ShardSpec API to archive this.

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

No branches or pull requests

4 participants