Skip to content

Commit 8c20b88

Browse files
committed
fix(cleanup): remove the pre-ADR-020 unlabeled cluster RBAC pair
Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>
1 parent a6b5c76 commit 8c20b88

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

docs/user/agent-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ metadata:
5050
namespace: gpu-operator
5151
labels:
5252
app.kubernetes.io/name: aicr
53-
app.kubernetes.io/component: snapshot
53+
app.kubernetes.io/component: Snapshot
5454
app.kubernetes.io/version: <aicr-version>
5555
data:
5656
snapshot.yaml: | # Complete snapshot YAML

tools/cleanup

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,17 @@ kc -n gpu-operator delete job aicr --ignore-not-found
369369
kc -n gpu-operator delete sa aicr --ignore-not-found
370370
kc -n gpu-operator delete role aicr --ignore-not-found
371371
kc -n gpu-operator delete rolebinding aicr --ignore-not-found
372+
# The pre-ADR-020 cluster-scoped pair, for the same reason: it was named
373+
# literally "aicr-node-reader" and carried no labels, so every selector above
374+
# misses it and the name-grep fallback ('/aicr-validator-|/aicr$') does not
375+
# match it either. Nothing else in the tree deletes it now that run-owned
376+
# names are "aicr-node-reader-<run-id>" — a later run no longer reclaims the
377+
# bare name — so without this it is a permanent orphan. That matters because a
378+
# leftover from `--discover-network` carries mutating grants (nodes: patch,
379+
# pods/exec: create, CRD and namespace create/delete). The exact-name delete
380+
# cannot touch a live run, whose name always carries a run-ID suffix.
381+
kc delete clusterrole aicr-node-reader --ignore-not-found
382+
kc delete clusterrolebinding aicr-node-reader --ignore-not-found
372383

373384
# Phase 3: Component CRDs.
374385
# Helm does NOT remove CRDs on uninstall — they must be deleted manually or a

0 commit comments

Comments
 (0)