Skip to content

Commit

Permalink
added new value for using a custom ConfigMap
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Giurgiu <[email protected]>
  • Loading branch information
nustiueudinastea committed Jul 10, 2024
1 parent adc5c36 commit 4dd11a4
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 2 deletions.
3 changes: 2 additions & 1 deletion charts/milvus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ In case you want to use a different `secretName` or mount path inside pod, modif

## Milvus with External Object Storage

As of https://github.com/minio/minio/releases/tag/RELEASE.2022-10-29T06-21-33Z, the MinIO Gateway and the related filesystem mode code have been removed. It is now recommended to utilize the `externalS3` configuration for integrating with various object storage services. Notably, Milvus now provides support for popular object storage platforms such as AWS S3, GCP GCS, Azure Blob, Aliyun OSS and Tencent COS.
As of https://github.com/minio/minio/releases/tag/RELEASE.2022-10-29T06-21-33Z, the MinIO Gateway and the related filesystem mode code have been removed. It is now recommended to utilize the `externalS3` configuration for integrating with various object storage services. Notably, Milvus now provides support for popular object storage platforms such as AWS S3, GCP GCS, Azure Blob, Aliyun OSS and Tencent COS.

The recommended configuration option for `externalS3.cloudProvider` includes the following choices: `aws`, `gcp`, `azure`, `aliyun`, and `tencent`. Here's an example to use AWS S3 for Milvus object storage:

Expand Down Expand Up @@ -266,6 +266,7 @@ The following table lists the configurable parameters of the Milvus Service and
| `image.tools.repository` | Config image repository | `milvusdb/milvus-config-tool` |
| `image.tools.tag` | Config image tag | `v0.1.2` |
| `image.tools.pullPolicy` | Config image pull policy | `IfNotPresent` |
| `customConfigMap` | User specified ConfigMap for configuration |
| `extraConfigFiles` | Extra config to override default milvus.yaml | `user.yaml:` |
| `service.type` | Service type | `ClusterIP` |
| `service.port` | Port where service is exposed | `19530` |
Expand Down
3 changes: 3 additions & 0 deletions charts/milvus/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# If customConfigMap is not set, this ConfigMap will be redendered.
{{- if not .Values.customConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -10,3 +12,4 @@ data:
{{ $key }}: |-
{{ $value | indent 4 }}
{{- end }}
{{- end }}
11 changes: 11 additions & 0 deletions charts/milvus/templates/datacoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ spec:
resources:
{{- toYaml .Values.dataCoordinator.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -129,6 +135,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -165,7 +172,11 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
Expand Down
11 changes: 11 additions & 0 deletions charts/milvus/templates/datanode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ spec:
resources:
{{- toYaml .Values.dataNode.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -125,6 +131,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -160,7 +167,11 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
Expand Down
11 changes: 11 additions & 0 deletions charts/milvus/templates/indexcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ spec:
resources:
{{- toYaml .Values.indexCoordinator.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -129,6 +135,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -165,7 +172,11 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
Expand Down
11 changes: 11 additions & 0 deletions charts/milvus/templates/indexnode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ spec:
resources:
{{- toYaml .Values.indexNode.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -131,6 +137,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -172,7 +179,11 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
Expand Down
13 changes: 12 additions & 1 deletion charts/milvus/templates/mixcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ spec:
resources:
{{- toYaml .Values.mixCoordinator.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -126,6 +132,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -162,12 +169,16 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
claimName: {{ .Values.log.persistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }}
{{- end }}
- name: tools
emptyDir: {}
{{- end }}
{{- end }}
11 changes: 11 additions & 0 deletions charts/milvus/templates/proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ spec:
resources:
{{- toYaml .Values.proxy.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -125,6 +131,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -164,7 +171,11 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
Expand Down
11 changes: 11 additions & 0 deletions charts/milvus/templates/querycoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ spec:
resources:
{{- toYaml .Values.queryCoordinator.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -129,6 +135,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -165,7 +172,11 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
Expand Down
11 changes: 11 additions & 0 deletions charts/milvus/templates/querynode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ spec:
resources:
{{- toYaml .Values.queryNode.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -131,6 +137,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -171,7 +178,11 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
Expand Down
11 changes: 11 additions & 0 deletions charts/milvus/templates/rootcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ spec:
resources:
{{- toYaml .Values.rootCoordinator.resources | nindent 10 }}
volumeMounts:
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -129,6 +135,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
mountPath: {{ .Values.log.persistence.mountPath | quote }}
Expand Down Expand Up @@ -165,7 +172,11 @@ spec:
volumes:
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
{{- if .Values.log.persistence.enabled }}
- name: milvus-logs-disk
persistentVolumeClaim:
Expand Down
11 changes: 11 additions & 0 deletions charts/milvus/templates/standalone-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ spec:
volumeMounts:
- mountPath: /milvus/tools
name: tools
{{- if .Values.customConfigMap }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: milvus.yaml
readOnly: true
{{- else }}
- name: milvus-config
mountPath: /milvus/configs/default.yaml
subPath: default.yaml
Expand All @@ -129,6 +135,7 @@ spec:
mountPath: /milvus/configs/user.yaml
subPath: user.yaml
readOnly: true
{{- end }}
- name: milvus-data-disk
mountPath: {{ .Values.standalone.persistence.mountPath | quote }}
subPath: {{ .Values.standalone.persistence.persistentVolumeClaim.subPath | default "" }}
Expand Down Expand Up @@ -172,7 +179,11 @@ spec:
name: tools
- name: milvus-config
configMap:
{{- if .Values.customConfigMap }}
name: {{ .Values.customConfigMap }}
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
- name: milvus-data-disk
{{- if .Values.standalone.persistence.enabled }}
persistentVolumeClaim:
Expand Down
7 changes: 7 additions & 0 deletions charts/milvus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ affinity: {}
labels: {}
annotations: {}

##
## If set, the whole config will be mounted from this custom ConfigMap.
## The ConfigMap should have a key named `milvus.yaml` which contains the full Milvus config.
## extraConfigFiles will be ignored if this variable is set.
##
customConfigMap: ""

# Extra configs for milvus.yaml
# If set, this config will merge into milvus.yaml
# Please follow the config structure in the milvus.yaml
Expand Down

0 comments on commit 4dd11a4

Please sign in to comment.