Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Commit 8275068

Browse files
Adding ability to create and use service account (#364)
Updating chart version and docs Signed-off-by: Travis Bickford <tbickford@shutterstock.com> Fixing README. Missed adding service account to aquery node deployment Signed-off-by: Travis Bickford <tbickford@shutterstock.com> Incorrect yaml location fro service account name Signed-off-by: Travis Bickford <tbickford@shutterstock.com> updating readme Signed-off-by: Travis Bickford <tbickford@shutterstock.com> updating readme Signed-off-by: Travis Bickford <tbickford@shutterstock.com> updating readme Signed-off-by: Travis Bickford <tbickford@shutterstock.com> updating readme Signed-off-by: Travis Bickford <tbickford@shutterstock.com> Bumping version Bumping version Signed-off-by: Travis Bickford <tbickford@shutterstock.com> Signed-off-by: Travis Bickford <tbickford@shutterstock.com> Co-authored-by: Travis Bickford <tbickford@shutterstock.com>
1 parent 007e5a8 commit 8275068

14 files changed

+46
-2
lines changed

charts/milvus/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: milvus
33
appVersion: "2.1.4"
44
kubeVersion: "^1.10.0-0"
55
description: Milvus is an open-source vector database built to power AI applications and vector similarity search.
6-
version: 3.2.7
6+
version: 3.2.8
77
keywords:
88
- milvus
99
- elastic

charts/milvus/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ The following table lists the configurable parameters of the Milvus Service and
115115
| `ingress.labels` | Ingress labels | `{}` |
116116
| `ingress.hosts` | Ingress hostnames | `[]` |
117117
| `ingress.tls` | Ingress TLS configuration | `[]` |
118+
| `serviceAccount.create` | Create a custom service account | `false` |
119+
| `serviceAccount.name` | Service Account name | `milvus` |
120+
| `serviceAccount.annotations` | Service Account Annotations | `{}` |
121+
| `serviceAccount.labels` | Service Account labels | `{}` |
118122
| `metrics.enabled` | Export Prometheus monitoring metrics | `true` |
119123
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor for Prometheus operator | `false` |
120124
| `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `unset` |

charts/milvus/templates/_helpers.tpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,17 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
117117
{{ template "milvus.fullname" . }}-attu
118118
{{- end -}}
119119

120+
{{/*
121+
Create the name of the service account to use for the Milvus components
122+
*/}}
123+
{{- define "milvus.serviceAccount" -}}
124+
{{- if .Values.serviceAccount.create -}}
125+
{{ default "milvus" .Values.serviceAccount.name }}
126+
{{- else -}}
127+
{{ default "default" .Values.serviceAccount.name }}
128+
{{- end -}}
129+
{{- end -}}
130+
120131
{{/*
121132
Create milvus attu env name.
122133
*/}}

charts/milvus/templates/datacoord-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ spec:
3333
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3434
{{ include "milvus.ud.annotations" . | indent 8 }}
3535
spec:
36+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3637
{{- if .Values.image.all.pullSecrets }}
3738
imagePullSecrets:
3839
{{- range .Values.image.all.pullSecrets }}

charts/milvus/templates/datanode-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ spec:
3232
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3333
{{ include "milvus.ud.annotations" . | indent 8 }}
3434
spec:
35+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3536
{{- if .Values.image.all.pullSecrets }}
3637
imagePullSecrets:
3738
{{- range .Values.image.all.pullSecrets }}
@@ -138,7 +139,6 @@ spec:
138139
tolerations:
139140
{{ toYaml .Values.dataNode.tolerations | indent 8 }}
140141
{{- end }}
141-
142142
volumes:
143143
- name: milvus-config
144144
configMap:

charts/milvus/templates/indexcoord-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ spec:
3333
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3434
{{ include "milvus.ud.annotations" . | indent 8 }}
3535
spec:
36+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3637
{{- if .Values.image.all.pullSecrets }}
3738
imagePullSecrets:
3839
{{- range .Values.image.all.pullSecrets }}

charts/milvus/templates/indexnode-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ spec:
3131
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3232
{{ include "milvus.ud.annotations" . | indent 8 }}
3333
spec:
34+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3435
{{- if .Values.image.all.pullSecrets }}
3536
imagePullSecrets:
3637
{{- range .Values.image.all.pullSecrets }}

charts/milvus/templates/proxy-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ spec:
3232
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3333
{{ include "milvus.ud.annotations" . | indent 8 }}
3434
spec:
35+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3536
{{- if .Values.image.all.pullSecrets }}
3637
imagePullSecrets:
3738
{{- range .Values.image.all.pullSecrets }}

charts/milvus/templates/querycoord-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ spec:
3333
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3434
{{ include "milvus.ud.annotations" . | indent 8 }}
3535
spec:
36+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3637
{{- if .Values.image.all.pullSecrets }}
3738
imagePullSecrets:
3839
{{- range .Values.image.all.pullSecrets }}

charts/milvus/templates/querynode-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ spec:
3131
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3232
{{ include "milvus.ud.annotations" . | indent 8 }}
3333
spec:
34+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3435
{{- if .Values.image.all.pullSecrets }}
3536
imagePullSecrets:
3637
{{- range .Values.image.all.pullSecrets }}

charts/milvus/templates/rootcoord-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ spec:
3333
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3434
{{ include "milvus.ud.annotations" . | indent 8 }}
3535
spec:
36+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3637
{{- if .Values.image.all.pullSecrets }}
3738
imagePullSecrets:
3839
{{- range .Values.image.all.pullSecrets }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- if .Values.serviceAccount.create }}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "milvus.serviceAccount" . }}
6+
{{- if .Values.serviceAccount.annotations }}
7+
annotations:
8+
{{ toYaml .Values.serviceAccount.annotations | nindent 4 }}
9+
{{- end }}
10+
labels:
11+
{{ include "milvus.labels" . | indent 4 }}
12+
{{- with .Values.serviceAccount.labels }}
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
15+
{{- end }}

charts/milvus/templates/standalone-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ spec:
3333
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3434
{{ include "milvus.ud.annotations" . | indent 8 }}
3535
spec:
36+
serviceAccountName: {{ include "milvus.serviceAccount" . }}
3637
{{- if .Values.image.all.pullSecrets }}
3738
imagePullSecrets:
3839
{{- range .Values.image.all.pullSecrets }}

charts/milvus/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ ingress:
7575
# hosts:
7676
# - milvus-example.local
7777

78+
serviceAccount:
79+
create: false
80+
name:
81+
annotations:
82+
labels:
83+
7884
metrics:
7985
enabled: true
8086

0 commit comments

Comments
 (0)