-
-
Notifications
You must be signed in to change notification settings - Fork 153
Handling SIGTERM for Distributed and Standalone Mode #907
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
Conversation
|
Let's add in the same PR |
Dockerfile
Outdated
| WORKDIR /parseable | ||
|
|
||
| # Copy the static shell into base image. | ||
| COPY --from=builder /bin/sh /bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nitisht any specific reason for adding shell. Is it because image is distroless, i have been using Dockerfile.debug, so just want to confirm ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because distroless doesn't have any other shell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, but do we need a shell ? I mean wasn't shell for ${hostname}, container and app PID should be same.
I'lll check once if needed. If you see CMD will trigger the command itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can remove in that case
Dockerfile
Outdated
| WORKDIR /parseable | ||
|
|
||
| # Copy the static shell into base image. | ||
| COPY --from=builder /bin/sh /bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because distroless doesn't have any other shell.
Done |
|
TODO: to be tested with Dockerfile changes in cluster. |
|
Dockefile changes are testing. No shell copy needed. |
Handling of SIGTERM. This is needed for readiness probe to work, so whenever kubelet sends a SIGTERM to pod, readiness handler response unavailable, this way service will send no traffic to this pod.
This PR also makes sure actix drains HTTP connection before exiting.
Description
This PR has: