diff --git a/charts/meilisearch/Chart.yaml b/charts/meilisearch/Chart.yaml index aaba6e7..8c2c3d8 100644 --- a/charts/meilisearch/Chart.yaml +++ b/charts/meilisearch/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "v0.29.0" description: A Helm chart for the Meilisearch search engine name: meilisearch -version: 0.1.42 +version: 0.1.43 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 7ca1e76..47f1ec7 100644 --- a/charts/meilisearch/README.md +++ b/charts/meilisearch/README.md @@ -54,6 +54,8 @@ helm uninstall | | | | `auth.existingMasterKeySecret` | Uses an existing secret that has the MEILI_MASTER_KEY set | `nil` | | | +| `envFrom` | Additional environment variables from ConfigMap or secrets | `[]` +| | | | `image.repository` | Meilisearch image name | `getmeili/meilisearch` | | | | `image.tag` | Meilisearch image tag | `{TAG_NAME}` @@ -61,7 +63,7 @@ helm uninstall | `image.pullPolicy` | Meilisearch image pull policy | `IfNotPresent` | | | | `image.pullSecret` | Secret to authenticate against the docker registry | '' | -| | | +| | | | `serviceAccount.create` | Should this chart create a service account | `true` | | | | `serviceAccount.annotations` | Additional annotations for created service account | `{}` @@ -102,6 +104,10 @@ helm uninstall | | | | `command` | Pod command | `[]` | | | +| `volumes` | Additional volumes for pod | `[]` +| | | +| `volumeMounts` | Additional volumes to mount on pod | `[]` +| | | | `tolerations` | Tolerations for pod assignment | `[]` | | | | `nodeSelector` | Node labels for pod assignment | `{}` diff --git a/charts/meilisearch/templates/statefulset.yaml b/charts/meilisearch/templates/statefulset.yaml index a5903f3..6e4cb8b 100644 --- a/charts/meilisearch/templates/statefulset.yaml +++ b/charts/meilisearch/templates/statefulset.yaml @@ -24,20 +24,30 @@ spec: imagePullSecrets: - name: {{ .Values.image.pullSecret }} {{- end }} - {{- if .Values.persistence.enabled }} + {{- if or .Values.persistence.enabled .Values.volumes }} volumes: + {{- if .Values.persistence.enabled }} - name: {{ .Values.persistence.volume.name }} persistentVolumeClaim: claimName: {{ include "meilisearch.fullname" . }} + {{- end }} + {{- if .Values.volumes }} +{{ toYaml .Values.volumes | indent 8 }} + {{- end }} {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.persistence.enabled }} + {{- if or .Values.persistence.enabled .Values.volumeMounts }} volumeMounts: + {{- if .Values.persistence.enabled }} - name: {{ .Values.persistence.volume.name }} mountPath: {{ .Values.persistence.volume.mountPath }} + {{- end }} + {{- if .Values.volumeMounts }} +{{ toYaml .Values.volumeMounts | indent 12 }} + {{- end }} {{- end }} envFrom: - configMapRef: @@ -46,6 +56,9 @@ spec: - secretRef: name: {{ template "secretMasterKeyName" . }} {{- end }} + {{- if .Values.envFrom }} +{{ toYaml .Values.envFrom | indent 10 }} + {{- end }} {{- if ne (len .Values.command) 0 }} command: {{ toYaml .Values.command | indent 12 }} diff --git a/charts/meilisearch/values.yaml b/charts/meilisearch/values.yaml index 934b09d..f5a3700 100644 --- a/charts/meilisearch/values.yaml +++ b/charts/meilisearch/values.yaml @@ -34,6 +34,8 @@ auth: # Use an existing Kubernetes secret for the MEILI_MASTER_KEY existingMasterKeySecret: "" +envFrom: [] + serviceAccount: # You can use a specific pre-created service account instead of # the one created by this chart. @@ -97,6 +99,10 @@ resources: {} # cpu: 100m # memory: 128Mi +volumes: [] + +volumeMounts: [] + nodeSelector: {} tolerations: []