Option for sidecar tasks to only be killed after main task #10340
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/task lifecycle
type/bug
Proposal
It would be useful to be able to configure a task group such that sidecar tasks, particularly Connect proxies, were not killed until the main task was killed.
Use-cases
I have a job that is essentially a deploy server for my Nomad cluster: it periodically checks for changes and submits jobs to Nomad, then watches for them to complete. When it's done, it publishes a report for the deploy to another service, which it reaches via Connect.
Because sometimes the deploy server itself has changes, the task for it has a large kill timeout (10m) so that it can finish the deploy it's performing before exiting and being replaced by a new version. But by the time it's ready to publish the report, the Connect proxy has already been killed, so the service it's trying to publish to is unreachable.
Attempted Solutions
The high kill_timeout is what I've found to address something like this, and if I wasn't using Connect for this piece, I would probably be good to go. I haven't been able to find an option in Nomad's docs for controlling the lifecycle of tasks within a group.
The text was updated successfully, but these errors were encountered: