Add RBAC access to finalizers for the operator role (#515)

On Openshift, the operator failed with error

"\"submariner-gateway\" is forbidden: cannot set blockOwnerDeletion
if an ownerReference refers to a resource you can't set finalizers on"

Openshift enables OwnerReferencesPermissionEnforcement, so
in order to set blockOwnerDeletion for an object, the user needs
update permission for the finalizers subresource of the referenced
owner. In this case the owner is the Submariner object.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
This commit is contained in:
Thomas Pantelis authored and GitHub committed 2024-05-21 12:28:13 +03:00
1 parent 1b251e84cf
commit eb336236f3
1 file changed
+7
+7
View File
@@ -80,6 +80,13 @@ rules:
- get
- list
- watch
- apiGroups:
- submariner.io
resources:
- submariners/finalizers
- servicediscoveries/finalizers
verbs:
- update
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1