-
Notifications
You must be signed in to change notification settings - Fork 216
Proper shut down for operator and webhook; Have webhook delete VWC #3761
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
…hookConfiguration to not strand resource
|
Kudos, SonarCloud Quality Gate passed! |
ankedia
left a comment
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.
LGTM
jshum2479
left a comment
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.
LGTM, though there are common script lines in several places. If they can refactor in common places then it will avoid future errors when changing one file without others.
DEPLOYMENT_DIR="/deployment"
SHUTDOWN_MARKER_FILE="${DEPLOYMENT_DIR}/marker.shutdown"
SHUTDOWN_COMPLETE_MARKER_FILE="${DEPLOYMENT_DIR}/marker.shutdown-complete"
@jshum2479, is there a good pattern for this? |
|
@jshum2479, I think I will resolve the duplication of the DEPLOYMENT_DIR env variable later so that I can get this in. |
…racle#3761) * Proper shut down for operator and webhook; Have webhook delete VWC
…3761) * Proper shut down for operator and webhook; Have webhook delete VWC








The initial idea was that the webhook should delete the ValidatingWebhookConfiguration during its shutdown so that this resource would not be stranded.
While working on that, I discovered that neither the webhook or operator were really cleanly shutting down -- that is, the runtime signal handler was never being called. Therefore, I put in a preStop handler and added handling to make sure that either process would get to complete its shutdown behavior before exiting.
Then, I added the handling to the webhook to delete the VWC.