Probe and signal handler for servers running inside K8s clusters.
A startup probe is exposed at endpoint GET /ready
.
- The response status code will be
204
if the forge server reachedServerStartedEvent
,500
otherwise. - The response body is always empty.
A liveness probe is exposed at endpoint GET /live
.
- The response status code will be
204
if the server completed any ticks in last 5 seconds,500
otherwise. - The response body is always empty.
When received SIGTERM
, zprobe will prevent default shutdown hook from shutting down the server, and will wait GRACEFUL_PERIOD
seconds before shutting down the server. Notofications of the server going down will also be broadcasted to players connected to the server.
All configurations of zprobe are read from environmental variables.
Env: ZPROBE_LISTEN_PORT
Default: 35565
The TCP port where the probe http server will listen on.
Env: ZPROBE_GRACEFUL_PERIOD
Default: 30
How many seconds to wait before terminating the server after SIGTERM received.