Skip to content

Commit

Permalink
Add rbac roles for VolumeGroupReplications and Classes
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Gershkovich <[email protected]>
  • Loading branch information
ELENAGER committed Jun 13, 2024
1 parent b960f8d commit 06a3799
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
20 changes: 20 additions & 0 deletions config/dr-cluster/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,26 @@ rules:
- get
- list
- watch
- apiGroups:
- cache.storage.ramendr.io
resources:
- volumegroupreplicationclasses
verbs:
- get
- list
- watch
- apiGroups:
- cache.storage.ramendr.io
resources:
- volumegroupreplications
verbs:
- create
- update
- delete
- get
- list
- watch
- patch
- apiGroups:
- storage.k8s.io
resources:
Expand Down
20 changes: 20 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,26 @@ rules:
- get
- list
- watch
- apiGroups:
- cache.storage.ramendr.io
resources:
- volumegroupreplicationclasses
verbs:
- get
- list
- watch
- apiGroups:
- cache.storage.ramendr.io
resources:
- volumegroupreplications
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- cluster.open-cluster-management.io
resources:
Expand Down
2 changes: 2 additions & 0 deletions controllers/volumereplicationgroup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ func filterPVC(reader client.Reader, pvc *corev1.PersistentVolumeClaim, log logr
// +kubebuilder:rbac:groups=ramendr.openshift.io,resources=volumereplicationgroups/finalizers,verbs=update
// +kubebuilder:rbac:groups=replication.storage.openshift.io,resources=volumereplications,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=replication.storage.openshift.io,resources=volumereplicationclasses,verbs=get;list;watch
// +kubebuilder:rbac:groups=cache.storage.ramendr.io,resources=volumegroupreplications,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=cache.storage.ramendr.io,resources=volumegroupreplicationclasses,verbs=get;list;watch
// +kubebuilder:rbac:groups=storage.k8s.io,resources=storageclasses,verbs=get;list;watch;create;update
// +kubebuilder:rbac:groups=storage.k8s.io,resources=volumeattachments,verbs=get;list;watch
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch
Expand Down

0 comments on commit 06a3799

Please sign in to comment.