From bda8eba1217c94751c6d15895b7a3cd3dd69922d Mon Sep 17 00:00:00 2001 From: Justin Reagor Date: Fri, 20 Oct 2017 14:30:53 -0400 Subject: [PATCH] Update documentation to reflect config of special signal events --- docs/30-configuration/34-jobs.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/30-configuration/34-jobs.md b/docs/30-configuration/34-jobs.md index 239a10c5..92ccdb62 100644 --- a/docs/30-configuration/34-jobs.md +++ b/docs/30-configuration/34-jobs.md @@ -29,6 +29,15 @@ Additionally, jobs may react to these events: - `enterMaintenance`: published when the [control plane](./30-configuration/37-control-plane.md) is told to enter maintenance mode for the container. All jobs will be automatically deregistered from Consul when this happens, so you only want to react to this event if there is some other task to perform. - `exitMaintenance`: published when the [control plane](./30-configuration/37-control-plane.md) is told to exit maintenance mode for the container. +Finally, there are two special `source` values that can be used to trigger a job when ContainerPilot receives a UNIX signal. + +- `SIGHUP`: published when a ContainerPilot process receives the UNIX signal `SIGHUP`. +- `SIGUSR2`: published when a ContainerPilot process receives the UNIX signal `SIGUSR2`. + +Signal events come in handy when you need to kick off some type of special process (reloading configs, publishing debug info) inside a container. This type of external communication is only supported when running ContainerPilot within a Docker container running on a Docker host, or under the supervision of a scheduler like Nomad. + +Note: Either two signals can be sent to ContainerPilot acting as a PID 1 supervisor or its standalone worker process. + ## Configuration Job configurations include the following fields: