google / triage-party

🎉 Triage Party: massively multi-player GitHub triage 🎉
Apache License 2.0
504 stars 80 forks source link

FR: Auto-Reload on config change #211

Open ameukam opened 4 years ago

ameukam commented 4 years ago

It would great if triage-party can automatically reload whenever the ConfigMap is modified so that the pod doesn't need to be deleted and re-created.

tstromberg commented 3 years ago

Great idea. I think we can make this general enough so that it auto-reloads if the config file changes -- as config maps are seen as a flat file to Triage Party.

eddiezane commented 3 years ago

I took a look at this and I think there are two things to solve for here.

  1. Determine when the config changes.

This appears to be pretty easy. We can take a similar approach to what Caddy did with watching for the file modification time. Another option is to use fsnotify.

  1. Reload the application.

This looks more challenging and will require a bit of rework in the main server function and control logic for the goroutines.