Skip to content

Commit 4f46df8

Browse files
authored
feat: improve ck sharding restore (pick #2339) (#2357)
Co-authored-by: loomts <loomts@users.noreply.github.com>
1 parent 4dd61d9 commit 4f46df8

35 files changed

+1366
-1124
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ examples/ @ahjing99 @shanshanying @leon-inf @apecloud/kb-reviewers @apecloud/kb-
1010
addons/apecloud-mysql/ @xuriwuyun @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
1111
addons-cluster/apecloud-mysql/ @xuriwuyun @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
1212

13-
addons/clickhouse/ @sophon-zt @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
14-
addons-cluster/clickhouse/ @sophon-zt @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
13+
addons/clickhouse/ @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
14+
addons-cluster/clickhouse/ @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
1515

1616
addons/elasticsearch/ @iziang @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
1717
addons-cluster/elasticsearch/ @iziang @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
@@ -112,8 +112,8 @@ addons-cluster/tidb/ @csuzhangxc @cjc7373 @leon-inf @apecloud/kb-reviewers @apec
112112
addons/vanilla-postgresql/ @kizuna-lek @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
113113
addons-cluster/vanilla-postgresql/ @kizuna-lek @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
114114

115-
addons/victoria-metrics/ @sophon-zt @ButterBright @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
116-
addons-cluster/victoria-metrics/ @sophon-zt @ButterBright @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
115+
addons/victoria-metrics/ @ButterBright @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
116+
addons-cluster/victoria-metrics/ @ButterBright @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
117117

118118
addons/weaviate/ @iziang @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
119119
addons-cluster/weaviate/ @iziang @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ KubeBlocks add-ons.
88
| ---- | ---- | ----------- | ----------- |
99
| apecloud-mysql | apecloud-mysql-8.0.30<br>wescale-0.2.7 | ApeCloud MySQL is a database that is compatible with MySQL syntax and achieves high availability through the utilization of the RAFT consensus protocol. | xuriwuyun |
1010
| apecloud-postgresql | | ApeCloud PostgreSQL is a database that is compatible with PostgreSQL syntax and achieves high availability through the utilization of the RAFT consensus protocol. | ldming |
11-
| clickhouse | clickhouse-22.3.18<br>clickhouse-22.3.20<br>clickhouse-22.8.21<br>clickhouse-24.8.3<br>clickhouse-25.4.4 | ClickHouse is an open-source column-oriented OLAP database management system. Use it to boost your database performance while providing linear scalability and hardware efficiency. | sophon-zt |
11+
| clickhouse | clickhouse-22.3.18<br>clickhouse-22.3.20<br>clickhouse-22.8.21<br>clickhouse-24.8.3<br>clickhouse-25.4.4<br>clickhouse-25.9.7 | ClickHouse is an open-source column-oriented OLAP database management system. Use it to boost your database performance while providing linear scalability and hardware efficiency. | ApeCloud |
1212
| elasticsearch | elasticsearch-6.8.23<br>elasticsearch-7.10.1<br>elasticsearch-7.10.2<br>elasticsearch-7.7.1<br>elasticsearch-7.8.1<br>elasticsearch-8.1.3<br>elasticsearch-8.15.5<br>elasticsearch-8.8.2<br>kibana-6.8.23<br>kibana-7.10.1<br>kibana-7.10.2<br>kibana-7.7.1<br>kibana-7.8.1<br>kibana-8.1.3<br>kibana-8.15.5<br>kibana-8.8.2<br>kibana-8.9.1 | Elasticsearch is a distributed, RESTful search engine optimized for speed and relevance on production-scale workloads. | iziang vipshop |
1313
| etcd | etcd-3.5.15<br>etcd-3.5.6<br>etcd-3.6.1 | Etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines. | ApeCloud |
1414
| greptimedb | greptimedb-0.3.2 | An open-source, cloud-native, distributed time-series database with PromQL/SQL/Python supported. | GreptimeTeam sh2 |
@@ -41,7 +41,7 @@ KubeBlocks add-ons.
4141
| tdengine | tdengine-3.3.6-9 | TDengine is an open source, high-performance, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, Industrial IoT and DevOps. | leon-inf |
4242
| tidb | tidb-6.5.12<br>tidb-7.1.5<br>tidb-7.5.2<br>tidb-8.4.0<br>tidb-pd-6.5.12<br>tidb-pd-7.1.5<br>tidb-pd-7.5.2<br>tidb-pd-8.4.0<br>tikv-6.5.12<br>tikv-7.1.5<br>tikv-7.5.2<br>tikv-8.4.0 | TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. | csuzhangxc cjc7373 |
4343
| vanilla-postgresql | supabase-15.6.1-138<br>anilla-postgresql-12.15.0<br>anilla-postgresql-14.7.0<br>anilla-postgresql-15.7.0 | Vanilla-PostgreSQL is compatible with the native PostgreSQL kernel, enabling it to quickly provide HA solutions for various variants based on the native PostgreSQL kernel. | kizuna-lek |
44-
| victoria-metrics | ictoria-metrics-1.0.0 | VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database. | sophon-zt ButterBright |
44+
| victoria-metrics | ictoria-metrics-1.0.0 | VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database. | ApeCloud ButterBright |
4545
| weaviate | weaviate-1.19.6 | Weaviate is an open-source vector database. It allows you to store data objects and vector embeddings from your favorite ML-models, and scale seamlessly into billions of data objects. | iziang |
4646
| xinference | xinference-0.11.0<br>xinference-0.11.0-cpu<br>xinference-1.13.0<br>xinference-1.13.0-cpu | Xorbits Inference(Xinference) is a powerful and versatile library designed to serve language, speech recognition, and multimodal models. | ApeCloud |
4747
| yashandb | yashandb-23.1.1-100 | YashanDB is a new database system completely independently designed and developed by SICS. Based on classical database theories, it incorporates original Bounded Evaluation theory, Approximation theory, Parallel Scalability theory and Cross-Modal Fusion Computation theory, supports multiple deployment methods such as stand-alone/primary-standby, shared cluster, and distributed ones, covers OLTP/HTAP/OLAP transactions and analyzes mixed load scenarios, and is fully compatible with privatization and cloud infrastructure, providing clients with one-stop enterprise-level converged data management solutions to meet the needs of key industries such as finance, government, telecommunications and energy for high performance, concurrency and security. | JesseAtSZ shanshanying |

addons-cluster/clickhouse/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type: application
66

77
version: 1.0.2
88

9-
appVersion: 25.4.4
9+
appVersion: 25.9.7
1010

1111
dependencies:
1212
- name: kblib

addons-cluster/clickhouse/templates/_helpers.tpl

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -87,34 +87,6 @@ issuer:
8787
{{- end }}
8888
{{- end }}
8989

90-
{{/*
91-
Define clickhouse componentSpec with ComponentDefinition.
92-
*/}}
93-
{{- define "clickhouse-component" -}}
94-
- name: clickhouse
95-
componentDef: {{ include "clickhouse-cluster.cmpdName" . }}
96-
replicas: {{ $.Values.replicas | default 2 }}
97-
disableExporter: {{ $.Values.disableExporter | default "false" }}
98-
serviceVersion: {{ $.Values.version }}
99-
services:
100-
- name: default
101-
serviceType: {{ .Values.service.type | default "NodePort" }}
102-
systemAccounts:
103-
- name: admin
104-
passwordConfig:
105-
length: 10
106-
numDigits: 5
107-
numSymbols: 0
108-
letterCase: MixedCases
109-
seed: {{ include "kblib.clusterName" . }}
110-
{{- with $.Values.tolerations }}
111-
tolerations: {{ .| toYaml | nindent 4 }}
112-
{{- end }}
113-
{{- include "kblib.componentResources" . | indent 2 }}
114-
{{- include "kblib.componentStorages" . | indent 2 }}
115-
{{- include "clickhouse-cluster.tls" . | indent 2 }}
116-
{{- end }}
117-
11890
{{/*
11991
Define clickhouse keeper componentSpec with ComponentDefinition.
12092
*/}}
@@ -191,33 +163,4 @@ Define clickhouse shardingComponentSpec with ComponentDefinition.
191163
{{- include "kblib.componentResources" . | indent 4 }}
192164
{{- include "kblib.componentStorages" . | indent 4 }}
193165
{{- include "clickhouse-cluster.tls" . | indent 4 }}
194-
{{- end }}
195-
196-
{{/*
197-
Define clickhouse componentSpec with compatible ComponentDefinition API
198-
*/}}
199-
{{- define "clickhouse-nosharding-component" -}}
200-
{{- range $i := until (.Values.shards | int) }}
201-
{{- $name := printf "clickhouse-%d" $i }}
202-
{{- if eq $i 0 }}
203-
{{- $name = "clickhouse" }}
204-
{{- end}}
205-
- name: {{ $name }}
206-
env:
207-
- name: "INIT_CLUSTER_NAME"
208-
value: "{{ .Values.clickhouse.initClusterName }}"
209-
componentDef: {{ include "clickhouse-cluster.cmpdName" . }}
210-
replicas: {{ $.Values.replicas | default 2 }}
211-
disableExporter: {{ $.Values.disableExporter | default "false" }}
212-
serviceVersion: {{ $.Values.version }}
213-
{{- with $.Values.tolerations }}
214-
tolerations: {{ .| toYaml | nindent 4 }}
215-
services:
216-
- name: default
217-
serviceType: {{ .Values.service.type | default "NodePort" }}
218-
{{- end }}
219-
{{- include "kblib.componentResources" $ | indent 2 }}
220-
{{- include "kblib.componentStorages" $ | indent 2 }}
221-
{{- include "clickhouse-cluster.tls" $ | indent 2 }}
222-
{{- end }}
223166
{{- end }}

addons-cluster/clickhouse/templates/cluster.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,5 @@
55
{{- if eq .Values.mode "cluster" }}
66
{{- include "clickhouse-keeper-component" . | nindent 4 }}
77
{{- end }}
8-
{{- if not .Values.sharding }}
9-
{{- include "clickhouse-nosharding-component" . | nindent 4 }}
10-
{{- else }}
118
shardings:
12-
{{- include "clickhouse-sharding-component" . | nindent 4 }}
13-
{{- end }}
9+
{{- include "clickhouse-sharding-component" . | nindent 4 }}

addons-cluster/clickhouse/values.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ nameOverride: ""
44
fullnameOverride: ""
55

66
## Clickhouse cluster version
7-
version: 24.8.3
7+
version: 25.9.7
88

99
## ClickHouse cluster topology mode defined in ClusterDefinition.Spec.topologies, support standalone and cluster
1010
## - `standalone`: single clickhouse instance
1111
## - `cluster`: clickhouse with ClickHouse Keeper as coordinator
1212
mode: cluster
1313

1414
## Sharding configuration
15-
shards: 1
16-
sharding: true
15+
shards: 2
1716

1817
## Number of ClickHouse replicas per shard to deploy
1918
replicas: 2

addons/clickhouse/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type: application
88

99
version: 1.0.2
1010

11-
appVersion: 25.4.4
11+
appVersion: 25.9.7
1212

1313
home: https://clickhouse.com/
1414
icon: https://bitnami.com/assets/stacks/clickhouse/img/clickhouse-stack-220x234.png
@@ -17,8 +17,8 @@ keywords:
1717
- sharding
1818

1919
maintainers:
20-
- name: sophon-zt
21-
url: https://github.com/apecloud/kubeblocks/
20+
- name: ApeCloud
21+
url: https://kubeblocks.io/
2222

2323
dependencies:
2424
- name: kblib

0 commit comments

Comments
 (0)