Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Commit 74a9949

Browse files
authored
Add mysql as meta store (#349)
Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>
1 parent 280143b commit 74a9949

7 files changed

Lines changed: 126 additions & 3 deletions

File tree

charts/milvus/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: milvus
33
appVersion: "2.1.0"
44
kubeVersion: "^1.10.0-0"
55
description: Milvus is an open-source vector database built to power AI applications and vector similarity search.
6-
version: 3.1.0
6+
version: 3.1.1
77
keywords:
88
- milvus
99
- elastic

charts/milvus/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ The following table lists the configurable parameters of the Milvus Service and
153153
| `externalKafka.sasl.mechanisms` | SASL mechanism to use for kafka authentication | `PLAIN` |
154154
| `externalKafka.sasl.username` | username for PLAIN or SASL/PLAIN authentication | `` |
155155
| `externalKafka.sasl.password` | password for PLAIN or SASL/PLAIN authentication | `` |
156+
| `externalMysql.enabled` | Enable or disable external MySQL | `false` |
157+
| `externalMysql.username` | MySQL username | `` |
158+
| `externalMysql.password` | MySQL password | `` |
159+
| `externalMysql.address` | MySQL address | `localhost` |
160+
| `externalMysql.port` | MySQL port | `3306` |
161+
| `externalMysql.dbName` | MySQL meta database | `milvus_meta` |
162+
| `externalMysql.maxOpenConns` | MySQL client maxOpenConns | `20` |
163+
| `externalMysql.maxIdleConns` | MySQL client maxIdleConns | `5` |
156164

157165
### Milvus Standalone Deployment Configuration
158166

@@ -350,3 +358,10 @@ This version of the chart includes the dependent Kafka chart in the charts/ dire
350358

351359
You can find more information at:
352360
* [https://artifacthub.io/packages/helm/bitnami/kafka](https://artifacthub.io/packages/helm/bitnami/kafka)
361+
362+
### MySQL Configuration
363+
364+
This version of the chart includes the dependent MySQL chart in the charts/ directory.
365+
366+
You can find more information at:
367+
* [https://artifacthub.io/packages/helm/bitnami/mysql](https://artifacthub.io/packages/helm/bitnami/mysql)
43.7 KB
Binary file not shown.

charts/milvus/requirements.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ dependencies:
1111
- name: kafka
1212
repository: https://charts.bitnami.com/bitnami
1313
version: 15.5.1
14-
digest: sha256:2e382d3ff91f947e0f6e18bc8957f57df533275d68c9bc1254f64e87cd24ec19
15-
generated: "2022-06-17T16:32:31.532131+08:00"
14+
- name: mysql
15+
repository: https://charts.bitnami.com/bitnami
16+
version: 9.2.1
17+
digest: sha256:fd5ff3b07045b17d7a4401b387226390d2836a95c42697d79143227e476bc5ad
18+
generated: "2022-07-25T13:05:42.713297+08:00"

charts/milvus/requirements.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ dependencies:
2323
condition: kafka.enabled
2424
tags:
2525
- kafka
26+
- name: mysql
27+
version: 9.2.1
28+
repository: https://charts.bitnami.com/bitnami
29+
condition: mysql.enabled
30+
tags:
31+
- mysql

charts/milvus/templates/config.tpl

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,47 @@ etcd:
2828
metaSubPath: meta # metaRootPath = rootPath + '/' + metaSubPath
2929
kvSubPath: kv # kvRootPath = rootPath + '/' + kvSubPath
3030

31+
metastore:
32+
{{- if or .Values.mysql.enabled .Values.externalMysql.enabled }}
33+
type: mysql
34+
{{- else }}
35+
type: etcd
36+
{{- end }}
37+
38+
{{- if .Values.externalMysql.enabled }}
39+
mysql:
40+
username: {{ .Values.externalMysql.username }}
41+
password: {{ .Values.externalMysql.password }}
42+
address: {{ .Values.externalMysql.address }}
43+
port: {{ .Values.externalMysql.port }}
44+
dbName: {{ .Values.externalMysql.dbName }}
45+
driverName: mysql
46+
maxOpenConns: {{ .Values.externalMysql.maxOpenConns }}
47+
maxIdleConns: {{ .Values.externalMysql.maxIdleConns }}
48+
{{- else if .Values.mysql.enabled }}
49+
mysql:
50+
username: root
51+
password: {{ .Values.mysql.auth.rootPassword }}
52+
{{- if contains .Values.mysql.name .Release.Name }}
53+
{{- if eq .Values.mysql.architecture "replication" }}
54+
address: {{ .Release.Name }}-primary
55+
{{- else }}
56+
address: {{ .Release.Name }}
57+
{{- end }}
58+
{{- else }}
59+
{{- if eq .Values.mysql.architecture "replication" }}
60+
address: {{ .Release.Name }}-{{ .Values.mysql.name }}-primary
61+
{{- else }}
62+
address: {{ .Release.Name }}-{{ .Values.mysql.name }}
63+
{{- end }}
64+
{{- end }}
65+
port: 3306
66+
dbName: {{ .Values.mysql.auth.database }}
67+
driverName: mysql
68+
maxOpenConns: {{ .Values.mysql.maxOpenConns }}
69+
maxIdleConns: {{ .Values.mysql.maxIdleConns }}
70+
{{- end }}
71+
3172
minio:
3273
{{- if .Values.externalS3.enabled }}
3374
address: {{ .Values.externalS3.host }}

charts/milvus/values.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,50 @@ kafka:
705705
enabled: true
706706
replicaCount: 3
707707

708+
## Configuration values for the mysql dependency
709+
## ref: https://artifacthub.io/packages/helm/bitnami/mysql
710+
##
711+
## MySQL used for meta store is testing internally
712+
713+
mysql:
714+
enabled: false
715+
name: mysql
716+
image:
717+
repository: bitnami/mysql
718+
tag: 8.0.29-debian-11-r9
719+
720+
architecture: replication
721+
auth:
722+
rootPassword: "ChangeMe"
723+
createDatabase: true
724+
database: "milvus_meta"
725+
726+
maxOpenConns: 20
727+
maxIdleConns: 5
728+
primary:
729+
name: primary
730+
resources:
731+
limits: {}
732+
requests: {}
733+
persistence:
734+
enabled: true
735+
storageClass: ""
736+
accessModes:
737+
- ReadWriteOnce
738+
size: 100Gi
739+
740+
secondary:
741+
name: secondary
742+
replicaCount: 1
743+
resources:
744+
limits: {}
745+
requests: {}
746+
persistence:
747+
enabled: true
748+
storageClass: ""
749+
accessModes:
750+
- ReadWriteOnce
751+
size: 100Gi
708752
###################################
709753
# External S3
710754
# - these configs are only used when `externalS3.enabled` is true
@@ -758,3 +802,17 @@ externalKafka:
758802
mechanisms: PLAIN
759803
username: ""
760804
password: ""
805+
806+
###################################
807+
# External mysql
808+
# - these configs are only used when `externalMysql.enabled` is true
809+
###################################
810+
externalMysql:
811+
enabled: false
812+
username: ""
813+
password: ""
814+
address: localhost
815+
port: 3306
816+
dbName: milvus_meta
817+
maxOpenConns: 20
818+
maxIdleConns: 5

0 commit comments

Comments
 (0)