mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-18 20:17:04 +00:00
fix: add cache timeout for rbac controller (#2006)
fix: add cache timeout for rbac controller (#2006)
This commit is contained in:
@@ -48,6 +48,7 @@ func (r *Manager) SetupWithManager(ctx context.Context, mgr ctrl.Manager, ctrlCo
|
||||
crErr := ctrl.NewControllerManagedBy(mgr).
|
||||
Named("capsule/rbac/roles").
|
||||
For(&rbacv1.ClusterRole{}, namesPredicate).
|
||||
WithOptions(ctrlConfig.Runtime.ToControllerOptions()).
|
||||
Complete(r)
|
||||
if crErr != nil {
|
||||
err = errors.Join(err, crErr)
|
||||
@@ -78,6 +79,7 @@ func (r *Manager) SetupWithManager(ctx context.Context, mgr ctrl.Manager, ctrlCo
|
||||
r.handleSAChange(ctx, e.Object)
|
||||
},
|
||||
}).
|
||||
WithOptions(ctrlConfig.Runtime.ToControllerOptions()).
|
||||
Complete(r)
|
||||
if crbErr != nil {
|
||||
err = errors.Join(err, crbErr)
|
||||
|
||||
Reference in New Issue
Block a user