Skip to content

Small helper utility to execute a bash command on a signal, e.g. for k8s sidecars.

License

Notifications You must be signed in to change notification settings

deinstapel/signal-cmd-executor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

signal-cmd-executor

This is a small helper utility that can e.g. run alongside kubernetes pods to execute certain actions when a program issues a signal.

Possible use cases include invoking complex curl commands when a SIGUSR1 is received.

Configuration

The program expects a config file in /etc/config.json, which may be overridden by setting the CONFIG_FILE env variable. A sample config can be found in config.json in this repository.

All commands are passed to /bin/bash -c "${command}", so all advanced bash features are available here.

The prebuilt image contains curl and wget and is alpine based, however, if you need extra software in your image, feel free to build your own image based off the one provided here.

About

Small helper utility to execute a bash command on a signal, e.g. for k8s sidecars.

Resources

License

Stars

Watchers

Forks

Releases

No releases published