From c34b3ed08ff4125c8282069af886584ebd60d31d Mon Sep 17 00:00:00 2001 From: Artem Bortnikov Date: Wed, 12 Jun 2024 13:05:35 +0300 Subject: [PATCH] fix missing rbac rules Signed-off-by: Artem Bortnikov --- config/rbac/role.yaml | 14 ++++++++++++++ internal/controller/machine_controller.go | 2 ++ 2 files changed, 16 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 83646443..703b791e 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -31,6 +31,20 @@ rules: - ips/status verbs: - get +- apiGroups: + - metal.ironcore.dev + resources: + - inventories + verbs: + - get + - list + - watch +- apiGroups: + - metal.ironcore.dev + resources: + - inventories/status + verbs: + - get - apiGroups: - metal.ironcore.dev resources: diff --git a/internal/controller/machine_controller.go b/internal/controller/machine_controller.go index 7be81c86..18345921 100644 --- a/internal/controller/machine_controller.go +++ b/internal/controller/machine_controller.go @@ -26,6 +26,8 @@ import ( // +kubebuilder:rbac:groups=metal.ironcore.dev,resources=machines,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=metal.ironcore.dev,resources=machines/status,verbs=get;update;patch // +kubebuilder:rbac:groups=metal.ironcore.dev,resources=machines/finalizers,verbs=update +// +kubebuilder:rbac:groups=metal.ironcore.dev,resources=inventories,verbs=get;list;watch +// +kubebuilder:rbac:groups=metal.ironcore.dev,resources=inventories/status,verbs=get const ( MachineFieldOwner string = "metal.ironcore.dev/machine"