Commit 259462e
LOG-9424: Make legacy SCC role cleanup non-blocking
The cleanup of old {sa}-scc Role resources introduced in #3308 uses
k8sClient.List which goes through the namespace-scoped cache. When a
CLF is created in a namespace the cache has not yet indexed, the List
fails with "unknown namespace for the cache", blocking the entire
reconciliation and preventing collector workloads from being created.
Extract cleanup into a best-effort helper that logs errors instead of
returning them. The old role will be cleaned up on the next successful
reconciliation cycle.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ba8a51b commit 259462e
1 file changed
Lines changed: 16 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
31 | 41 | | |
32 | 42 | | |
33 | | - | |
34 | 43 | | |
35 | 44 | | |
36 | | - | |
| 45 | + | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | | - | |
40 | | - | |
41 | 49 | | |
42 | 50 | | |
43 | | - | |
44 | | - | |
| 51 | + | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | | - | |
55 | | - | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
0 commit comments