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.65k stars 511 forks source link

Coalescing changes in multiple configmaps #110

Open ankon opened 5 years ago

ankon commented 5 years ago

In our setup we have many services modelled as deployments, and each of them consumes settings from multiple configmaps and secrets (typically one for the "bigger picture" settings, and then one more specialized for the service itself).

We also roll-out changes in the kubernetes resources through our CI setup (Travis + https://github.com/Collaborne/kubernetes-bootstrap).

Together this leads to situations where multiple configmaps update at the same time, and reloader seems to trigger multiple redeployments. As an idea here: It could be nice to collect the updates for deployments for a short time, and only trigger a single redeployment.

(For a somewhat unrelated reason I actually implemented our own reloader now with that built-in and moved away from reloader, so this is merely a "might be interesting for you guys to think about" feedback issue.)

aliartiza75 commented 5 years ago

@ankon thank you for using reloader. I think you want a parameter to configure the config maps and secrets reload interval. Is this correct?

ankon commented 5 years ago

Modelling this as a "backoff", "cooldown period" or "reload interval" would be fitting I think, yes.

rasheedamir commented 5 years ago

@ankon can you please make a PR in Reloader for this feature? It will be very useful for the community

ankon commented 5 years ago

@ankon can you please make a PR in Reloader for this feature? It will be very useful for the community

It's quite hard for me to make a PR for reloader for this, because we're not using it anymore -- sorry for that.

The whole point of the issue here was actually to say: "We found reloader useful, but moved to another implementation that better fit into our environment -- still you might want to consider this piece as an idea".

rasheedamir commented 5 years ago

OK cool no problem; we will take care of your great suggestions and incorporate them in Reloader.