From 34baf982b8d5663b8d20cbc07b999a18176b1c2d Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Tue, 18 Jul 2023 08:25:19 +0300 Subject: [PATCH] operator: add missing IaaDevicePlugin finalizers RBAC Signed-off-by: Mikko Ylinen --- deployments/operator/rbac/role.yaml | 6 ++++++ pkg/controllers/iaa/controller.go | 1 + 2 files changed, 7 insertions(+) diff --git a/deployments/operator/rbac/role.yaml b/deployments/operator/rbac/role.yaml index fa675d530..d1d3c92f9 100644 --- a/deployments/operator/rbac/role.yaml +++ b/deployments/operator/rbac/role.yaml @@ -172,6 +172,12 @@ rules: - patch - update - watch +- apiGroups: + - deviceplugin.intel.com + resources: + - iaadeviceplugins/finalizers + verbs: + - update - apiGroups: - deviceplugin.intel.com resources: diff --git a/pkg/controllers/iaa/controller.go b/pkg/controllers/iaa/controller.go index 28b3914a0..34269b1db 100644 --- a/pkg/controllers/iaa/controller.go +++ b/pkg/controllers/iaa/controller.go @@ -41,6 +41,7 @@ const ( // +kubebuilder:rbac:groups=deviceplugin.intel.com,resources=iaadeviceplugins,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=deviceplugin.intel.com,resources=iaadeviceplugins/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=deviceplugin.intel.com,resources=iaadeviceplugins/finalizers,verbs=update // SetupReconciler creates a new reconciler for IaaDevicePlugin objects. func SetupReconciler(mgr ctrl.Manager, namespace string, withWebhook bool) error {