stakater / Reloader

A Kubernetes controller to watch changes in ConfigMap and Secrets and do rolling upgrades on Pods with their associated Deployment, StatefulSet, DaemonSet and DeploymentConfig – [✩Star] if you're using it!
https://docs.stakater.com/reloader/
Apache License 2.0
7.46k stars 494 forks source link

Support restart of multiple services based on partial configmap ? #507

Open hajdukda opened 1 year ago

hajdukda commented 1 year ago

Hello,

Let's say we have multiple deployments referencing parts of a shared configmap (overlap only partially) via env:configMapRef.

Is there an option to configure reloader to only reload services referencing keys in map that were updated ?

Also is it possible to have a gradual restart policy spread over multiple deployments to not restart everyone of them at the same time?

i.e. After deploy1 is finished rotate deploy2, after deploy2 rotate deploy3 etc ?

MuneebAijaz commented 1 year ago

hi @hajdukda

  1. if a configmap changes, it will reload all the deployments watched by reloader in which that configmap is mentioned. We dont have the mechanism of targeting specific variables inside configmap.

  2. As of now, gradual restart policy isnt implemented in reloader.

However, we welcome PRs for both of these issues if someone would like to contribute.