Skip to content

Commit

Permalink
Add 'persistentvolumeclaims' access permission for exporter
Browse files Browse the repository at this point in the history
Following error messages are logged in ocs-metrics-exporter pod,
```
Failed to watch *v1.PersistentVolume: unable to sync list result: failed to get node name for pod: failed to get PVC openshift-storage/db-noobaa-db-pg-0: persistentvolumeclaims "db-noobaa-db-pg-0" is forbidden: User "system:serviceaccount:openshift-storage:ocs-metrics-exporter" cannot get resource "persistentvolumeclaims" in API group "" in the namespace "openshift-storage"
```
Adding 'persistentvolumeclaims' resource to the existing roles.

Signed-off-by: Arun Kumar Mohan <[email protected]>
  • Loading branch information
aruniiird committed Dec 13, 2023
1 parent e8d575d commit a8b610a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/storagecluster/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ const expectedMetricExporterRoleJSON = `
"rules":[
{
"apiGroups":[""],
"resources":["secrets","configmaps"],
"resources":["secrets","configmaps","persistentvolumeclaims"],
"verbs":["get","list","watch"]
},
{
Expand Down

0 comments on commit a8b610a

Please sign in to comment.