Skip to content

Commit

Permalink
Merge #173
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
3 people authored Jun 7, 2023
2 parents dbbe8d1 + efc5b98 commit d4ec618
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 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: "v1.2.0"
description: A Helm chart for the Meilisearch search engine
name: meilisearch
version: 0.1.55
version: 0.1.56
icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg
home: https://github.com/meilisearch/meilisearch-kubernetes/tree/main/charts/meilisearch
maintainers:
Expand Down
16 changes: 8 additions & 8 deletions charts/meilisearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Helm chart for the Meilisearch search engine

![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)
![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)

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

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

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity for pod assignment |
| affinity | object | `{}` | Affinity for pod assignment |
| auth.existingMasterKeySecret | string | `""` | Use an existing Kubernetes secret for the MEILI_MASTER_KEY |
| command | list | `[]` | Pod command |
| container.containerPort | int | `7700` | |
| containers | list | `[]` | Additional containers for pod |
| customLabels | object | `{}` | Additional labels to add to all resources |
| envFrom | list | `[]` | Additional environment variables from ConfigMap or secrets |
| environment.MEILI_ENV | string | `"development"` | Sets the environment. Either **production** or **development** |
| environment.MEILI_NO_ANALYTICS | bool | `true` | Deactivates analytics |
| environment.MEILI_NO_ANALYTICS | bool | `true` | Deactivates analytics |
| fullnameOverride | string | `""` | String to fully override meilisearch.fullname |
| image.pullPolicy | string | `"IfNotPresent"` | Meilisearch image pull policy |
| image.pullSecret | string | `nil` | Secret to authenticate against the docker registry |
| image.repository | string | `"getmeili/meilisearch"` | Meilisearch image name |
| image.tag | string | `"v1.2.0"` | Meilisearch image tag |
| image.repository | string | `"getmeili/meilisearch"` | Meilisearch image name |
| image.tag | string | `"v1.2.0"` | Meilisearch image tag |
| ingress.annotations | object | `{}` | Ingress annotations |
| ingress.className | string | `"nginx"` | Ingress ingressClassName |
| ingress.enabled | bool | `false` | Enable ingress controller resource |
Expand All @@ -81,20 +81,20 @@ You can also use `auth.existingMasterKeySecret` to use an existing secret that h
| persistence.accessMode | string | `"ReadWriteOnce"` | PVC Access Mode |
| persistence.annotations | object | `{}` | Additional annotations for PVC |
| persistence.enabled | bool | `false` | Enable persistence using PVC |
| persistence.existingClaim | string | `""` | Existing PVC |
| persistence.existingClaim | string | `""` | Existing PVC |
| persistence.size | string | `"10Gi"` | PVC Storage Request |
| persistence.storageClass | string | `"-"` | PVC Storage Class |
| persistence.volume.mountPath | string | `"/meili_data"` | |
| persistence.volume.name | string | `"data"` | |
| podAnnotations | object | `{}` | |
| readinessProbe.InitialDelaySeconds | int | `0` | |
| readinessProbe.periodSeconds | int | `10` | |
| replicaCount | int | `1` | Number of Meilisearch pods to run |
| replicaCount | int | `1` | Number of Meilisearch pods to run |
| resources | object | `{}` | Resources allocation (Requests and Limits) |
| service | object | `{"annotations":{},"port":7700,"type":"ClusterIP"}` | Service HTTP port |
| service.annotations | object | `{}` | Additional annotations for service |
| service.type | string | `"ClusterIP"` | Kubernetes Service type |
| serviceAccount.annotations | object | `{}` | Additional annotations for created service account |
| serviceAccount.annotations | object | `{}` | Additional annotations for created service account |
| serviceAccount.create | bool | `true` | Should this chart create a service account |
| serviceAccount.name | string | `""` | Custom service account name, if not created by this chart |
| startupProbe.InitialDelaySeconds | int | `1` | |
Expand Down
5 changes: 3 additions & 2 deletions charts/meilisearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ spec:
metadata:
labels:
{{- include "meilisearch.labels" . | nindent 8 }}
{{- with .Values.podAnnotations }}
annotations:
checksum/config: {{ (include (printf "%s/configmap.yaml" $.Template.BasePath) .) | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name | default (include "meilisearch.fullname" .) }}
{{- if .Values.image.pullSecret }}
Expand Down
2 changes: 2 additions & 0 deletions manifests/meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ spec:
app.kubernetes.io/version: "v1.2.0"
app.kubernetes.io/component: search-engine
app.kubernetes.io/part-of: meilisearch
annotations:
checksum/config: 6f8c0a50a22feeb157b65cae3b297c42440124f48c9ce7f61af14696f4ec4d3a
spec:
serviceAccountName: meilisearch
containers:
Expand Down

0 comments on commit d4ec618

Please sign in to comment.