feat(jigasi): support graceful shutdown via sidecar (#1908)

This commit is contained in:
Aaron van Meerten
2024-09-18 13:06:24 -05:00
committed by GitHub
parent 5d40297c61
commit c5afcde7c2
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
#!/usr/bin/with-contenv bash
if [ -n "$AUTOSCALER_URL" ]; then
# notify the sidecar of imminent shutdown
PORT=${AUTOSCALER_SIDECAR_PORT:-6000}
curl -d '{}' -v 0:$PORT/hook/v1/shutdown
sleep 10
fi
# shutdown everything
s6-svscanctl -t /var/run/s6/services