Skip to content

Commit 10db0de

Browse files
Merge #150
150: Add possibility to mount volumes and specify envFrom to inject variables r=alallema a=pauldn-wttj # Pull Request ## Related issue Fixes #149 ## What does this PR do? - Add `volumes` values for additional volumes on pods - Add `volumeMounts` values to mount them on pods - Add `envFrom` values to specify potential secrets to inject in pods. Feedback welcome! I bumped the version to 0.1.43, let me know if that's not how you handle versioning. ## PR checklist Please check if your PR fulfills the following requirements: - [X] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [X] Have you read the contributing guidelines? - [X] Have you made sure that the title is accurate and descriptive of the changes? Co-authored-by: Paul de Nonancourt <paul.denonancourt@wttj.co>
2 parents 01d02a2 + 0d29812 commit 10db0de

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

charts/meilisearch/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: "v0.29.0"
33
description: A Helm chart for the Meilisearch search engine
44
name: meilisearch
5-
version: 0.1.42
5+
version: 0.1.43
66
icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg
77
home: https://github.com/meilisearch/meilisearch-kubernetes/charts
88
maintainers:

charts/meilisearch/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,16 @@ helm uninstall <your-service-name>
5454
| | |
5555
| `auth.existingMasterKeySecret` | Uses an existing secret that has the MEILI_MASTER_KEY set | `nil`
5656
| | |
57+
| `envFrom` | Additional environment variables from ConfigMap or secrets | `[]`
58+
| | |
5759
| `image.repository` | Meilisearch image name | `getmeili/meilisearch`
5860
| | |
5961
| `image.tag` | Meilisearch image tag | `{TAG_NAME}`
6062
| | |
6163
| `image.pullPolicy` | Meilisearch image pull policy | `IfNotPresent`
6264
| | |
6365
| `image.pullSecret` | Secret to authenticate against the docker registry | '' |
64-
| | |
66+
| | |
6567
| `serviceAccount.create` | Should this chart create a service account | `true`
6668
| | |
6769
| `serviceAccount.annotations` | Additional annotations for created service account | `{}`
@@ -102,6 +104,10 @@ helm uninstall <your-service-name>
102104
| | |
103105
| `command` | Pod command | `[]`
104106
| | |
107+
| `volumes` | Additional volumes for pod | `[]`
108+
| | |
109+
| `volumeMounts` | Additional volumes to mount on pod | `[]`
110+
| | |
105111
| `tolerations` | Tolerations for pod assignment | `[]`
106112
| | |
107113
| `nodeSelector` | Node labels for pod assignment | `{}`

charts/meilisearch/templates/statefulset.yaml

+15-2
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,30 @@ spec:
2424
imagePullSecrets:
2525
- name: {{ .Values.image.pullSecret }}
2626
{{- end }}
27-
{{- if .Values.persistence.enabled }}
27+
{{- if or .Values.persistence.enabled .Values.volumes }}
2828
volumes:
29+
{{- if .Values.persistence.enabled }}
2930
- name: {{ .Values.persistence.volume.name }}
3031
persistentVolumeClaim:
3132
claimName: {{ include "meilisearch.fullname" . }}
33+
{{- end }}
34+
{{- if .Values.volumes }}
35+
{{ toYaml .Values.volumes | indent 8 }}
36+
{{- end }}
3237
{{- end }}
3338
containers:
3439
- name: {{ .Chart.Name }}
3540
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
3641
imagePullPolicy: {{ .Values.image.pullPolicy }}
37-
{{- if .Values.persistence.enabled }}
42+
{{- if or .Values.persistence.enabled .Values.volumeMounts }}
3843
volumeMounts:
44+
{{- if .Values.persistence.enabled }}
3945
- name: {{ .Values.persistence.volume.name }}
4046
mountPath: {{ .Values.persistence.volume.mountPath }}
47+
{{- end }}
48+
{{- if .Values.volumeMounts }}
49+
{{ toYaml .Values.volumeMounts | indent 12 }}
50+
{{- end }}
4151
{{- end }}
4252
envFrom:
4353
- configMapRef:
@@ -46,6 +56,9 @@ spec:
4656
- secretRef:
4757
name: {{ template "secretMasterKeyName" . }}
4858
{{- end }}
59+
{{- if .Values.envFrom }}
60+
{{ toYaml .Values.envFrom | indent 10 }}
61+
{{- end }}
4962
{{- if ne (len .Values.command) 0 }}
5063
command:
5164
{{ toYaml .Values.command | indent 12 }}

charts/meilisearch/values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ auth:
3434
# Use an existing Kubernetes secret for the MEILI_MASTER_KEY
3535
existingMasterKeySecret: ""
3636

37+
envFrom: []
38+
3739
serviceAccount:
3840
# You can use a specific pre-created service account instead of
3941
# the one created by this chart.
@@ -97,6 +99,10 @@ resources: {}
9799
# cpu: 100m
98100
# memory: 128Mi
99101

102+
volumes: []
103+
104+
volumeMounts: []
105+
100106
nodeSelector: {}
101107

102108
tolerations: []

0 commit comments

Comments
 (0)