1.2.1
⭐ New Features
-
Configuration Key Prefix Updated
- The configuration key prefix has been updated from
kubernetes.handler
tokubernetes.sigterm-handler
. - You can now manage handler-related settings using the new prefix in your configuration files.
- The configuration key prefix has been updated from
-
Termination Message Logging Feature Added
- Implemented functionality to log a termination message to a specified path when the application receives a SIGTERM signal.
- This allows Kubernetes environments to record and analyze the Pod's termination state and reason after receiving a SIGTERM signal.
- Termination messages can be configured with the following settings:
kubernetes: sigterm-handler: enabled: true # Enable or disable the handler (default: true) exit-code: 0 # Exit code to use upon termination (default: 0) termination-message-path: /dev/termination-log # Path to log the termination message (default: not set) termination-message: SIGTERM signal received... # Content of the termination message (default: SIGTERM signal received. Application has been terminated successfully.)
- After the application terminates, you can view the Pod's termination message using commands like
kubectl get pod
. Below is an example of the termination message:state: terminated: containerID: containerd://7935f0bcfd27b2d01f900029746261e0cdad8bcdbd5a7 exitCode: 0 finishedAt: "2024-11-29T20:22:26Z" message: SIGTERM signal received. Application has been terminated successfully. reason: Completed startedAt: "2024-11-29T20:20:42Z"
- Note: The default value for
terminationMessagePath
in Kubernetes is/dev/termination-log
. You can customize this path to log the termination message to a desired file location.
🔍 Test Enhancements
- Tests for Termination Message Path and Content Validation Added
- Added tests to verify that the correct termination message is logged to the specified path when the application terminates.
- These tests read and validate the content of the termination message file from within the container.
❤️ Contributors
-
Thank you to all the contributors for this release!
한국어 버전은 다음 링크에서 확인할 수 있습니다: 한국어 릴리스 노트 보기