From cb08343f8a1d89db1af89f70c753373e34aa6177 Mon Sep 17 00:00:00 2001 From: samirtahir91 <30797145+samirtahir91@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:15:33 +0100 Subject: [PATCH] fix: Update rbac for deployments (#27) * fix: Update rbac for deployments * Update role.yaml --- config/rbac/role.yaml | 2 +- internal/controller/githubapp_controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d67e023..ec8ac60 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -5,7 +5,7 @@ metadata: name: manager-role rules: - apiGroups: - - "" + - "apps" resources: - deployments verbs: diff --git a/internal/controller/githubapp_controller.go b/internal/controller/githubapp_controller.go index 5dbe160..8d5b47e 100644 --- a/internal/controller/githubapp_controller.go +++ b/internal/controller/githubapp_controller.go @@ -64,7 +64,7 @@ const ( //+kubebuilder:rbac:groups=githubapp.samir.io,resources=githubapps/status,verbs=get;update;patch //+kubebuilder:rbac:groups=githubapp.samir.io,resources=githubapps/finalizers,verbs=update //+kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;update;create;delete;watch;patch -//+kubebuilder:rbac:groups="",resources=deployments,verbs=get;list;update;watch;patch +//+kubebuilder:rbac:groups="apps",resources=deployments,verbs=get;list;update;watch;patch // Reconcile function func (r *GithubAppReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {