Skip to content

Commit 328d981

Browse files
meili-bors[bot]zfalen-deloittebrunoocasali
authored
Merge #227
227: Add initContainer support r=brunoocasali a=zfalen # Pull Request ## Related issue Fixes #226 ## What does this PR do? - Enables support for `initContainers` consistent with enablement for `containers` and `volumes` etc ## Example I was able to create an `initContainer` pattern that pulled a `.dump` file from S3 and mounted it into the Meili pod using the following values: ``` initContainers: - name: aws-copy image: amazon/aws-cli envFrom: - configMapRef: name: env-with-s3-creds command: - "/bin/sh" - "-c" - aws s3 cp "s3://$S3_BUCKET/meilisearch_dumps" /meili_data/dumps --recursive volumeMounts: - name: meili-dumps mountPath: /meili_data/dumps volumes: - name: meili-dumps emptyDir: {} volumeMounts: - name: meili-dumps mountPath: /meili_data/dumps environment: MEILI_IMPORT_DUMP: /meili_data/dumps/myClonedDumpFile.dump MEILI_ENV: development MEILI_MASTER_KEY: someReallyCoolKeyAlsoWookiesRule MEILI_NO_ANALYTICS: true ``` ## 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? Thank you so much for contributing to Meilisearch! Co-authored-by: Zach Falen <zfalen@deloitte.com> Co-authored-by: Bruno Casali <brunoocasali@gmail.com> Co-authored-by: brunoocasali <brunoocasali@users.noreply.github.com>
2 parents f7efaf7 + 810904f commit 328d981

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

charts/meilisearch/Chart.yaml

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

charts/meilisearch/templates/statefulset.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ spec:
4646
{{- if .Values.volumes }}
4747
{{ toYaml .Values.volumes | indent 8 }}
4848
{{- end }}
49+
50+
{{ if .Values.initContainers }}
51+
initContainers:
52+
{{ toYaml .Values.initContainers | nindent 8 }}
53+
{{- end }}
54+
4955
containers:
5056
- name: {{ .Chart.Name }}
5157
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

charts/meilisearch/values.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ serviceAccount:
5555
# -- Should this chart create a service account
5656
create: true
5757
# -- Custom service account name, if not created by this chart
58-
name: ''
58+
name: ""
5959
# -- Additional annotations for created service account
6060
annotations: {}
6161

@@ -98,7 +98,8 @@ ingress:
9898
# -- Ingress ingressClassName
9999
className: nginx
100100
# -- Ingress annotations
101-
annotations: {}
101+
annotations:
102+
{}
102103
# kubernetes.io/ingress.class: nginx
103104
# -- Path within the host
104105
path: /
@@ -140,7 +141,8 @@ persistence:
140141
mountPath: /meili_data
141142

142143
# -- Resources allocation (Requests and Limits)
143-
resources: {}
144+
resources:
145+
{}
144146
# We usually recommend not to specify default resources and to leave this as a conscious
145147
# choice for the user. This also increases chances charts run on environments with little
146148
# resources, such as Minikube. If you do want to specify resources, uncomment the following
@@ -161,6 +163,9 @@ volumeMounts: []
161163
# -- Additional containers for pod
162164
containers: []
163165

166+
# -- Additional initContainers for pod
167+
initContainers: []
168+
164169
# -- Node labels for pod assignment
165170
nodeSelector: {}
166171

manifests/meilisearch.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ spec:
7575
app.kubernetes.io/component: search-engine
7676
app.kubernetes.io/part-of: meilisearch
7777
annotations:
78-
checksum/config: 468906c495caf47f44d906b3f928bbf1c5ee0fd11b345f9d07cbbc6d626b8fcf
78+
checksum/config: 35d680140fa9645374b032a4c6f416b2932bd677d97949691b714ece482ffa69
7979
spec:
8080
serviceAccountName: meilisearch
8181
securityContext:
@@ -89,6 +89,9 @@ spec:
8989
emptyDir: {}
9090
- name: data
9191
emptyDir: {}
92+
93+
94+
9295
containers:
9396
- name: meilisearch
9497
image: "getmeili/meilisearch:v1.7.0"

0 commit comments

Comments
 (0)