Skip to content

Commit

Permalink
BUG/MINOR: s6: React to SIGUSR1 when pod is getting deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorunic committed Sep 15, 2022
1 parent ca59756 commit cf81f3a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fs/etc/services.d/ingress-controller/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/usr/bin/with-contenv sh

if [ ! -f /var/run/s6/services/.s6-svscan/SIGUSR1 ]; then
cat > /var/run/s6/services/.s6-svscan/SIGUSR1 <<EOF
#!/bin/sh
kill -SIGTERM 1
EOF
chmod +x /var/run/s6/services/.s6-svscan/SIGUSR1
fi

MEMLIMIT=$(free -m | awk '/Mem:/ {print int($2 / 3)}')

CG_LIMIT_FILE="/sys/fs/cgroup/memory/memory.limit_in_bytes"
Expand Down

0 comments on commit cf81f3a

Please sign in to comment.