diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 8e9bd634..cba0b7b1 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -22,6 +22,7 @@ rules: verbs: - get - list + - update - watch - apiGroups: - authentication.k8s.io @@ -105,3 +106,9 @@ rules: - get - patch - update +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - secrets/finalizers + verbs: + - update diff --git a/internal/controller/ionoscloudmachine_controller.go b/internal/controller/ionoscloudmachine_controller.go index becf72b3..0d0d3689 100644 --- a/internal/controller/ionoscloudmachine_controller.go +++ b/internal/controller/ionoscloudmachine_controller.go @@ -48,8 +48,10 @@ type IonosCloudMachineReconciler struct { //+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=ionoscloudmachines/status,verbs=get;update;patch //+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=ionoscloudmachines/finalizers,verbs=update +//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=secrets/finalizers,verbs=update + //+kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines;machines/status,verbs=get;list;watch -//+kubebuilder:rbac:groups="",resources=secrets;,verbs=get;list;watch +//+kubebuilder:rbac:groups="",resources=secrets;,verbs=get;list;watch;update //+kubebuilder:rbac:groups="",resources=events,verbs=get;list;watch;create;update;patch func (r *IonosCloudMachineReconciler) Reconcile(