[cozystack-controller] Clusterwide read perms

In an earlier patch the Cozystack controller now reads arbitrary objects
in the cluster to establish the lineage of any created pod, service,
pvc, or secret. These objects may be created by various other
controllers, so in general, the controller now requires read permissions
on arbitrary objects in the cluster.

```release-note
[cozystack-controler] Fix an RBAC error that prevented the workload
labelling feature from working.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This commit is contained in:
Timofei Larkin
2025-09-15 18:49:33 +03:00
parent 08b5217b72
commit f2cfb4f870

View File

@@ -3,9 +3,6 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cozystack-controller
rules:
- apiGroups: [""]
resources: ["configmaps", "pods", "namespaces", "nodes", "services", "persistentvolumes", "persistentvolumeclaims"]
verbs: ["get", "watch", "list"]
- apiGroups: ['cozystack.io']
resources: ['*']
verbs: ['*']
@@ -15,6 +12,6 @@ rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch", "patch", "update"]
- apiGroups: ["apps"]
resources: ["deployments"]
- apiGroups: ['*']
resources: ['*']
verbs: ["get", "list", "watch"]