Skip to content

Commit c123a4b

Browse files
committed
CP/DP Split: handle kill signal
Problem: The data plane container was not properly handling the kill signal when the Pod was Terminated. Solution: Update the entrypoint to catch the proper signals.
1 parent a9f53ec commit c123a4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/entrypoint.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ handle_term() {
66
echo "received TERM signal"
77
echo "stopping nginx-agent ..."
88
kill -TERM "${agent_pid}" 2>/dev/null
9+
wait -n ${agent_pid}
910
echo "stopping nginx ..."
1011
kill -TERM "${nginx_pid}" 2>/dev/null
1112
}
1213

13-
trap 'handle_term' TERM
14+
trap 'handle_term' TERM QUIT
1415

1516
rm -rf /var/run/nginx/*.sock
1617

0 commit comments

Comments
 (0)