Skip to content

Commit

Permalink
⚡️ 빠른 pod 종료를 위한 trap 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanghyeondong committed Jul 9, 2024
1 parent bdf890b commit 80597d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/src/main/resources/scripts/ubuntu_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ for script_file in "$script_dir"/*.sh; do
fi
done

trap "echo 'SIGTERM received'; exit 0" SIGTERM
sleep infinity
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ spec:
cp -r /app/config /script
chmod +x /script/init.sh
/script/init.sh >> /script/log
tail -f /dev/null
trap "echo 'SIGTERM received'; exit 0" SIGTERM
sleep infinity
volumes:
- name: config
Expand Down

0 comments on commit 80597d1

Please sign in to comment.