Skip to content

Commit

Permalink
support custom volumes & volumeMounts (#162)
Browse files Browse the repository at this point in the history
Signed-off-by: haorenfsa <[email protected]>
  • Loading branch information
haorenfsa authored Nov 27, 2024
1 parent c2b6b01 commit 7d12baf
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/milvus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: milvus
appVersion: "2.5.0-beta"
kubeVersion: "^1.10.0-0"
description: Milvus is an open-source vector database built to power AI applications and vector similarity search.
version: 4.2.30
version: 4.2.31
keywords:
- milvus
- elastic
Expand Down
6 changes: 6 additions & 0 deletions charts/milvus/ci/cluster-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## Enable or disable Milvus Cluster mode
cluster:
enabled: true
volumes:
- name: custom
emptyDir: {}
volumeMounts:
- name: custom
mountPath: /custom
etcd:
replicaCount: 1
minio:
Expand Down
6 changes: 6 additions & 0 deletions charts/milvus/templates/datacoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ spec:
{{- end }}
- mountPath: /milvus/tools
name: tools
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.dataCoordinator.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -182,4 +185,7 @@ spec:
{{- end }}
- name: tools
emptyDir: {}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/templates/datanode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ spec:
{{- end }}
- mountPath: /milvus/tools
name: tools
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.dataNode.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -177,4 +180,7 @@ spec:
{{- end }}
- name: tools
emptyDir: {}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/templates/indexcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ spec:
{{- end }}
- mountPath: /milvus/tools
name: tools
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.indexCoordinator.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -182,4 +185,7 @@ spec:
{{- end }}
- name: tools
emptyDir: {}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
7 changes: 6 additions & 1 deletion charts/milvus/templates/indexnode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ spec:
- mountPath: /var/lib/milvus/data
name: disk
{{- end }}

{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.indexNode.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -193,4 +195,7 @@ spec:
- name: disk
emptyDir: {}
{{- end }}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/templates/mixcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ spec:
{{- end }}
- mountPath: /milvus/tools
name: tools
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.mixCoordinator.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -179,4 +182,7 @@ spec:
{{- end }}
- name: tools
emptyDir: {}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
7 changes: 6 additions & 1 deletion charts/milvus/templates/proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ spec:
{{- if .Values.proxy.volumeMounts }}
{{- toYaml .Values.proxy.volumeMounts | nindent 8 }}
{{- end}}
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.proxy.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -184,5 +187,7 @@ spec:
{{- if .Values.proxy.volumes }}
{{ toYaml .Values.proxy.volumes | indent 6 }}
{{- end}}

{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/templates/querycoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ spec:
{{- end }}
- mountPath: /milvus/tools
name: tools
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.queryCoordinator.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -182,4 +185,7 @@ spec:
{{- end }}
- name: tools
emptyDir: {}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/templates/querynode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ spec:
- mountPath: /var/lib/milvus/data
name: disk
{{- end }}
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.queryNode.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -192,4 +195,7 @@ spec:
- name: disk
emptyDir: {}
{{- end }}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/templates/rootcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ spec:
{{- end }}
- mountPath: /milvus/tools
name: tools
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.rootCoordinator.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -182,4 +185,7 @@ spec:
{{- end }}
- name: tools
emptyDir: {}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/templates/standalone-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ spec:
- mountPath: /var/lib/milvus/data
name: disk
{{- end }}
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.standalone.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -195,4 +198,7 @@ spec:
- name: disk
emptyDir: {}
{{- end }}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/templates/streamingnode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ spec:
{{- end }}
- mountPath: /milvus/tools
name: tools
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end}}

{{- if and (.Values.nodeSelector) (not .Values.streamingNode.nodeSelector) }}
nodeSelector:
Expand Down Expand Up @@ -172,4 +175,7 @@ spec:
{{- end }}
- name: tools
emptyDir: {}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/milvus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ affinity: {}
labels: {}
annotations: {}

# Global Volumes & volumeMounts
# If set, this will apply to all milvus components
# ref: https://kubernetes.io/docs/concepts/storage/volumes/
volumes: []
volumeMounts: []

# Experimental feature: streaming node
# Only support standalone mode with rocksmq and pulsar message queue,
# cluster mode with pulsar message queue.
Expand Down

0 comments on commit 7d12baf

Please sign in to comment.