Skip to content

Commit 8e78add

Browse files
kvapsclaude
andcommitted
feat(rbac): allow tenants to start/stop/restart their VMs
Grant the subresources.kubevirt.io virtualmachines/start|stop|restart "update" verb in cozy:tenant:use:base so the dashboard VM power controls work for tenant users (aggregates into admin/super-admin). Without it the actions return 403 even for tenant admins. Co-Authored-By: Claude <[email protected]> Signed-off-by: Andrei Kvapil <[email protected]>
1 parent d2bc261 commit 8e78add

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎packages/system/cozystack-basics/templates/clusterroles.yaml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,17 @@ rules:
156156
verbs:
157157
- get
158158
- update
159+
# Power controls (start/stop/restart) for VMs owned by the tenant.
160+
# Operational, like console/vnc above, so granted at the "use" level
161+
# (aggregates into admin and super-admin). Without these the dashboard
162+
# power buttons return 403 even for tenant admins.
163+
- apiGroups: ["subresources.kubevirt.io"]
164+
resources:
165+
- virtualmachines/start
166+
- virtualmachines/stop
167+
- virtualmachines/restart
168+
verbs:
169+
- update
159170
- apiGroups:
160171
- core.cozystack.io
161172
resources:

0 commit comments

Comments
 (0)