seaweedfs / seaweedfs-csi-driver

SeaweedFS CSI Driver https://github.com/seaweedfs/seaweedfs
Apache License 2.0
210 stars 50 forks source link

Helm Chart Might Be Missing RBAC Rule #152

Closed dpeckett closed 7 months ago

dpeckett commented 8 months ago

Installed the seaweedfs-csi-driver v1.1.8 Helm chart and attempted to create a Pod and a PVC.

Warning  FailedMount             106s (x11 over 7m59s)  kubelet                  MountVolume.SetUp failed for volume "pvc-bf914962-3edc-484e-b01f-d71f968745ed" : rpc error: code = Unknown desc = persistentvolumes "pvc-bf914962-3edc-484e-b01f-d71f968745ed" is forbidden: User "system:serviceaccount:seaweedfs:seaweedfs-csi-driver-node-sa" cannot get resource "persistentvolumes" in API group "" at the cluster scope

Was able to fix volume mounting by adding an additional RBAC rule to the driver-registrar-node-role ClusterRole:

- apiGroups:
  - ""
  resources:
  - persistentvolumes
  verbs:
  - get
  - list
  - watch
  - update
  - patch
spastorclovr commented 7 months ago

I can second that. Same issue solved by adding RBAC rule to driver-registrar-node-role. The weirdest thing being that I used to be able to mount PVC without any pb not so long ago without those permissions. Only when uninstall / install csi driver di I got the pb..

chrislusf commented 7 months ago

Someone sends a PR for this?

spastorclovr commented 7 months ago

Just did it right here https://github.com/seaweedfs/seaweedfs-csi-driver/pull/155

spastorclovr commented 7 months ago

Hey @chrislusf, Do you have an ETA for a new release including #155? It is pretty much a blocker right now if we wanna add it as a Helm dependency.

Thx :pray:

chrislusf commented 7 months ago

released v1.1.9