Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ addons-cluster/apecloud-mysql/ @xuriwuyun @leon-inf @apecloud/kb-reviewers @apec
addons/clickhouse/ @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
addons-cluster/clickhouse/ @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers

addons/dolt/ @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
addons-cluster/dolt/ @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers

addons/elasticsearch/ @iziang @vipshop @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers
addons-cluster/elasticsearch/ @iziang @vipshop @leon-inf @apecloud/kb-reviewers @apecloud/kb-addon-reviewers

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ KubeBlocks add-ons.
| ---- | ---- | ----------- | ----------- |
| 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 |
| clickhouse | clickhouse-22.3.18<br>clickhouse-22.3.20<br>clickhouse-22.6.1<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 |
| dolt | dolt-1.84.0 | Dolt is a MySQL-compatible SQL database with Git-style versioning. | |
| 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 |
| 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 |
| falkordb | falkordb-4.12.5<br>falkordb-cluster-4.12.5<br>falkordb-sent-4.12.5 | FalkorDB is an in-memory graph database based on Redis. | ApeCloud dudizimber |
Expand Down
33 changes: 33 additions & 0 deletions addons-cluster/dolt/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: v2
name: dolt-cluster
type: application
version: 1.0.0
description: A Dolt cluster Helm chart for KubeBlocks.

dependencies:
- name: kblib
version: 0.1.2
repository: file://../kblib
alias: extra

appVersion: "1.84.0"

keywords:
- dolt
- database
- sql
- replication

home: https://github.com/apecloud/kubeblocks-addons
icon: https://kubeblocks.io/img/logo.png

maintainers:
- name: ApeCloud
url: https://kubeblocks.io/

sources:
- https://github.com/apecloud/kubeblocks/
- https://github.com/dolthub/dolt

annotations:
category: Database
21 changes: 21 additions & 0 deletions addons-cluster/dolt/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{/*
ComponentDefinition from mode (must match addons/dolt: dolt-replication | dolt-standalone).
*/}}
{{- define "dolt-cluster.componentDef" -}}
{{- if eq .Values.mode "standalone" -}}
dolt-standalone
{{- else -}}
dolt-replication
{{- end -}}
{{- end }}

{{/*
Replica count: standalone is always 1; otherwise use .Values.replicas.
*/}}
{{- define "dolt-cluster.replicas" -}}
{{- if eq .Values.mode "standalone" -}}
1
{{- else -}}
{{ .Values.replicas }}
{{- end -}}
{{- end }}
17 changes: 17 additions & 0 deletions addons-cluster/dolt/templates/cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: {{ include "kblib.clusterName" . }}
namespace: {{ .Release.Namespace }}
labels: {{ include "kblib.clusterLabels" . | nindent 4 }}
spec:
terminationPolicy: {{ .Values.extra.terminationPolicy }}
clusterDef: dolt
topology: {{ .Values.mode }}
componentSpecs:
- name: dolt
serviceVersion: {{ .Values.version | quote }}
replicas: {{ include "dolt-cluster.replicas" . }}
{{- include "kblib.componentResources" . | indent 6 }}
{{- include "kblib.componentStorages" . | indent 6 }}
{{- include "kblib.componentMonitor" . | indent 6 }}
102 changes: 102 additions & 0 deletions addons-cluster/dolt/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"title": "Dolt cluster",
"description": "Values for the dolt-cluster Helm chart (KubeBlocks).",
"properties": {
"mode": {
"title": "Mode",
"description": "Topology: replication (primary/standby) or standalone (single node).",
"type": "string",
"default": "replication",
"enum": ["replication", "standalone"]
},
"version": {
"title": "Service version",
"description": "Dolt serviceVersion; must match a release in ComponentVersion `dolt`.",
"type": "string",
"default": "1.84.0"
},
"replicas": {
"title": "Replicas",
"description": "Replica count when mode is replication (standalone always uses 1).",
"type": "integer",
"default": 2,
"minimum": 1,
"maximum": 32
},
"cpu": {
"title": "CPU",
"description": "CPU cores per pod.",
"type": ["number", "string"],
"default": 0.5,
"minimum": 0.5,
"maximum": 64,
"multipleOf": 0.5
},
"memory": {
"title": "Memory (Gi)",
"description": "Memory limit/request in Gi.",
"type": ["number", "string"],
"default": 0.5,
"minimum": 0.5,
"maximum": 1000
},
"storage": {
"title": "Storage (Gi)",
"description": "Persistent volume size in Gi.",
"type": ["number", "string"],
"default": 10,
"minimum": 1,
"maximum": 10000
},
"extra": {
"type": "object",
"description": "KubeBlocks shared options (kblib).",
"properties": {
"terminationPolicy": {
"title": "Termination policy",
"description": "Cluster deletion behavior.",
"type": "string",
"default": "Delete",
"enum": ["DoNotTerminate", "Delete", "WipeOut"]
}
},
"additionalProperties": true
},
"prometheus": {
"type": "object",
"description": "Prometheus Operator PodMonitor options.",
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "If true, render a PodMonitor when the PodMonitor CRD exists."
},
"metricsPath": {
"type": "string",
"default": "/metrics",
"description": "HTTP path for metrics scrape."
},
"interval": {
"type": "string",
"default": "",
"description": "Optional scrape interval (empty uses Prometheus default)."
},
"scrapeTimeout": {
"type": "string",
"default": "",
"description": "Optional per-scrape timeout (empty uses Prometheus default)."
},
"additionalLabels": {
"type": "object",
"default": {},
"description": "Extra labels on the PodMonitor resource.",
"additionalProperties": { "type": "string" }
}
},
"additionalProperties": true
}
},
"additionalProperties": true
}
22 changes: 22 additions & 0 deletions addons-cluster/dolt/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Default values for dolt-cluster.

## @param mode Dolt topology: `replication` (primary/standby) or `standalone` (single node).
mode: replication

## @param version serviceVersion in ComponentVersion.
version: 1.84.0

## @param replicas number of dolt nodes when `mode` is `replication` (ignored when `mode` is `standalone`, which is always one replica).
replicas: 2

## @param cpu CPU cores.
cpu: 0.5

## @param memory Memory in Gi.
memory: 0.5

## @param storage storage size in Gi.
storage: 10

extra:
terminationPolicy: Delete
23 changes: 23 additions & 0 deletions addons/dolt/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions addons/dolt/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: dolt
description: Dolt is a MySQL-compatible SQL database with Git-style versioning.

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.84.0"
25 changes: 25 additions & 0 deletions addons/dolt/config/dolt-server.yaml.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
log_level: info
data_dir: ${DATA_DIR}

listener:
host: 0.0.0.0
port: 3306

behavior:
read_only: false

metrics:
labels: {}
host: 0.0.0.0
port: 11228

cluster:
bootstrap_role: ${BOOTSTRAP_ROLE}
bootstrap_epoch: 1

remotesapi:
port: ${REMOTES_API_PORT}

standby_remotes:
- name: standby
remote_url_template: http://${STANDBY_HOST}.${HEADLESS_SERVICE_NAME}:${REMOTES_API_PORT}/{database}
17 changes: 17 additions & 0 deletions addons/dolt/config/dolt-standalone.yaml.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
log_level: info
data_dir: ${DATA_DIR}
cfg_dir: ${DATA_DIR}/.doltcfg
privilege_file: ${DATA_DIR}/.doltcfg/privileges.db
branch_control_file: ${DATA_DIR}/.doltcfg/branch_control.db

listener:
host: 0.0.0.0
port: 3306

behavior:
read_only: false

metrics:
labels: {}
host: 0.0.0.0
port: 11228
Loading