Skip to content

Commit

Permalink
Merge #108
Browse files Browse the repository at this point in the history
108: Allow specification of custom service account name r=alallema a=tuimz

And hide creation of service account behind a boolean (defaults to true to maintain compatibility)

# Pull Request

## What does this PR do?
Fixes #107 

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Tim Aerdts <tim@teaminova.nl>
  • Loading branch information
bors[bot] and Tim Aerdts authored Mar 27, 2022
2 parents c485436 + 29228d2 commit b361ea1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/meilisearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 7 additions & 3 deletions charts/meilisearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ helm uninstall <your-service-name>
| `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 | `{}`
Expand Down
2 changes: 2 additions & 0 deletions charts/meilisearch/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -14,3 +15,4 @@ metadata:
annotations:
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/meilisearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/meilisearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down

0 comments on commit b361ea1

Please sign in to comment.