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) {