meilisearch / meilisearch-kubernetes

Meilisearch on Kubernetes Helm charts and manifests
https://www.meilisearch.com
MIT License
212 stars 59 forks source link

Restart Meilisearch if the configuration has changed #172

Closed jensschulze closed 1 year ago

jensschulze commented 1 year ago

Description Helm is able to track changes in the ConfigMap via a checksum. This makes it possible to restart the application pods when configuration values change. This behavior is described in the [Helm docs].(https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments)

Basic example You want to change the log level.

Before:

environment:
  MEILI_ENV: development
  MEILI_LOG_LEVEL: WARN

After:

environment:
  MEILI_ENV: development
  MEILI_LOG_LEVEL: INFO

At the present time, the ConfigMap would change, but the application would not use the new value. You would have to roll out the StatefulSet again manually. This means there would be a discrepancy between the ConfigMap and the real state of the application until then.

It should be ensured that the application Pods restart thus picking up the new configuration values.