mirror of
https://github.com/lukaszraczylo/kubemirror.git
synced 2026-10-16 04:47:46 +00:00
perf(controller): stop per-target apiserver reads in mirror reconcile
The mirror reconcile path issued one direct apiserver GET per target namespace on every pass. With N sources and M target namespaces each resync produced N*M GET requests. On a 65-namespace cluster this generated 63 GET/s and overloaded one control-plane node. Changes: - reconcileMirror now trusts the informer cache. Content drift is detected via the source hash annotation. A stale resourceVersion makes Update return a conflict, which requeues the source. - The verify-source-freshness flag now defaults to false. The Helm chart passes the value explicitly, so the chart default of false matches the binary behaviour. - Reconcile performs one namespace LIST per pass. Target resolution and orphan cleanup share the result. - Add load regression tests that count direct API reads in the reconcile hot path.
This commit is contained in:
@@ -624,7 +624,7 @@ When running the binary directly:
|
||||
- `--rate-limit-qps float32` - API rate limit (default: 50.0)
|
||||
- `--rate-limit-burst int` - API burst limit (default: 100)
|
||||
- `--resync-period duration` - Full cache resync period (default: 10m)
|
||||
- `--verify-source-freshness` - Verify cache against a direct API read before mirroring (default: true)
|
||||
- `--verify-source-freshness` - Verify cache against a direct API read before mirroring (default: false)
|
||||
|
||||
**Namespace Filtering:**
|
||||
- `--excluded-namespaces string` - Comma-separated exclusion list
|
||||
|
||||
Reference in New Issue
Block a user