Skip to content

Conversation

@rjeberhard
Copy link
Member

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.

@rjeberhard rjeberhard requested review from ankedia and doxiao December 19, 2022 15:46
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 19, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

83.9% 83.9% Coverage
0.0% 0.0% Duplication

Copy link
Member

@ankedia ankedia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jshum2479 jshum2479 left a 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"

@rjeberhard
Copy link
Member Author

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?

@rjeberhard
Copy link
Member Author

@jshum2479, I think I will resolve the duplication of the DEPLOYMENT_DIR env variable later so that I can get this in.

@rjeberhard rjeberhard merged commit e4fcd5b into main Dec 20, 2022
@rjeberhard rjeberhard deleted the stopmarker branch December 20, 2022 14:02
rjeberhard added a commit to rjeberhard/weblogic-kubernetes-operator that referenced this pull request Apr 14, 2023
…racle#3761)

* Proper shut down for operator and webhook; Have webhook delete VWC
robertpatrick pushed a commit that referenced this pull request Apr 26, 2023
…3761)

* Proper shut down for operator and webhook; Have webhook delete VWC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants