diff --git a/charts/milvus/Chart.yaml b/charts/milvus/Chart.yaml index e111bde2..7e035207 100644 --- a/charts/milvus/Chart.yaml +++ b/charts/milvus/Chart.yaml @@ -3,7 +3,7 @@ name: milvus appVersion: "2.1.4" kubeVersion: "^1.10.0-0" description: Milvus is an open-source vector database built to power AI applications and vector similarity search. -version: 3.2.7 +version: 3.2.8 keywords: - milvus - elastic diff --git a/charts/milvus/README.md b/charts/milvus/README.md index c575178a..1844a364 100644 --- a/charts/milvus/README.md +++ b/charts/milvus/README.md @@ -115,6 +115,10 @@ The following table lists the configurable parameters of the Milvus Service and | `ingress.labels` | Ingress labels | `{}` | | `ingress.hosts` | Ingress hostnames | `[]` | | `ingress.tls` | Ingress TLS configuration | `[]` | +| `serviceAccount.create` | Create a custom service account | `false` | +| `serviceAccount.name` | Service Account name | `milvus` | +| `serviceAccount.annotations` | Service Account Annotations | `{}` | +| `serviceAccount.labels` | Service Account labels | `{}` | | `metrics.enabled` | Export Prometheus monitoring metrics | `true` | | `metrics.serviceMonitor.enabled` | Create ServiceMonitor for Prometheus operator | `false` | | `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `unset` | diff --git a/charts/milvus/templates/_helpers.tpl b/charts/milvus/templates/_helpers.tpl index ab6c27c4..e3d56db8 100644 --- a/charts/milvus/templates/_helpers.tpl +++ b/charts/milvus/templates/_helpers.tpl @@ -117,6 +117,17 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{ template "milvus.fullname" . }}-attu {{- end -}} +{{/* + Create the name of the service account to use for the Milvus components + */}} + {{- define "milvus.serviceAccount" -}} + {{- if .Values.serviceAccount.create -}} + {{ default "milvus" .Values.serviceAccount.name }} + {{- else -}} + {{ default "default" .Values.serviceAccount.name }} + {{- end -}} + {{- end -}} + {{/* Create milvus attu env name. */}} diff --git a/charts/milvus/templates/datacoord-deployment.yaml b/charts/milvus/templates/datacoord-deployment.yaml index 084d39fe..e121cdb7 100644 --- a/charts/milvus/templates/datacoord-deployment.yaml +++ b/charts/milvus/templates/datacoord-deployment.yaml @@ -33,6 +33,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} diff --git a/charts/milvus/templates/datanode-deployment.yaml b/charts/milvus/templates/datanode-deployment.yaml index c6cd9ff2..2a956477 100644 --- a/charts/milvus/templates/datanode-deployment.yaml +++ b/charts/milvus/templates/datanode-deployment.yaml @@ -32,6 +32,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} @@ -138,7 +139,6 @@ spec: tolerations: {{ toYaml .Values.dataNode.tolerations | indent 8 }} {{- end }} - volumes: - name: milvus-config configMap: diff --git a/charts/milvus/templates/indexcoord-deployment.yaml b/charts/milvus/templates/indexcoord-deployment.yaml index 1ff3503c..e1b217af 100644 --- a/charts/milvus/templates/indexcoord-deployment.yaml +++ b/charts/milvus/templates/indexcoord-deployment.yaml @@ -33,6 +33,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} diff --git a/charts/milvus/templates/indexnode-deployment.yaml b/charts/milvus/templates/indexnode-deployment.yaml index ed99aa8e..24aa6331 100644 --- a/charts/milvus/templates/indexnode-deployment.yaml +++ b/charts/milvus/templates/indexnode-deployment.yaml @@ -31,6 +31,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} diff --git a/charts/milvus/templates/proxy-deployment.yaml b/charts/milvus/templates/proxy-deployment.yaml index c9a03042..f59e99e9 100644 --- a/charts/milvus/templates/proxy-deployment.yaml +++ b/charts/milvus/templates/proxy-deployment.yaml @@ -32,6 +32,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} diff --git a/charts/milvus/templates/querycoord-deployment.yaml b/charts/milvus/templates/querycoord-deployment.yaml index 340065f6..6dfaee5b 100644 --- a/charts/milvus/templates/querycoord-deployment.yaml +++ b/charts/milvus/templates/querycoord-deployment.yaml @@ -33,6 +33,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} diff --git a/charts/milvus/templates/querynode-deployment.yaml b/charts/milvus/templates/querynode-deployment.yaml index 985b2535..52fbc63d 100644 --- a/charts/milvus/templates/querynode-deployment.yaml +++ b/charts/milvus/templates/querynode-deployment.yaml @@ -31,6 +31,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} diff --git a/charts/milvus/templates/rootcoord-deployment.yaml b/charts/milvus/templates/rootcoord-deployment.yaml index bf572d7f..3da4706d 100644 --- a/charts/milvus/templates/rootcoord-deployment.yaml +++ b/charts/milvus/templates/rootcoord-deployment.yaml @@ -33,6 +33,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} diff --git a/charts/milvus/templates/serviceaccount.yaml b/charts/milvus/templates/serviceaccount.yaml new file mode 100644 index 00000000..1ed37e15 --- /dev/null +++ b/charts/milvus/templates/serviceaccount.yaml @@ -0,0 +1,15 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "milvus.serviceAccount" . }} +{{- if .Values.serviceAccount.annotations }} + annotations: +{{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} + labels: +{{ include "milvus.labels" . | indent 4 }} +{{- with .Values.serviceAccount.labels }} + {{- toYaml . | nindent 4 }} +{{- 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 5b9092ec..5ce35295 100644 --- a/charts/milvus/templates/standalone-deployment.yaml +++ b/charts/milvus/templates/standalone-deployment.yaml @@ -33,6 +33,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} spec: + serviceAccountName: {{ include "milvus.serviceAccount" . }} {{- if .Values.image.all.pullSecrets }} imagePullSecrets: {{- range .Values.image.all.pullSecrets }} diff --git a/charts/milvus/values.yaml b/charts/milvus/values.yaml index ac249811..73566962 100644 --- a/charts/milvus/values.yaml +++ b/charts/milvus/values.yaml @@ -75,6 +75,12 @@ ingress: # hosts: # - milvus-example.local +serviceAccount: + create: false + name: + annotations: + labels: + metrics: enabled: true