triage-party icon indicating copy to clipboard operation
triage-party copied to clipboard

FR: Auto-Reload on config change

Open ameukam opened this issue 3 years ago • 2 comments

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.

ameukam avatar Sep 15 '20 15:09 ameukam

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.

tstromberg avatar Oct 06 '20 16:10 tstromberg

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.

eddiezane avatar Oct 13 '20 15:10 eddiezane