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"