diff --git a/charts/meilisearch/Chart.yaml b/charts/meilisearch/Chart.yaml index ea572f4..5bd5ec1 100644 --- a/charts/meilisearch/Chart.yaml +++ b/charts/meilisearch/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "v0.26.0" description: A Helm chart for the Meilisearch search engine name: meilisearch -version: 0.1.28 +version: 0.1.29 icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg home: https://github.com/meilisearch/meilisearch-kubernetes/charts maintainers: diff --git a/charts/meilisearch/README.md b/charts/meilisearch/README.md index babf0ba..3229a54 100644 --- a/charts/meilisearch/README.md +++ b/charts/meilisearch/README.md @@ -61,9 +61,13 @@ helm uninstall | `image.pullPolicy` | Meilisearch image pull policy | `IfNotPresent` | | | | `image.pullSecret` | Secret to authenticate against the docker registry | '' | -| | | -| `serviceAccount.annotations` | Additional annotations for service account | `{}` -| | | +| | | +| `serviceAccount.create` | Should this chart create a service account | `true` +| | | +| `serviceAccount.annotations` | Additional annotations for created service account | `{}` +| | | +| `serviceAccount.name` | Custom service account name, if not created by this chart | '' +| | | | `ingress.enabled` | Enable ingress controller resource | `false` | | | | `ingress.annotations` | Ingress annotations | `{}` diff --git a/charts/meilisearch/templates/serviceaccount.yaml b/charts/meilisearch/templates/serviceaccount.yaml index 46be803..dc35940 100644 --- a/charts/meilisearch/templates/serviceaccount.yaml +++ b/charts/meilisearch/templates/serviceaccount.yaml @@ -1,3 +1,4 @@ +{{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -14,3 +15,4 @@ metadata: annotations: {{ toYaml . | nindent 4 }} {{- end }} +{{- end }} diff --git a/charts/meilisearch/templates/statefulset.yaml b/charts/meilisearch/templates/statefulset.yaml index 1d5f99d..64d2673 100644 --- a/charts/meilisearch/templates/statefulset.yaml +++ b/charts/meilisearch/templates/statefulset.yaml @@ -30,7 +30,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ template "meilisearch.fullname" . }} + serviceAccountName: {{ .Values.serviceAccount.name | default (include "meilisearch.fullname" .) }} {{- if .Values.image.pullSecret }} imagePullSecrets: - name: {{ .Values.image.pullSecret }} diff --git a/charts/meilisearch/values.yaml b/charts/meilisearch/values.yaml index 461cdc7..be2db8b 100644 --- a/charts/meilisearch/values.yaml +++ b/charts/meilisearch/values.yaml @@ -35,6 +35,11 @@ auth: existingMasterKeySecret: "" serviceAccount: + # You can use a specific pre-created service account instead of + # the one created by this chart. + # Set create to false to prevent creating a service account and use your own. + create: true + name: '' annotations: {} podAnnotations: {}