mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
The ClusterRole that lets the kubevirt-csi controller get PersistentVolumes, and its ClusterRoleBinding, were named after the release only. They are cluster-scoped, and a release is named after the cluster, so two tenants with a cluster of the same name render the same pair. Installing the second one does not fail: the existing objects are patched and adopted. Deleting either cluster then deletes the pair, and the other cluster's CSI controller fails every ControllerExpandVolume with "persistentvolumes ... is forbidden" until its own release is upgraded again, so a PVC resize stays in Resizing. Name both objects after the namespace and the release, the way the kccm ClusterRole already is. On upgrade Helm creates the new pair before it deletes the old one, so the driver keeps its access. Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> Assisted-by: LLM
How to test packages local
cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd