Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible signal propagation #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kolbitsch-lastline
Copy link

Add a few more configuration options around signal handling:

  • allow specifying the "stop signal" to pass to the child process, in
    case the child does not happen to handle SIGTERM.
  • allow suppressing the exit code of the child process to 0 if the child
    does not gracefully exit when being stopped, but the caller needs that
    to happen (typically the case for k8s jobs).
    Since we happen to extend configurations, also allow enabling logging
    with timestamps, which had been set to off.

All configurations are optional and backwards compatible.

Add a few more configuration options around signal handling:
- allow specifying the "stop signal" to pass to the child process, in
  case the child does not happen to handle SIGTERM.
- allow suppressing the exit code of the child process to 0 if the child
  does not gracefully exit when being stopped, but the caller needs that
  to happen (typically the case for k8s jobs).
Since we happen to extend configurations, also allow enabling logging
with timestamps, which had been set to off.

All configurations are optional and backwards compatible.
We were unconditionally suppressing child process exit codes in case
KUBEXIT_SUPPRESS_STOPPED_EXITCODE was set. Ensure to only change the
exit code if stopping the child from kubexit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant