From e4db82ee40bfc60702c70edd144f3596b3f5fd77 Mon Sep 17 00:00:00 2001 From: Saman Mahdanian Date: Sat, 15 Jun 2024 18:08:34 +0330 Subject: [PATCH] removing delete access from manager RBAC configs --- config/rbac/role.yaml | 1 - controllers/namespace_controller.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 3343c3f..6aed14d 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -35,7 +35,6 @@ rules: - appprojects verbs: - create - - delete - get - list - patch diff --git a/controllers/namespace_controller.go b/controllers/namespace_controller.go index 021986f..759069c 100644 --- a/controllers/namespace_controller.go +++ b/controllers/namespace_controller.go @@ -142,7 +142,7 @@ func (c *SafeNsCache) InitOrPass(r *NamespaceReconciler, ctx context.Context) er //+kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=core,resources=namespaces/status,verbs=get;update;patch //+kubebuilder:rbac:groups=core,resources=namespaces/finalizers,verbs=update -//+kubebuilder:rbac:groups=argoproj.io,resources=appprojects,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=argoproj.io,resources=appprojects,verbs=get;list;watch;create;update;patch // Reconcile is part of the main kubernetes reconciliation loop which aims to // move the current state of the cluster closer to the desired state.