Skip to content

Commit cc4e98e

Browse files
authored
fix(x2a): remove blockOwnerDeletion on jobs (#2757)
Signed-off-by: Marek Libra <marek.libra@gmail.com>
1 parent 6e2525c commit cc4e98e

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-x2a-backend': patch
3+
---
4+
5+
Removed blockOwnerDeletion: true from the ownerReference in KubeService.ts. This field is unnecessary for our use case - it only controls whether the garbage collector should block deletion of the owner (Job) until the dependent (Secret) is removed first.

workspaces/x2a/plugins/x2a-backend/src/services/JobResourceBuilder.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ describe('JobResourceBuilder', () => {
410410
kind: 'Job',
411411
name: 'job-x2a-init-abc123',
412412
uid: 'test-uid-123',
413-
blockOwnerDeletion: true,
414413
};
415414

416415
it('should include source repository credentials', () => {

workspaces/x2a/plugins/x2a-backend/src/services/KubeService.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ describe('KubeService', () => {
285285
kind: 'Job',
286286
name: expect.stringMatching(/^job-x2a-init-/),
287287
uid: 'uid-123',
288-
blockOwnerDeletion: true,
289288
}),
290289
],
291290
}),
@@ -361,7 +360,6 @@ describe('KubeService', () => {
361360
kind: 'Job',
362361
name: expect.stringMatching(/^job-x2a-init-/),
363362
uid: 'uid-456',
364-
blockOwnerDeletion: true,
365363
});
366364
});
367365

workspaces/x2a/plugins/x2a-backend/src/services/KubeService.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ export class KubeService {
287287
kind: 'Job',
288288
name: k8sJobName,
289289
uid: jobUid,
290-
blockOwnerDeletion: true,
291290
};
292291

293292
try {

0 commit comments

Comments
 (0)