Skip to content

Commit d4ec618

Browse files
meili-bors[bot]Jens Schulzealallema
authored
Merge #173
173: feat: restart pods on config change r=alallema a=jensschulze Restart Meilisearch if the configmap has changed (see https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments) # Pull Request ## Related issue Fixes #172 ## What does this PR do? - The application Pods are being restarted if the ConfigMap changes. Thus the new values are picked up by the application Pods. ## 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: Jens Schulze <[email protected]> Co-authored-by: Amélie <[email protected]>
2 parents dbbe8d1 + efc5b98 commit d4ec618

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

charts/meilisearch/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: "v1.2.0"
33
description: A Helm chart for the Meilisearch search engine
44
name: meilisearch
5-
version: 0.1.55
5+
version: 0.1.56
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/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A Helm chart for the Meilisearch search engine
44

5-
![Version: 0.1.55](https://img.shields.io/badge/Version-0.1.55-informational?style=flat-square) ![AppVersion: v1.2.0](https://img.shields.io/badge/AppVersion-v1.2.0-informational?style=flat-square)
5+
![Version: 0.1.56](https://img.shields.io/badge/Version-0.1.56-informational?style=flat-square) ![AppVersion: v1.2.0](https://img.shields.io/badge/AppVersion-v1.2.0-informational?style=flat-square)
66

77
Helm works as a package manager to run pre-configured Kubernetes resources.
88

@@ -54,20 +54,20 @@ You can also use `auth.existingMasterKeySecret` to use an existing secret that h
5454

5555
| Key | Type | Default | Description |
5656
|-----|------|---------|-------------|
57-
| affinity | object | `{}` | Affinity for pod assignment |
57+
| affinity | object | `{}` | Affinity for pod assignment |
5858
| auth.existingMasterKeySecret | string | `""` | Use an existing Kubernetes secret for the MEILI_MASTER_KEY |
5959
| command | list | `[]` | Pod command |
6060
| container.containerPort | int | `7700` | |
6161
| containers | list | `[]` | Additional containers for pod |
6262
| customLabels | object | `{}` | Additional labels to add to all resources |
6363
| envFrom | list | `[]` | Additional environment variables from ConfigMap or secrets |
6464
| environment.MEILI_ENV | string | `"development"` | Sets the environment. Either **production** or **development** |
65-
| environment.MEILI_NO_ANALYTICS | bool | `true` | Deactivates analytics |
65+
| environment.MEILI_NO_ANALYTICS | bool | `true` | Deactivates analytics |
6666
| fullnameOverride | string | `""` | String to fully override meilisearch.fullname |
6767
| image.pullPolicy | string | `"IfNotPresent"` | Meilisearch image pull policy |
6868
| image.pullSecret | string | `nil` | Secret to authenticate against the docker registry |
69-
| image.repository | string | `"getmeili/meilisearch"` | Meilisearch image name |
70-
| image.tag | string | `"v1.2.0"` | Meilisearch image tag |
69+
| image.repository | string | `"getmeili/meilisearch"` | Meilisearch image name |
70+
| image.tag | string | `"v1.2.0"` | Meilisearch image tag |
7171
| ingress.annotations | object | `{}` | Ingress annotations |
7272
| ingress.className | string | `"nginx"` | Ingress ingressClassName |
7373
| ingress.enabled | bool | `false` | Enable ingress controller resource |
@@ -81,20 +81,20 @@ You can also use `auth.existingMasterKeySecret` to use an existing secret that h
8181
| persistence.accessMode | string | `"ReadWriteOnce"` | PVC Access Mode |
8282
| persistence.annotations | object | `{}` | Additional annotations for PVC |
8383
| persistence.enabled | bool | `false` | Enable persistence using PVC |
84-
| persistence.existingClaim | string | `""` | Existing PVC |
84+
| persistence.existingClaim | string | `""` | Existing PVC |
8585
| persistence.size | string | `"10Gi"` | PVC Storage Request |
8686
| persistence.storageClass | string | `"-"` | PVC Storage Class |
8787
| persistence.volume.mountPath | string | `"/meili_data"` | |
8888
| persistence.volume.name | string | `"data"` | |
8989
| podAnnotations | object | `{}` | |
9090
| readinessProbe.InitialDelaySeconds | int | `0` | |
9191
| readinessProbe.periodSeconds | int | `10` | |
92-
| replicaCount | int | `1` | Number of Meilisearch pods to run |
92+
| replicaCount | int | `1` | Number of Meilisearch pods to run |
9393
| resources | object | `{}` | Resources allocation (Requests and Limits) |
9494
| service | object | `{"annotations":{},"port":7700,"type":"ClusterIP"}` | Service HTTP port |
9595
| service.annotations | object | `{}` | Additional annotations for service |
9696
| service.type | string | `"ClusterIP"` | Kubernetes Service type |
97-
| serviceAccount.annotations | object | `{}` | Additional annotations for created service account |
97+
| serviceAccount.annotations | object | `{}` | Additional annotations for created service account |
9898
| serviceAccount.create | bool | `true` | Should this chart create a service account |
9999
| serviceAccount.name | string | `""` | Custom service account name, if not created by this chart |
100100
| startupProbe.InitialDelaySeconds | int | `1` | |

charts/meilisearch/templates/statefulset.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ spec:
1414
metadata:
1515
labels:
1616
{{- include "meilisearch.labels" . | nindent 8 }}
17-
{{- with .Values.podAnnotations }}
1817
annotations:
18+
checksum/config: {{ (include (printf "%s/configmap.yaml" $.Template.BasePath) .) | sha256sum }}
19+
{{- with .Values.podAnnotations }}
1920
{{- toYaml . | nindent 8 }}
20-
{{- end }}
21+
{{- end }}
2122
spec:
2223
serviceAccountName: {{ .Values.serviceAccount.name | default (include "meilisearch.fullname" .) }}
2324
{{- if .Values.image.pullSecret }}

manifests/meilisearch.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ spec:
7474
app.kubernetes.io/version: "v1.2.0"
7575
app.kubernetes.io/component: search-engine
7676
app.kubernetes.io/part-of: meilisearch
77+
annotations:
78+
checksum/config: 6f8c0a50a22feeb157b65cae3b297c42440124f48c9ce7f61af14696f4ec4d3a
7779
spec:
7880
serviceAccountName: meilisearch
7981
containers:

0 commit comments

Comments
 (0)