Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix for sending SIGTERM to the main process when a spot interruption is detected.
os.ppid()
is not reliable inside a Sidecar due to nesting of subprocesses, so we need to instead pass the main process id via some other means. This PR does it with an environment variable.Also noteworthy is that because tasks running on Kubernetes have
termination_grace_period_seconds=0
, this makes graceful handling of SIGTERM impossible as the pod goes down immediately upon receiving it.Flow for testing with AWS FIS: