feat(jvb): autoscaler sidecar shutdown hook on finish (#1906)

This commit is contained in:
Aaron van Meerten
2024-09-17 09:07:54 -05:00
committed by GitHub
parent b0675c0e24
commit e7cb0f4bca
2 changed files with 8 additions and 5 deletions

View File

@@ -5,5 +5,5 @@
# services and shutdown the container.
if [[ $1 -eq 0 ]]; then
s6-svscanctl -t /var/run/s6/services
/opt/jitsi/shutdown.sh
fi

View File

@@ -1,8 +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