cluster-registry-controller icon indicating copy to clipboard operation
cluster-registry-controller copied to clipboard

Multi namespaces cache

Open nishantapatil3 opened this issue 1 year ago • 0 comments

Q A
Bug fix? no
New feature? no
API breaks? no
Deprecations? no
Related tickets fixes memory issue in multicluster scenario
License Apache 2.0

What's in this PR?

Contains the changes required to limit namespace cache based on ResourceSyncRule rules.match.namespaces

  • Adds the functionality to init cache for all namespaces if no namespaces list is provided in RSR or init cache with namespaces from RSR
  • syncReconciler and managedController are updated to init cache from namespaces provided from RSR rules.match.namespaces

Why?

In larger cluster with namespaces more than 30-40, it was observed that CR-controller watches/caches all the namespaces into the mem, which caused frequent OOMKilled issue while attaching peer clusters. This PR allows users to select namespaces to cache for their RSR, there-by reducing memory usage.

Checklist

  • [x] Implementation tested
  • [x] User guide and development docs updated (if needed)

nishantapatil3 avatar Jul 05 '23 19:07 nishantapatil3