Commit 3dfdbc3
Handle SIGTERM in AMQP proxy for graceful pod termination
The Python AMQP proxy sidecar only handled KeyboardInterrupt (SIGINT),
not SIGTERM. Since kubelet sends SIGTERM to stop containers, the proxy
hung indefinitely preventing pod termination. Register a SIGTERM handler
that cancels all proxy tasks and catches the resulting CancelledError
during shutdown.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2a70e75 commit 3dfdbc3
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
909 | 910 | | |
910 | 911 | | |
911 | 912 | | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
912 | 919 | | |
913 | 920 | | |
914 | 921 | | |
915 | | - | |
| 922 | + | |
916 | 923 | | |
917 | 924 | | |
918 | 925 | | |
919 | 926 | | |
| 927 | + | |
920 | 928 | | |
921 | 929 | | |
922 | 930 | | |
| |||
0 commit comments