diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 541e27a7a..ed4b4ec0c 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -30,6 +30,12 @@ rules: - list - patch - watch +- apiGroups: + - "" + resources: + - persistentvolumeclaims/finalizers + verbs: + - update - apiGroups: - csiaddons.openshift.io resources: diff --git a/controllers/persistentvolumeclaim_controller.go b/controllers/persistentvolumeclaim_controller.go index 189e7c2f8..eaf5bd2b6 100644 --- a/controllers/persistentvolumeclaim_controller.go +++ b/controllers/persistentvolumeclaim_controller.go @@ -55,6 +55,7 @@ const ( ) //+kubebuilder:rbac:groups=core,resources=persistentvolumeclaims,verbs=get;list;watch;patch +//+kubebuilder:rbac:groups=core,resources=persistentvolumeclaims/finalizers,verbs=update //+kubebuilder:rbac:groups=csiaddons.openshift.io,resources=reclaimspacecronjobs,verbs=get;list;watch;create;delete;update // Reconcile is part of the main kubernetes reconciliation loop which aims to