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

chore: support to define the vttablet sidecar in wescale #1112

Closed
wants to merge 5 commits into from
Closed
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: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ KubeBlocks add-ons.
## Supported Add-ons
| NAME | VERSIOINS | DESCRIPTION | MAINTAINERS |
| ---- | ---- | ----------- | ----------- |
| 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 |
| apecloud-mysql | | 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 |
| camellia-redis-proxy | camellia-redis-proxy-1.2.26 | camellia-redis-proxy is a high-performance redis proxy developed using Netty4. | Y-Rookie |
| 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 |
Expand Down Expand Up @@ -61,6 +61,7 @@ KubeBlocks add-ons.
| tidb | tidb-6.5.10<br>tidb-7.1.5<br>tidb-7.5.2<br>tidb-pd-6.5.10<br>tidb-pd-7.1.5<br>tidb-pd-7.5.2<br>tikv-6.5.10<br>tikv-7.1.5<br>tikv-7.5.2 | TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. | csuzhangxc cjc7373 |
| victoria-metrics | ictoria-metrics-1.0.0 | VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database. | sophon-zt ButterBright |
| weaviate | weaviate-1.23.1 | 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 |
| wescale | | | xuriwuyun |
| xinference | xinference-0.11.0<br>xinference-0.11.0-cpu | Xorbits Inference(Xinference) is a powerful and versatile library designed to serve language, speech recognition, and multimodal models. | lynnleelhl |
| yashandb | yashandb-personal-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 |
| zookeeper | zookeeper-3.4.14<br>zookeeper-3.6.4<br>zookeeper-3.7.2<br>zookeeper-3.8.4<br>zookeeper-3.9.2 | Apache ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. | kubeJocker kissycn |
29 changes: 0 additions & 29 deletions addons/apecloud-mysql/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -310,35 +310,6 @@ lifecycle:
command: [ "/scripts/pre-stop.sh" ]
{{- end -}}

{{- define "apecloud-mysql.spec.runtime.vtablet" -}}
ports:
- containerPort: 15100
name: vttabletport
- containerPort: 16100
name: vttabletgrpc
env:
- name: CELL
value: {{ .Values.wesqlscale.cell | default "zone1" | quote }}
- name: VTTABLET_PORT
value: "15100"
- name: VTTABLET_GRPC_PORT
- name: VTCTLD_HOST
value: "$(KB_CLUSTER_NAME)-wescale-ctrl-headless"
- name: VTCTLD_WEB_PORT
value: "15000"
- name: SERVICE_PORT
value: "$(VTTABLET_PORT)"
command: ["/scripts/vttablet.sh"]
volumeMounts:
- name: scripts
mountPath: /scripts
- name: mysql-scale-config
mountPath: /conf
- name: data
mountPath: /vtdataroot
{{- end }}


{{- define "apecloud-mysql.spec.runtime.exporter" -}}
command: [ "/scripts/exporter_start.sh" ]
env:
Expand Down
16 changes: 0 additions & 16 deletions addons/apecloud-mysql/templates/_names.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,6 @@ mysql8.0-config-constraints
{{- end -}}
{{- end -}}

{{- define "apecloud-mysql.configConstraintVttabletName" }}
{{- if eq (len .Values.resourceNamePrefix) 0 -}}
mysql-scale-vttablet-config-constraints
{{- else -}}
{{- .Values.resourceNamePrefix -}}-vttablet-config-constraints
{{- end -}}
{{- end -}}

{{- define "apecloud-mysql.configConstraintVtgateName" }}
{{- if eq (len .Values.resourceNamePrefix) 0 -}}
mysql-scale-vtgate-config-constraints
{{- else -}}
{{- .Values.resourceNamePrefix -}}-vtgate-config-constraints
{{- end -}}
{{- end -}}

{{- define "apecloud-mysql.configTplName" -}}
{{- if eq (len .Values.resourceNamePrefix) 0 -}}
mysql8.0-config-template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ spec:
namespace: {{ .Release.Namespace }}
reRenderResourceTypes:
- vscale
- name: vttablet-config
templateRef: {{ include "apecloud-mysql.configTplVttabletName" . }}
constraintRef: {{ include "apecloud-mysql.configConstraintVttabletName" . }}
volumeName: mysql-scale-config
namespace: {{ .Release.Namespace }}
runtime:
initContainers:
- command:
Expand Down Expand Up @@ -56,8 +51,6 @@ spec:
rm -rf {{ .Values.mysqlConfigs.dataMountPath }}/plugin/
/scripts/setup.sh
{{- include "apecloud-mysql.spec.runtime.mysql" . | nindent 8 }}
- name: vtablet
{{- include "apecloud-mysql.spec.runtime.vtablet" . | nindent 8 }}
- name: mysql-exporter
{{- include "apecloud-mysql.spec.runtime.exporter" . | nindent 8 }}
volumes:
Expand Down
23 changes: 0 additions & 23 deletions addons/apecloud-mysql/templates/cmpv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,6 @@ spec:
init-data: {{ .Values.image.registry | default "docker.io" }}/apecloud/mysql_audit_log:8.0.33
mysql: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:8.0.30-5.beta3.20240330.g94d1caf.15
mysql-exporter: {{ .Values.metrics.image.registry | default ( .Values.image.registry | default "docker.io" ) }}/{{ .Values.metrics.image.repository }}:{{ default .Values.metrics.image.tag }}
vtablet: {{ .Values.wesqlscale.image.registry | default ( .Values.image.registry | default "docker.io" ) }}/{{ .Values.wesqlscale.image.repository }}:0.2.7
compatibilityRules:
- releases: [apecloud-mysql-8.0.30]
compDefs: [apecloud-mysql]
---
apiVersion: apps.kubeblocks.io/v1
kind: ComponentVersion
metadata:
name: wescale
labels:
{{- include "apecloud-mysql.labels" . | nindent 4 }}
spec:
releases:
- name: wescale-ctrl-0.2.7
serviceVersion: "0.2.7"
images:
vtctld: &wescale {{ .Values.wesqlscale.image.registry | default ( .Values.image.registry | default "docker.io" ) }}/{{ .Values.wesqlscale.image.repository }}:0.2.7
- name: wescale-0.2.7
serviceVersion: "0.2.7"
images:
vtgate: *wescale
compatibilityRules:
- releases: [wescale-ctrl-0.2.7]
compDefs: [wescale-ctrl]
- releases: [wescale-0.2.7]
compDefs: [wescale]
102 changes: 0 additions & 102 deletions addons/apecloud-mysql/templates/configconstraint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,105 +58,3 @@ spec:
format: ini
iniConfig:
sectionName: mysqld
---
{{- $vttabletcc := .Files.Get "config/mysql-scale-vttablet-config-effect-scope.yaml" | fromYaml }}
apiVersion: apps.kubeblocks.io/v1beta1
kind: ConfigConstraint
metadata:
name: {{ include "apecloud-mysql.configConstraintVttabletName" . }}

labels:
{{- include "apecloud-mysql.labels" . | nindent 4 }}
spec:
reloadAction:
autoTrigger:
processName: vttablet

parametersSchema:
topLevelKey: VtTabletParameter
cue: |-
{{- .Files.Get "config/mysql-scale-vttablet-config-constraint.cue" | nindent 6 }}

## define static parameter list
{{- if hasKey $vttabletcc "staticParameters" }}
staticParameters:
{{- $params := get $vttabletcc "staticParameters" }}
{{- range $params }}
- {{ . }}
{{- end }}
{{- end}}

## define dynamic parameter list
{{- if hasKey $vttabletcc "dynamicParameters" }}
dynamicParameters:
{{- $params := get $vttabletcc "dynamicParameters" }}
{{- range $params }}
- {{ . }}
{{- end }}
{{- end}}

## define immutable parameter list, this feature is not currently supported.
{{- if hasKey $vttabletcc "immutableParameters" }}
immutableParameters:
{{- $params := get $vttabletcc "immutableParameters" }}
{{- range $params }}
- {{ . }}
{{- end }}
{{- end}}

# mysql-scale configuration file format
fileFormatConfig:
format: ini
iniConfig:
sectionName: vttablet
---
{{- $vtgatecc := .Files.Get "config/mysql-scale-vtgate-config-effect-scope.yaml" | fromYaml }}
apiVersion: apps.kubeblocks.io/v1beta1
kind: ConfigConstraint
metadata:
name: {{ include "apecloud-mysql.configConstraintVtgateName" . }}
labels:
{{- include "apecloud-mysql.labels" . | nindent 4 }}
spec:
reloadAction:
autoTrigger:
processName: vtgate

parametersSchema:
topLevelKey: VtGateParameter

cue: |-
{{- .Files.Get "config/mysql-scale-vtgate-config-constraint.cue" | nindent 6 }}

## define static parameter list
{{- if hasKey $vtgatecc "staticParameters" }}
staticParameters:
{{- $params := get $vtgatecc "staticParameters" }}
{{- range $params }}
- {{ . }}
{{- end }}
{{- end}}

## define dynamic parameter list
{{- if hasKey $vtgatecc "dynamicParameters" }}
dynamicParameters:
{{- $params := get $vtgatecc "dynamicParameters" }}
{{- range $params }}
- {{ . }}
{{- end }}
{{- end}}

## define immutable parameter list, this feature is not currently supported.
{{- if hasKey $vtgatecc "immutableParameters" }}
immutableParameters:
{{- $params := get $vtgatecc "immutableParameters" }}
{{- range $params }}
- {{ . }}
{{- end }}
{{- end}}

# mysql-scale configuration file format
fileFormatConfig:
format: ini
iniConfig:
sectionName: vtgate
22 changes: 1 addition & 21 deletions addons/apecloud-mysql/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@ data:
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "apecloud-mysql.configTplVtgateName" . }}
labels:
{{- include "apecloud-mysql.labels" . | nindent 4 }}
data:
vtgate.cnf: |-
{{- .Files.Get "config/mysql-scale-vtgate-config.tpl" | nindent 4 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "apecloud-mysql.configTplVttabletName" . }}
labels:
{{- include "apecloud-mysql.labels" . | nindent 4 }}
data:
vttablet.cnf: |-
{{- .Files.Get "config/mysql-scale-vttablet-config.tpl" | nindent 4 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "apecloud-mysql.cmReloadScriptName" . }}
labels:
Expand All @@ -46,4 +26,4 @@ data:
formatterConfig:
format: ini
iniConfig:
sectionName: mysqld
sectionName: mysqld
66 changes: 1 addition & 65 deletions addons/apecloud-mysql/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,70 +436,6 @@
}
}
}
},
"wesqlscale": {
"title": "Wesqlscale",
"description": "Configs for wesqlscale container of MySQL",
"type": "object",
"default": {
"cell": "zone1",
"image": {
"registry": "",
"repository": "apecloud/apecloud-mysql-scale",
"tag": "0.1.1",
"pullPolicy": "IfNotPresent"
}
},
"properties": {
"cell": {
"title": "Cell",
"description": "Cell.",
"type": "string",
"default": "zone1"
},
"image": {
"title": "Image",
"description": "Image.",
"type": "object",
"default": {
"registry": "",
"repository": "apecloud/apecloud-mysql-scale",
"tag": "0.1.1",
"pullPolicy": "IfNotPresent"
},
"properties": {
"registry": {
"title": "Registry",
"description": "Registry to download the image.",
"type": "string",
"default": ""
},
"repository": {
"title": "Repository.",
"description": "Image repository under the registry",
"type": "string",
"default": "apecloud/apecloud-mysql-scale"
},
"pullPolicy": {
"title": "PullPolicy",
"description": "Image pull policy.",
"type": "string",
"default": "IfNotPresent",
"enum": [
"IfNotPresent",
"Always",
"Never"
]
},
"tag": {
"title": "Tag",
"description": "Image tag.",
"type": "string",
"default": "0.1.1"
}
}
}
}
}
}
}
}
15 changes: 1 addition & 14 deletions addons/apecloud-mysql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,9 @@ backupTool:
tag: "8.0"
pullPolicy: IfNotPresent

wesqlscale:
cell: "zone1"
image:
# refer: https://github.com/wesql/wescale/blob/main/docker/wesqlscale/Dockerfile.release
# if the value of wesqlscale.image.registry is not specified using `--set`, it will be set to the value of 'image.registry' by default
registry: ""
repository: apecloud/apecloud-mysql-scale
tag: "0.2.7"
pullPolicy: IfNotPresent

## @param resourceNamePrefix Prefix for all resources name created by this chart, that can avoid name conflict
## if you install multiple releases of this chart.
## If specified, the cluster definition will use it as name.
resourceNamePrefix: ""

etcd:
etcdCmpdName: etcd

clusterDomain: ".cluster.local"
clusterDomain: ".cluster.local"
24 changes: 24 additions & 0 deletions addons/wescale/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: wescale
description:

type: application

version: 1.0.0-alpha.0

appVersion: "8.0.30"

home: https://kubeblocks.io/
icon: https://kubeblocks.io/img/logo.png

maintainers:
- name: xuriwuyun
url: https://github.com/apecloud/kubeblocks/

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

annotations:
addon.kubeblocks.io/kubeblocks-version: ">=0.9.0"
addon.kubeblocks.io/model: "RDBMS"
addon.kubeblocks.io/provider: "community"
Loading