hashicorp / hashicorp/consul-template
Request adding 'action' for templates to specify using 'reload_signal' or 'kill_signal'
- Dominant language
- Go
- Stars
- 4.8k
- Forks
- 801
- Avg merge
- 4h 5m
- Merged PRs (30d)
- 6
Description
We actually use consul-template to start consul, but only some configs are listed in the Reloadable Configuration (https://www.consul.io/docs/agent/options.html#reloadable-configuration). Specifically, we render TLS certs and the main config file to rotate actl tokens but only the TLS certs are "reloadable". The simple solution is to allow a given template to specify whether to use the 'reload_signal' or 'kill_signal' after render the template.
The current workaround seems rather complicated. We must remove the 'reload_signal' so it defaults to killing and restarting the process, but use the 'command' setting on the TLS templates which executes a script to send the HUP signal to the consul process. The script needs to know the PID so we must implement a pidfile with consul configs. Again, it would be much easier to just have consul-template be able to use the alternate signal instead.
Contributor guide
Research direction
No source files or tests are named. Start by tracing how consul-template applies the global reload_signal and kill_signal settings after rendering a template, then inspect the template configuration path; done means each template can choose either signal while existing global behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100