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

pull/1907/head
Aaron van Meerten 2 months ago committed by GitHub
parent b0675c0e24
commit e7cb0f4bca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      jvb/rootfs/etc/services.d/jvb/finish
  2. 11
      jvb/rootfs/opt/jitsi/shutdown.sh

@ -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

@ -1,8 +1,11 @@
#!/usr/bin/with-contenv bash
# notify the sidecar of imminent shutdown
PORT=${AUTOSCALER_SIDECAR_PORT:-6000}
curl -d '{}' -v 0:$PORT/hook/v1/shutdown
sleep 10
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

Loading…
Cancel
Save