From bc9e0bb195ef8f6d4c69d84a8e9112b0603fc92b Mon Sep 17 00:00:00 2001 From: Vince Prignano Date: Wed, 12 Jun 2019 17:09:50 -0700 Subject: [PATCH] Add patch to events rbac Signed-off-by: Vince Prignano --- config/rbac/rbac_role.yaml | 19 ++++++++++--------- pkg/controller/controller.go | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) 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 {