jimmidyson / configmap-reload

Simple binary to trigger a reload when a Kubernetes ConfigMap is updated
Apache License 2.0
986 stars 193 forks source link

Support sending signals on file change #23

Open discordianfish opened 6 years ago

discordianfish commented 6 years ago

Since Kubernetes 1.11 it's possible to share the IPC namespace, allowing to send signals between containers. Since many services reload their config on a signal, e.g SIGHUP, it would make sense to add this to the configmap-reloader.

Specifically I like to reload fluentd on configmap change.

gofman8 commented 5 years ago

+1

jimmidyson commented 5 years ago

Great idea. Any thoughts on what flags would look like and how to figure out what process to send signal to?

andrewhowdencom commented 5 years ago

to the question specifically I would probably expect something like:

./bin pgrep 'nginx'

Or something. Bonus points - allow re-implementing pgrep semantics -- --user et. al.

Note: This is a substantial amount of work; this may have poor ROI.

zgfh commented 4 years ago

should we copy this ? https://github.com/lvelvis/nginx-config-reload

marcbachmann commented 4 years ago

I wrote my own script that supports custom shell scripts and therefore also signals. It uses md5-based file comparison to detect changes on files: https://hub.docker.com/r/livingdocs/file-change-hook

It's not really a solution for this tool, but it might help some people.

AkaiNoCat commented 3 years ago

1

sinacek commented 1 year ago

Is there any change, that will be implement this year?