piraeusdatastore / piraeus

High Available Datastore for Kubernetes
https://piraeus.io/
Apache License 2.0
454 stars 52 forks source link

docker: use "tini" when starting tlshd #165

Closed WanzenBug closed 10 months ago

WanzenBug commented 11 months ago

If a normal C program is started as PID 1, it will not have the default SIGTERM handler installed: instead the signal will be ignored. This means that during container shutdown, the container will run until forceful shutdown via SIGKILL.

To work around this issue, we use "tini", a tiny init system for containers to act as PID 1 in the container. This way, tlshd is started as PID 2 and gets the normal SIGTERM handling, as tini will forward these signals.

This is only needed for ktls-utils: