[patch] resoved jdbccfg stuck in deletion - #596
Open
sumitjain-1901 wants to merge 4 commits into
Open
sumitjain-1901 wants to merge 4 commits into
sumitjain-1901 wants to merge 4 commits into
Conversation
added 4 commits
September 9, 2026 15:30
sumitjain-1901
requested review from
amitpandey0217,
mnivedithaa and
rbinns
September 15, 2026 05:21
amitpandey0217
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue:
https://jsw.ibm.com/browse/MASCORE-13967
Root Cause & Fix
The PostDelete Job in postdelete-delete-db2-user_Job.yaml was broken in two ways
SA/Role/RoleBinding were PreSync hooks — ArgoCD deleted them immediately after provisioning, so the PostDelete Job had no RBAC when it ran during deprovisioning.
AWS credentials were injected via secretKeyRef: name: aws — the aws secret only exists in mas--syncres, not in mas--core where the Job runs, causing CreateContainerConfigError. Worse, the config repo passes sm_aws_access_key_id/sm_aws_secret_access_key as AVP path:arn:... placeholders; AVP resolves these at manifest-generation time, so if the upstream AWS SM secret is deleted (e.g. during deprovisioning), ArgoCD enters a permanent ComparisonError and deletion is completely blocked.
Fix: Changed SA/Role/RoleBinding to PostDelete hooks. Added a NetworkPolicy for egress. Replaced secretKeyRef env vars with a Role+RoleBinding PostDelete hook in mas--syncres granting the Job SA get on the aws secret, and moved credential reads to runtime inside the Job script via oc get secret aws -n ${SYNCRES_NS} — eliminating all AVP placeholders from the Job's env entirely.
Testing
Testing on inst1015

before:
after deletion:
