diff --git a/config/rbac/rbac_role.yaml b/config/rbac/rbac_role.yaml index 2c69c905a849..3b248988a96e 100644 --- a/config/rbac/rbac_role.yaml +++ b/config/rbac/rbac_role.yaml @@ -16,6 +16,16 @@ rules: - update - patch - delete +- apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + - create + - patch - apiGroups: - cluster.k8s.io resources: @@ -91,12 +101,3 @@ rules: - update - patch - delete -- apiGroups: - - "" - resources: - - events - verbs: - - get - - list - - watch - - create diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index f11d0d43d441..c71a824e8293 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -24,7 +24,7 @@ import ( var AddToManagerFuncs []func(manager.Manager) error // AddToManager adds all Controllers to the Manager -// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create +// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;patch func AddToManager(m manager.Manager) error { for _, f := range AddToManagerFuncs { if err := f(m); err != nil {