Skip to content
Open
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
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.6.1"
kubeVersion: "^1.10.0-0"
description: Milvus is an open-source vector database built to power AI applications and vector similarity search.
version: 5.0.2
version: 5.0.3-vectara.1
keywords:
- milvus
- elastic
Expand Down
75 changes: 75 additions & 0 deletions charts/milvus/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,78 @@ false
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
milvus.logVolume renders the pod volume entry for milvus log storage.
Precedence:
1. existingClaim set -> reference that PVC (user-managed).
2. ephemeral: true -> generic ephemeral volume (inline PVC bound to
the pod lifecycle, K8s >= 1.21).
3. default -> named PersistentVolumeClaim from pvc.yaml.
*/}}
{{- define "milvus.logVolume" -}}
{{- $pvc := .Values.log.persistence.persistentVolumeClaim -}}
- name: milvus-logs-disk
{{- if and $pvc.ephemeral (not $pvc.existingClaim) }}
ephemeral:
volumeClaimTemplate:
metadata:
labels:
{{- include "milvus.matchLabels" . | nindent 10 }}
spec:
accessModes:
- {{ $pvc.accessModes | quote }}
{{- if $pvc.storageClass }}
{{- if eq "-" $pvc.storageClass }}
storageClassName: ""
{{- else }}
storageClassName: {{ $pvc.storageClass }}
{{- end }}
{{- end }}
resources:
requests:
storage: {{ $pvc.size }}
{{- else }}
persistentVolumeClaim:
claimName: {{ $pvc.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }}
{{- end }}
{{- end -}}

{{/*
milvus.standaloneDataVolume renders the pod volume entry for the
standalone milvus data disk.
Precedence:
1. persistence disabled -> emptyDir (preserves existing behavior).
2. existingClaim set -> reference that PVC.
3. ephemeral: true -> generic ephemeral volume.
4. default -> named PersistentVolumeClaim from pvc.yaml.
*/}}
{{- define "milvus.standaloneDataVolume" -}}
{{- $pvc := .Values.standalone.persistence.persistentVolumeClaim -}}
- name: milvus-data-disk
{{- if not .Values.standalone.persistence.enabled }}
emptyDir: {}
{{- else if and $pvc.ephemeral (not $pvc.existingClaim) }}
ephemeral:
volumeClaimTemplate:
metadata:
labels:
{{- include "milvus.matchLabels" . | nindent 10 }}
spec:
accessModes:
- {{ $pvc.accessModes | quote }}
{{- if $pvc.storageClass }}
{{- if eq "-" $pvc.storageClass }}
storageClassName: ""
{{- else }}
storageClassName: {{ $pvc.storageClass }}
{{- end }}
{{- end }}
resources:
requests:
storage: {{ $pvc.size }}
{{- else }}
persistentVolumeClaim:
claimName: {{ $pvc.existingClaim | default (printf "%s" (include "milvus.fullname" . | trunc 58)) }}
{{- end }}
{{- end -}}
4 changes: 1 addition & 3 deletions charts/milvus/templates/datacoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/datanode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/indexcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/indexnode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/mixcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
4 changes: 2 additions & 2 deletions charts/milvus/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if not .Values.cluster.enabled }}
{{- $pvc := .Values.standalone.persistence.persistentVolumeClaim -}}
{{- if and .Values.standalone.persistence.enabled (not $pvc.existingClaim) }}
{{- if and .Values.standalone.persistence.enabled (not $pvc.existingClaim) (not $pvc.ephemeral) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand Down Expand Up @@ -29,7 +29,7 @@ spec:
{{- end }}

{{- $pvc := .Values.log.persistence.persistentVolumeClaim -}}
{{- if and .Values.log.persistence.enabled (not $pvc.existingClaim)}}
{{- if and .Values.log.persistence.enabled (not $pvc.existingClaim) (not $pvc.ephemeral) }}

---

Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/querycoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/querynode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/rootcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
12 changes: 2 additions & 10 deletions charts/milvus/templates/standalone-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,9 @@ spec:
{{- else }}
name: {{ template "milvus.fullname" . }}
{{- end }}
- name: milvus-data-disk
{{- if .Values.standalone.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.standalone.persistence.persistentVolumeClaim.existingClaim | default (printf "%s" (include "milvus.fullname" . | trunc 58)) }}
{{- else }}
emptyDir: {}
{{- end }}
{{- include "milvus.standaloneDataVolume" . | nindent 6 }}
{{- 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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
{{- if .Values.standalone.disk.enabled }}
- name: disk
Expand Down
4 changes: 1 addition & 3 deletions charts/milvus/templates/streamingnode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@ spec:
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)) }}
{{- include "milvus.logVolume" . | nindent 6 }}
{{- end }}
- name: tools
emptyDir: {}
Expand Down
14 changes: 14 additions & 0 deletions charts/milvus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ log:
helm.sh/resource-policy: keep
persistentVolumeClaim:
existingClaim: ""
## If true, use a generic ephemeral volume (inline PVC bound to the pod
## lifecycle) instead of a named PersistentVolumeClaim. The volume is
## dynamically provisioned when the pod starts and deleted with the pod.
## Requires Kubernetes >= 1.21 (GA in 1.23).
## Ignored when existingClaim is set (existingClaim wins).
##
ephemeral: false
## Milvus Logs Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
Expand Down Expand Up @@ -260,6 +267,13 @@ standalone:
helm.sh/resource-policy: keep
persistentVolumeClaim:
existingClaim: ""
## If true, use a generic ephemeral volume (inline PVC bound to the pod
## lifecycle) instead of a named PersistentVolumeClaim. The volume is
## dynamically provisioned when the pod starts and deleted with the pod.
## Requires Kubernetes >= 1.21 (GA in 1.23).
## Ignored when existingClaim is set (existingClaim wins).
##
ephemeral: false
## Milvus Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
Expand Down