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

Commit

Permalink
Adding ability to create and use service account (#364)
Browse files Browse the repository at this point in the history
Updating chart version and docs

Signed-off-by: Travis Bickford <[email protected]>

Fixing README. Missed adding service account to aquery node deployment

Signed-off-by: Travis Bickford <[email protected]>

Incorrect yaml location fro service account name

Signed-off-by: Travis Bickford <[email protected]>

updating readme

Signed-off-by: Travis Bickford <[email protected]>

updating readme

Signed-off-by: Travis Bickford <[email protected]>

updating readme

Signed-off-by: Travis Bickford <[email protected]>

updating readme

Signed-off-by: Travis Bickford <[email protected]>

Bumping version

Bumping version

Signed-off-by: Travis Bickford <[email protected]>

Signed-off-by: Travis Bickford <[email protected]>
Co-authored-by: Travis Bickford <[email protected]>
  • Loading branch information
tbickford and sstk-tbickford authored Oct 10, 2022
1 parent 007e5a8 commit 8275068
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 2 deletions.
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.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
Expand Down
4 changes: 4 additions & 0 deletions charts/milvus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
11 changes: 11 additions & 0 deletions charts/milvus/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/}}
Expand Down
1 change: 1 addition & 0 deletions charts/milvus/templates/datacoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/milvus/templates/datanode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -138,7 +139,6 @@ spec:
tolerations:
{{ toYaml .Values.dataNode.tolerations | indent 8 }}
{{- end }}

volumes:
- name: milvus-config
configMap:
Expand Down
1 change: 1 addition & 0 deletions charts/milvus/templates/indexcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions charts/milvus/templates/indexnode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions charts/milvus/templates/proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions charts/milvus/templates/querycoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions charts/milvus/templates/querynode-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions charts/milvus/templates/rootcoord-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
15 changes: 15 additions & 0 deletions charts/milvus/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
1 change: 1 addition & 0 deletions charts/milvus/templates/standalone-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/milvus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ ingress:
# hosts:
# - milvus-example.local

serviceAccount:
create: false
name:
annotations:
labels:

metrics:
enabled: true

Expand Down

0 comments on commit 8275068

Please sign in to comment.