diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 88f0fbb..339d3e2 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -60,8 +60,8 @@ jobs: - name: Run chart-testing (lint) run: ct lint - - name: Create kind cluster - uses: helm/kind-action@v1.1.0 + - name: Create KinD cluster + uses: helm/kind-action@v1.2.0 if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install) diff --git a/charts/milvus/Chart.yaml b/charts/milvus/Chart.yaml index 3c488e4..18b3b91 100644 --- a/charts/milvus/Chart.yaml +++ b/charts/milvus/Chart.yaml @@ -3,7 +3,7 @@ name: milvus appVersion: "2.0.0-rc.1" kubeVersion: "^1.10.0-0" description: Milvus is an open-source vector database built to power AI applications and vector similarity search. -version: 2.0.1 +version: 2.0.2 keywords: - milvus - elastic diff --git a/charts/milvus/README.md b/charts/milvus/README.md index 856e0a2..50fced9 100644 --- a/charts/milvus/README.md +++ b/charts/milvus/README.md @@ -125,6 +125,14 @@ The following table lists the configurable parameters of the Milvus Standalone c | `standalone.affinity` | Affinity settings for Milvus Standalone pods assignment | `{}` | | `standalone.tolerations` | Toleration labels for Milvus Standalone pods assignment | `[]` | | `standalone.extraEnv` | Additional Milvus Standalone container environment variables | `[]` | +| `standalone.persistence.enabled` | Use persistent volume to store Milvus standalone data | `true` | +| `standalone.persistence.mountPath` | Milvus standalone data persistence volume mount path | `/var/lib/milvus` | +| `standalone.persistence.annotations` | PersistentVolumeClaim annotations | `{}` | +| `standalone.persistence.persistentVolumeClaim.existingClaim` | Use your own data Persistent Volume existing claim name | `unset` | +| `standalone.persistence.persistentVolumeClaim.storageClass` | The Milvus standalone data Persistent Volume Storage Class | `unset` | +| `standalone.persistence.persistentVolumeClaim.accessModes` | The Milvus standalone data Persistence access modes | `ReadWriteOnec` | +| `standalone.persistence.persistentVolumeClaim.size` | The size of Milvus standalone data Persistent Volume Storage Class | `5Gi` | +| `standalone.persistence.persistentVolumeClaim.subPath` | SubPath for Milvus standalone data mount | `unset` | ### Milvus Proxy Deployment Configuration @@ -291,6 +299,14 @@ The following table lists the configurable parameters of the Pulsar Standalone c | `pulsarStandalone.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | | `pulsarStandalone.service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to lb (if supported) | `[]` | | `pulsarStandalone.service.externalIPs` | Service external IP addresses | `[]` | +| `pulsarStandalone.persistence.enabled` | Use persistent volume to store Pulsar standalone data | `true` | +| `pulsarStandalone.persistence.mountPath` | Pulsar standalone data persistence volume mount path | `/var/lib/milvus` | +| `pulsarStandalone.persistence.annotations` | PersistentVolumeClaim annotations | `{}` | +| `pulsarStandalone.persistence.persistentVolumeClaim.existingClaim` | Use your own data Persistent Volume existing claim name | `unset` | +| `pulsarStandalone.persistence.persistentVolumeClaim.storageClass` | The Pulsar standalone data Persistent Volume Storage Class | `unset` | +| `pulsarStandalone.persistence.persistentVolumeClaim.accessModes` | The Pulsar standalone data Persistence access modes | `ReadWriteOnec` | +| `pulsarStandalone.persistence.persistentVolumeClaim.size` | The size of Pulsar standalone data Persistent Volume Storage Class | `5Gi` | +| `pulsarStandalone.persistence.persistentVolumeClaim.subPath` | SubPath for Pulsar standalone data mount | `unset` | ### Pulsar Configuration diff --git a/charts/milvus/templates/config.tpl b/charts/milvus/templates/config.tpl index 7ba1078..69c89cb 100644 --- a/charts/milvus/templates/config.tpl +++ b/charts/milvus/templates/config.tpl @@ -111,11 +111,7 @@ dataNode: log: level: {{ .Values.log.level }} file: -{{- if .Values.logsPersistence.enabled }} - rootPath: {{ .Values.logsPersistence.mountPath }} -{{- else }} rootPath: "" -{{- end }} maxSize: {{ .Values.log.file.maxSize }} maxAge: {{ .Values.log.file.maxAge }} maxBackups: {{ .Values.log.file.maxBackups }} diff --git a/charts/milvus/templates/datacoord-deployment.yaml b/charts/milvus/templates/datacoord-deployment.yaml index e77738d..6f768be 100644 --- a/charts/milvus/templates/datacoord-deployment.yaml +++ b/charts/milvus/templates/datacoord-deployment.yaml @@ -51,9 +51,6 @@ spec: mountPath: /milvus/configs/milvus.yaml subPath: milvus.yaml readOnly: true - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.dataCoordinator.nodeSelector }} nodeSelector: @@ -72,11 +69,4 @@ spec: - name: milvus-config configMap: name: {{ template "milvus.fullname" . }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/datanode-deployment.yaml b/charts/milvus/templates/datanode-deployment.yaml index 603ef98..5da7871 100644 --- a/charts/milvus/templates/datanode-deployment.yaml +++ b/charts/milvus/templates/datanode-deployment.yaml @@ -51,9 +51,6 @@ spec: mountPath: /milvus/configs/milvus.yaml subPath: milvus.yaml readOnly: true - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.dataNode.nodeSelector }} nodeSelector: @@ -72,11 +69,4 @@ spec: - name: milvus-config configMap: name: {{ template "milvus.fullname" . }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/indexcoord-deployment.yaml b/charts/milvus/templates/indexcoord-deployment.yaml index 79d0947..b2f2b49 100644 --- a/charts/milvus/templates/indexcoord-deployment.yaml +++ b/charts/milvus/templates/indexcoord-deployment.yaml @@ -51,9 +51,6 @@ spec: mountPath: /milvus/configs/milvus.yaml subPath: milvus.yaml readOnly: true - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.indexCoordinator.nodeSelector }} nodeSelector: @@ -72,11 +69,4 @@ spec: - name: milvus-config configMap: name: {{ template "milvus.fullname" . }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/indexnode-deployment.yaml b/charts/milvus/templates/indexnode-deployment.yaml index 1053abf..6f6d3af 100644 --- a/charts/milvus/templates/indexnode-deployment.yaml +++ b/charts/milvus/templates/indexnode-deployment.yaml @@ -51,9 +51,6 @@ spec: mountPath: /milvus/configs/milvus.yaml subPath: milvus.yaml readOnly: true - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.indexNode.nodeSelector }} nodeSelector: @@ -72,11 +69,4 @@ spec: - name: milvus-config configMap: name: {{ template "milvus.fullname" . }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/proxy-deployment.yaml b/charts/milvus/templates/proxy-deployment.yaml index 5a7afac..0e8b00f 100644 --- a/charts/milvus/templates/proxy-deployment.yaml +++ b/charts/milvus/templates/proxy-deployment.yaml @@ -51,9 +51,6 @@ spec: mountPath: /milvus/configs/milvus.yaml subPath: milvus.yaml readOnly: true - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.proxy.nodeSelector }} nodeSelector: @@ -72,11 +69,4 @@ spec: - name: milvus-config configMap: name: {{ template "milvus.fullname" . }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/pulsar-standalone-deployment.yaml b/charts/milvus/templates/pulsar-standalone-deployment.yaml index de0bf42..cfb2e33 100644 --- a/charts/milvus/templates/pulsar-standalone-deployment.yaml +++ b/charts/milvus/templates/pulsar-standalone-deployment.yaml @@ -47,6 +47,10 @@ spec: protocol: TCP resources: {{- toYaml .Values.pulsarStandalone.resources | nindent 10 }} + volumeMounts: + - name: milvus-pulsar-disk + mountPath: {{ .Values.pulsarStandalone.persistence.mountPath | quote }} + subPath: {{ .Values.pulsarStandalone.persistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.pulsarStandalone.nodeSelector }} nodeSelector: @@ -60,4 +64,13 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + + volumes: + - name: milvus-pulsar-disk + {{- if .Values.pulsarStandalone.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Values.pulsarStandalone.persistence.persistentVolumeClaim.existingClaim | default (printf "%s-pulsar" (include "milvus.fullname" . | trunc 58)) }} + {{- else }} + emptyDir: {} + {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/pvc.yaml b/charts/milvus/templates/pvc.yaml index b073d2d..edaf67a 100644 --- a/charts/milvus/templates/pvc.yaml +++ b/charts/milvus/templates/pvc.yaml @@ -1,10 +1,11 @@ -{{- $pvc := .Values.logsPersistence.persistentVolumeClaim -}} -{{- if and .Values.logsPersistence.enabled (not $pvc.existingClaim) }} +{{- if not .Values.cluster.enabled }} +{{- $pvc := .Values.standalone.persistence.persistentVolumeClaim -}} +{{- if and .Values.standalone.persistence.enabled (not $pvc.existingClaim) }} apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ printf "%s-logs" (include "milvus.fullname" . | trunc 58)}} -{{- with .Values.logsPersistence.annotations }} + name: {{ printf "%s" (include "milvus.fullname" . | trunc 58)}} +{{- with .Values.standalone.persistence.annotations }} annotations: {{ toYaml . | indent 4 }} {{- end }} @@ -24,17 +25,14 @@ spec: requests: storage: {{ $pvc.size }} {{- end }} - -{{- if not .Values.cluster.enabled }} -{{- $pvc := .Values.persistence.persistentVolumeClaim -}} -{{- if and .Values.persistence.enabled (not $pvc.existingClaim) }} ---- - +{{- else }} +{{- $pvc := .Values.pulsarStandalone.persistence.persistentVolumeClaim -}} +{{- if and .Values.pulsarStandalone.persistence.enabled (not $pvc.existingClaim) }} apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ printf "%s" (include "milvus.fullname" . | trunc 58)}} -{{- with .Values.persistence.annotations }} + name: {{ printf "%s-pulsar" (include "milvus.fullname" . | trunc 58)}} +{{- with .Values.pulsarStandalone.persistence.annotations }} annotations: {{ toYaml . | indent 4 }} {{- end }} diff --git a/charts/milvus/templates/querycoord-deployment.yaml b/charts/milvus/templates/querycoord-deployment.yaml index 6597b31..3f73545 100644 --- a/charts/milvus/templates/querycoord-deployment.yaml +++ b/charts/milvus/templates/querycoord-deployment.yaml @@ -51,9 +51,6 @@ spec: mountPath: /milvus/configs/milvus.yaml subPath: milvus.yaml readOnly: true - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.queryCoordinator.nodeSelector }} nodeSelector: @@ -72,11 +69,4 @@ spec: - name: milvus-config configMap: name: {{ template "milvus.fullname" . }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/querynode-deployment.yaml b/charts/milvus/templates/querynode-deployment.yaml index 41a7699..ce15126 100644 --- a/charts/milvus/templates/querynode-deployment.yaml +++ b/charts/milvus/templates/querynode-deployment.yaml @@ -51,9 +51,6 @@ spec: mountPath: /milvus/configs/milvus.yaml subPath: milvus.yaml readOnly: true - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.queryNode.nodeSelector }} nodeSelector: @@ -72,11 +69,4 @@ spec: - name: milvus-config configMap: name: {{ template "milvus.fullname" . }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/rootcoord-deployment.yaml b/charts/milvus/templates/rootcoord-deployment.yaml index 713376b..83dc961 100644 --- a/charts/milvus/templates/rootcoord-deployment.yaml +++ b/charts/milvus/templates/rootcoord-deployment.yaml @@ -51,9 +51,6 @@ spec: mountPath: /milvus/configs/milvus.yaml subPath: milvus.yaml readOnly: true - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.rootCoordinator.nodeSelector }} nodeSelector: @@ -72,11 +69,4 @@ spec: - name: milvus-config configMap: name: {{ template "milvus.fullname" . }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/milvus/templates/standalone-deployment.yaml b/charts/milvus/templates/standalone-deployment.yaml index 574a46c..71d1bc8 100644 --- a/charts/milvus/templates/standalone-deployment.yaml +++ b/charts/milvus/templates/standalone-deployment.yaml @@ -52,11 +52,8 @@ spec: subPath: milvus.yaml readOnly: true - name: milvus-data-disk - mountPath: {{ .Values.persistence.mountPath | quote }} - subPath: {{ .Values.persistence.persistentVolumeClaim.subPath | default "" }} - - name: milvus-logs-disk - mountPath: {{ .Values.logsPersistence.mountPath | quote }} - subPath: {{ .Values.logsPersistence.persistentVolumeClaim.subPath | default "" }} + mountPath: {{ .Values.standalone.persistence.mountPath | quote }} + subPath: {{ .Values.standalone.persistence.persistentVolumeClaim.subPath | default "" }} {{- with .Values.standalone.nodeSelector }} nodeSelector: @@ -76,16 +73,9 @@ spec: configMap: name: {{ template "milvus.fullname" . }} - name: milvus-data-disk - {{- if .Values.persistence.enabled }} + {{- if .Values.standalone.persistence.enabled }} persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.existingClaim | default (printf "%s" (include "milvus.fullname" . | trunc 58)) }} - {{- else }} - emptyDir: {} - {{- end }} - - name: milvus-logs-disk - {{- if .Values.logsPersistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }} + claimName: {{ .Values.standalone.persistence.persistentVolumeClaim.existingClaim | default (printf "%s" (include "milvus.fullname" . | trunc 58)) }} {{- else }} emptyDir: {} {{- end }} diff --git a/charts/milvus/values.yaml b/charts/milvus/values.yaml index 2f334dc..e9f09fc 100644 --- a/charts/milvus/values.yaml +++ b/charts/milvus/values.yaml @@ -51,6 +51,25 @@ ingress: # hosts: # - milvus-example.local +metrics: + enabled: true + + serviceMonitor: + # Set this to `true` to create ServiceMonitor for Prometheus operator + enabled: false + + # Additional labels that can be used so ServiceMonitor will be discovered by Prometheus + additionalLabels: {} + +log: + level: "debug" + file: + maxSize: 300 # MB + maxAge: 10 # day + maxBackups: 20 + dev: true + format: "text" # text/json + standalone: replicas: 1 # Run standalone mode with replication disabled resources: {} @@ -59,26 +78,26 @@ standalone: tolerations: [] extraEnv: [] -persistence: - mountPath: "/var/lib/milvus" - ## If true, alertmanager will create/use a Persistent Volume Claim - ## If false, use emptyDir - ## - enabled: true - annotations: {} - # helm.sh/resource-policy: keep - persistentVolumeClaim: - existingClaim: "" - ## milvus logs Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. + persistence: + mountPath: "/var/lib/milvus" + ## If true, alertmanager will create/use a Persistent Volume Claim + ## If false, use emptyDir ## - storageClass: - accessModes: ReadWriteOnce - size: 5Gi - subPath: "" + enabled: true + annotations: {} + # helm.sh/resource-policy: keep + persistentVolumeClaim: + existingClaim: "" + ## milvus logs Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. + ## + storageClass: + accessModes: ReadWriteOnce + size: 5Gi + subPath: "" proxy: enabled: true @@ -195,45 +214,26 @@ pulsarStandalone: labels: {} clusterIP: "" -metrics: - enabled: true - - serviceMonitor: - # Set this to `true` to create ServiceMonitor for Prometheus operator - enabled: false - - # Additional labels that can be used so ServiceMonitor will be discovered by Prometheus - additionalLabels: {} - -log: - level: "debug" - file: - maxSize: 300 # MB - maxAge: 10 # day - maxBackups: 20 - dev: true - format: "text" # text/json - -logsPersistence: - mountPath: "/var/logs/milvus" - ## If true, alertmanager will create/use a Persistent Volume Claim - ## If false, use emptyDir - ## - enabled: false - annotations: {} - # helm.sh/resource-policy: keep - persistentVolumeClaim: - existingClaim: "" - ## milvus logs Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. + persistence: + mountPath: "/pulsar/data" + ## If true, alertmanager will create/use a Persistent Volume Claim + ## If false, use emptyDir ## - storageClass: - accessModes: ReadWriteMany - size: 5Gi - subPath: "" + enabled: true + annotations: {} + # helm.sh/resource-policy: keep + persistentVolumeClaim: + existingClaim: "" + ## milvus logs Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. + ## + storageClass: + accessModes: ReadWriteOnce + size: 5Gi + subPath: "" ## Configuration values for the minio dependency ## ref: https://github.com/minio/charts/blob/master/README.md @@ -257,7 +257,7 @@ minio: existingClaim: "" storageClass: accessMode: ReadWriteOnce - size: 500Gi + size: 50Gi ## Configuration values for the etcd dependency ## ref: https://artifacthub.io/packages/helm/bitnami/etcd