Commit a6b5c76
committed
fix(cleanup): restore the name-based sweep for pre-ADR-020 agent leftovers
An earlier commit on this branch replaced four name-based deletes (job, sa,
role, rolebinding named "aicr" in gpu-operator) with a label selector on
app.kubernetes.io/name=aicr,app.kubernetes.io/component=snapshot-agent.
Pre-branch objects never carried those labels: origin/main's
ensureServiceAccount, ensureRole and ensureRoleBinding set no Labels at all,
and its Job carried only app.kubernetes.io/name. So the block, still commented
"Legacy on-cluster agent leftovers from the older deployment pattern", swept
only current-run objects and no legacy one.
Both sweeps are now present. They cannot collide: a run-scoped name is always
"aicr-<run-id>", never the bare "aicr". The comment describes what the code
actually does.
The aicr-node-reader ClusterRole/ClusterRoleBinding lines are deliberately
untouched — whether to add a name-based delete for the legacy pair is a
separate decision.
Refs: ADR-020
Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>1 parent 9d8665a commit a6b5c76
1 file changed
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
354 | 364 | | |
355 | 365 | | |
356 | 366 | | |
357 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
358 | 372 | | |
359 | 373 | | |
360 | 374 | | |
| |||
0 commit comments