diff --git a/README.md b/README.md
index bbd49a0d4..6c99907b9 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ KubeBlocks add-ons.
| ---- | ---- | ----------- | ----------- |
| apecloud-mysql | apecloud-mysql-8.0.30
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 |
| apecloud-postgresql | apecloud-postgresql-14.11.0 | ApeCloud PostgreSQL is a database that is compatible with PostgreSQL syntax and achieves high availability through the utilization of the RAFT consensus protocol. | ldming |
-| clickhouse | clickhouse-24.8.3 | 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 |
+| clickhouse | clickhouse-22.9.4
clickhouse-24.8.3 | 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 |
| elasticsearch | elasticsearch-7.10.1
elasticsearch-7.7.1
elasticsearch-7.8.1
elasticsearch-8.1.3
elasticsearch-8.8.2 | Elasticsearch is a distributed, RESTful search engine optimized for speed and relevance on production-scale workloads. | iziang |
| etcd | etcd-3.5.15
etcd-3.5.6 | 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. | free6om |
| greptimedb | greptimedb-0.3.2 | An open-source, cloud-native, distributed time-series database with PromQL/SQL/Python supported. | GreptimeTeam sh2 |
diff --git a/addons-cluster/clickhouse/templates/_helpers.tpl b/addons-cluster/clickhouse/templates/_helpers.tpl
index c6a53d507..eed1c9e8c 100644
--- a/addons-cluster/clickhouse/templates/_helpers.tpl
+++ b/addons-cluster/clickhouse/templates/_helpers.tpl
@@ -85,8 +85,9 @@ Define clickhouse componentSpec with ComponentDefinition.
{{- define "clickhouse-component" -}}
- name: clickhouse
componentDef: clickhouse-24
- replicas: {{ $.Values.replicaCount | default 2 }}
+ replicas: {{ $.Values.replicas | default 2 }}
disableExporter: {{ $.Values.disableExporter | default "false" }}
+ serviceVersion: {{ $.Values.version }}
serviceAccountName: {{ include "clickhouse-cluster.serviceAccountName" $ }}
systemAccounts:
- name: admin
@@ -110,8 +111,9 @@ Define clickhouse keeper componentSpec with ComponentDefinition.
{{- define "clickhouse-keeper-component" -}}
- name: ch-keeper
componentDef: clickhouse-keeper-24
- replicas: {{ .Values.keeper.replicaCount }}
+ replicas: {{ .Values.keeper.replicas }}
disableExporter: {{ $.Values.disableExporter | default "false" }}
+ serviceVersion: {{ $.Values.version }}
{{- with .Values.keeper.tolerations }}
tolerations: {{ .| toYaml | nindent 4 }}
{{- end }}
@@ -149,12 +151,13 @@ Define clickhouse shardingComponentSpec with ComponentDefinition.
*/}}
{{- define "clickhouse-sharding-component" -}}
- name: shard
- shards: {{ .Values.shardCount }}
+ shards: {{ .Values.shards }}
template:
name: clickhouse
componentDef: clickhouse-24
- replicas: {{ $.Values.replicaCount | default 2 }}
+ replicas: {{ $.Values.replicas | default 2 }}
disableExporter: {{ $.Values.disableExporter | default "false" }}
+ serviceVersion: {{ $.Values.version }}
serviceAccountName: {{ include "clickhouse-cluster.serviceAccountName" $ }}
systemAccounts:
- name: admin
@@ -176,11 +179,12 @@ Define clickhouse shardingComponentSpec with ComponentDefinition.
Define clickhouse componentSpec with compatible ComponentDefinition API
*/}}
{{- define "clickhouse-nosharding-component" -}}
-{{- range $i := until (.Values.shardCount | int) }}
+{{- range $i := until (.Values.shards | int) }}
- name: shard-{{ $i }}
componentDef: clickhouse-24
- replicas: {{ $.Values.replicaCount | default 2 }}
+ replicas: {{ $.Values.replicas | default 2 }}
disableExporter: {{ $.Values.disableExporter | default "false" }}
+ serviceVersion: {{ $.Values.version }}
serviceAccountName: {{ include "clickhouse-cluster.serviceAccountName" $ }}
{{- with $.Values.tolerations }}
tolerations: {{ .| toYaml | nindent 4 }}
diff --git a/addons-cluster/clickhouse/templates/cluster.yaml b/addons-cluster/clickhouse/templates/cluster.yaml
index cedd9f71a..dc29bca82 100644
--- a/addons-cluster/clickhouse/templates/cluster.yaml
+++ b/addons-cluster/clickhouse/templates/cluster.yaml
@@ -1,5 +1,5 @@
{{- include "kblib.clusterCommon" . }}
-{{- if eq (.Values.shardCount | int) 1 }}
+{{- if eq (.Values.shards | int) 1 }}
clusterDef: clickhouse
topology: {{ .Values.mode }}
{{- end }}
@@ -7,11 +7,11 @@
{{- if eq .Values.mode "cluster" }}
{{- include "clickhouse-keeper-component" . | nindent 4 }}
{{- end }}
- {{- if eq (.Values.shardCount | int) 1 }}
+ {{- if eq (.Values.shards | int) 1 }}
{{- include "clickhouse-component" . | nindent 4 }}
{{- end }}
- {{- if gt (.Values.shardCount | int) 1 }}
- {{- if not .Values.sharding.enabled }}
+ {{- if gt (.Values.shards | int) 1 }}
+ {{- if not .Values.sharding }}
{{- include "clickhouse-nosharding-component" . | nindent 4 }}
{{- else }}
shardings:
diff --git a/addons-cluster/clickhouse/templates/validate.yaml b/addons-cluster/clickhouse/templates/validate.yaml
index 02d078ec8..e102cd765 100644
--- a/addons-cluster/clickhouse/templates/validate.yaml
+++ b/addons-cluster/clickhouse/templates/validate.yaml
@@ -1,5 +1,5 @@
-{{- if .Values.keeper.replicaCount }}
- {{- if ne (mod (int .Values.keeper.replicaCount) 2) 1 }}
- {{ fail "Zookeeper cluster does not support running with even number replicas." }}
+{{- if .Values.keeper.replicas }}
+ {{- if ne (mod (int .Values.keeper.replicas) 2) 1 }}
+ {{ fail "Clickhouse keeper does not support running with even number replicas." }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/addons-cluster/clickhouse/values.schema.json b/addons-cluster/clickhouse/values.schema.json
index 37fec2f07..4d6ca4dc8 100644
--- a/addons-cluster/clickhouse/values.schema.json
+++ b/addons-cluster/clickhouse/values.schema.json
@@ -4,6 +4,12 @@
"title": "ClickHouse Cluster Configuration",
"description": "Configuration schema for the ClickHouse Helm chart.",
"properties": {
+ "version": {
+ "title": "ClickHouse Cluster Version",
+ "description": "Engine Version of the ClickHouse cluster.",
+ "type": "string",
+ "default": "24.8.3"
+ },
"mode": {
"title": "Cluster Topology Mode",
"description": "Define the ClickHouse cluster topology mode.",
@@ -14,7 +20,7 @@
"cluster"
]
},
- "shardCount": {
+ "shards": {
"title": "Shard Count",
"description": "Number of shards in the ClickHouse cluster.",
"type": "integer",
@@ -23,18 +29,11 @@
},
"sharding": {
"title": "Sharding Configuration",
- "description": "Settings related to sharding within the ClickHouse cluster.",
- "type": "object",
- "properties": {
- "enabled": {
- "title": "Sharding Enabled",
- "description": "Enable or disable sharding.",
- "type": "boolean",
- "default": false
- }
- }
+ "description": "Enable or disable sharding within the ClickHouse cluster.",
+ "type": "boolean",
+ "default": true
},
- "replicaCount": {
+ "replicas": {
"title": "Replica Count",
"description": "Number of replicas per shard.",
"type": "integer",
@@ -85,7 +84,7 @@
"description": "Settings for the ClickHouse Keeper (coordinator).",
"type": "object",
"properties": {
- "replicaCount": {
+ "replicas": {
"title": "Keeper Replica Count",
"description": "Number of ClickHouse Keeper replicas.",
"type": "integer",
diff --git a/addons-cluster/clickhouse/values.yaml b/addons-cluster/clickhouse/values.yaml
index ec99716bd..cb84f6f8d 100644
--- a/addons-cluster/clickhouse/values.yaml
+++ b/addons-cluster/clickhouse/values.yaml
@@ -3,18 +3,20 @@ nameOverride: ""
# Override the full name of the chart
fullnameOverride: ""
+## Clickhouse cluster version
+version: 24.8.3
+
## ClickHouse cluster topology mode defined in ClusterDefinition.Spec.topologies, support standalone and cluster
## - `standalone`: single clickhouse instance
## - `cluster`: clickhouse with ClickHouse Keeper as coordinator
mode: cluster
## Sharding configuration
-shardCount: 1
-sharding:
- enabled: false
+shards: 1
+sharding: true
## Number of ClickHouse replicas per shard to deploy
-replicaCount: 2
+replicas: 2
## ClickHouse per shard component configurations
cpu: 1
@@ -36,7 +38,7 @@ tolerations: []
## ClickHouse Keeper configuration
keeper:
## Number of ClickHouse Keeper replicas
- replicaCount: 1
+ replicas: 1
storageClassName: ""
cpu: 1
memory: 2
diff --git a/addons/clickhouse/templates/_helpers.tpl b/addons/clickhouse/templates/_helpers.tpl
index 23c3e1550..b211811c3 100644
--- a/addons/clickhouse/templates/_helpers.tpl
+++ b/addons/clickhouse/templates/_helpers.tpl
@@ -147,5 +147,12 @@ Define clickhouse image repository
Define clickhouse24 image
*/}}
{{- define "clickhouse24.image" -}}
-{{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}
+{{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag.major24 }}
+{{- end }}
+
+{{/*
+Define clickhouse22 image
+*/}}
+{{- define "clickhouse22.image" -}}
+{{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag.major22 }}
{{- end }}
diff --git a/addons/clickhouse/templates/cmpv.yaml b/addons/clickhouse/templates/cmpv.yaml
index b312b83bd..80aaeed60 100644
--- a/addons/clickhouse/templates/cmpv.yaml
+++ b/addons/clickhouse/templates/cmpv.yaml
@@ -10,10 +10,12 @@ spec:
compatibilityRules:
- releases:
- 24.8.3
+ - 22.9.4
compDefs:
- {{ include "clickhouse24.cmpdRegexpPattern" . }}
- releases:
- 24.8.3
+ - 22.9.4
compDefs:
- {{ include "clickhouse-keeper24.cmpdRegexpPattern" . }}
releases:
@@ -21,3 +23,7 @@ spec:
serviceVersion: 24.8.3
images:
clickhouse: {{ include "clickhouse.repository" . }}:24.8.3-debian-12-r1
+ - name: 22.9.4
+ serviceVersion: 22.9.4
+ images:
+ clickhouse: {{ include "clickhouse.repository" . }}:22.9.4-debian-11-r1
\ No newline at end of file
diff --git a/addons/clickhouse/values.yaml b/addons/clickhouse/values.yaml
index dca042c74..db3b577b1 100644
--- a/addons/clickhouse/values.yaml
+++ b/addons/clickhouse/values.yaml
@@ -23,4 +23,6 @@ image:
repository: bitnami/clickhouse
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
- tag: 24.8.3-debian-12-r1
\ No newline at end of file
+ tag:
+ major24: 24.8.3-debian-12-r1
+ major22: 22.9.4-debian-11-r1
\ No newline at end of file