fix(x2a): job secrets to be owned by the job#2710
fix(x2a): job secrets to be owned by the job#2710mareklibra merged 1 commit intoredhat-developer:mainfrom
Conversation
|
This pull request adds a new top-level directory under |
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
Review Summary by QodoSet job secret ownerReference at creation time for proper garbage collection
WalkthroughsDescription• Set ownerReference on job secrets at creation time • Eliminates post-creation patching of secrets via read-replace • Ensures secrets are garbage-collected with their parent Job • Simplifies KubeService by removing setJobSecretOwnerReference method Diagramflowchart LR
A["Job Creation Flow"] --> B["Create Project Secret"]
B --> C["Create Job"]
C --> D["Build OwnerReference"]
D --> E["Create Job Secret with OwnerReference"]
E --> F["Secret Auto-Deleted with Job"]
File Changes1. workspaces/x2a/plugins/x2a-backend/src/services/JobResourceBuilder.ts
|
Code Review by Qodo
1. Empty ownerReference UID
|
f812012 to
c010132
Compare
Currently the secret is not ownwed by the job, so it was not deleted when the Job was GC. This align secrets with the jobs. FIX FLPATH-3555 Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
c010132 to
407c254
Compare
|
Review Summary by QodoSet ownerReferences on job secrets at creation time
WalkthroughsDescription• Job secrets now owned by parent Job for proper garbage collection • Moved ownerReference assignment from post-creation patching to secret creation • Reordered job creation workflow to create job before secret • Improved error handling with job cleanup on secret creation failure Diagramflowchart LR
A["Create Project Secret"] --> B["Create Job"]
B --> C["Extract Job UID"]
C --> D["Create Job Secret with ownerReference"]
D --> E["Job owns Secret for GC"]
F["Secret Creation Fails"] --> G["Delete Orphaned Job"]
File Changes1. workspaces/x2a/plugins/x2a-backend/src/services/JobResourceBuilder.ts
|
Code Review by Qodo
1. Empty ownerReference UID
|



Currently the secret is not ownwed by the job, so it was not deleted when the Job was GC.
This align secrets with the jobs.
FIX FLPATH-3555