Decommission the legacy standalone ceph-csi namespace #323
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The privilege audit found a standalone
ceph-csinamespace running a privileged CSI driver (csi-rbdplugin + provisioner) that is NOT in argocd-apps git and duplicates the managed csi-cephfs/csi-cephrbd deployments.Proposal
Acceptance
Assessment: STILL REQUIRED — but this is not an argocd-apps change
Verified against live cluster (read-only) + git
main.Legacy
ceph-csiis real, active, and unmanaged by Argo CDceph-csi(209d): privilegedcsi-rbdplugindaemonset 13/13 +csi-rbdplugin-provisioner3/3, driverrbd.csi.ceph.com.Applicationexists for it. It is owned by a k3s server-manifest Addon — ns carriesobjectset.rio.cattle.io/owner-gvk: k3s.cattle.io/v1, Kind=Addon,owner-name: ceph-csi-config,owner-namespace: kube-system.It duplicates / conflicts with the managed driver
csi-cephrbd(ceph-csi-rbd-csi-rbdplugin) also runs 13/13 and registers the same driverrbd.csi.ceph.comat the same kubelet path--kubelet-registration-path=/var/lib/kubelet/plugins/rbd.csi.ceph.com/csi.sock. Legacycsi-rbdpluginuses the identical--drivername=rbd.csi.ceph.com//var/lib/kubelet/plugins/rbd.csi.ceph.com— so the two node plugins race for the same per-node registration socket (last writer wins).rbd.csi.ceph.com,cephfs.csi.ceph.com; managedcsi-cephrbd/csi-cephfs(both in git underapps/*/csi-cephrbd,csi-cephfs, storage ApplicationSet) are authoritative.rbd.csi.ceph.com, 11 oncephfs.csi.ceph.com. Thepv.kubernetes.io/provisioned-byannotation is the driver name (not the namespace), so it can't attribute PVs to a specific provisioner deployment.Why no PR here
kubectl delete ns ceph-csialone will be reverted by the k3s addon reconciler. Decommission must be done at the k3s bootstrap layer, not argocd-apps:ceph-csi-config(/var/lib/rancher/k3s/server/manifests/…on the server node(s) — likely Puppet/terraform-k3s managed) and delete Addonceph-csi-configinkube-system.ceph-csiSAs: ClusterRoleBindingsceph-csi-rbd-csi-rbdplugin-provisioner,rbd-csi-nodeplugin,rbd-csi-provisioner-role.ceph-csi+ leftover ReplicaSetcsi-rbdplugin-provisioner-6796dff6f4.Safety before deletion (needs privileged access I don't have — leases are RBAC-forbidden to my read-only token): confirm the managed
csi-cephrbdprovisioner holds therbd.csi.ceph.comexternal-provisioner leader lease and its node plugins own the registration socket on all 13 nodes, then remove legacy so mounts/provisioning continue uninterrupted.Recommendation: keep open; assign to whoever owns the k3s server-manifest/bootstrap (Puppet or terraform-k3s). Nothing to change in argocd-apps — the managed replacement is already in place; this is purely removing the pre-migration k3s addon.