Skip to content

Conversation

@qixiang
Copy link
Contributor

@qixiang qixiang commented Dec 16, 2025

The previous implementation (58c7dbe) used APIReader to bypass the cache for infrequently accessed resources. This commit replaces that approach with controller-runtime's built-in cache configuration options.

For non-watched resources use DisableFor to prevent lazy informer creation when Client.Get/List is called. Without this, a single Get/List call would create a cluster-wide informer that caches ALL objects of that type.

For watched resources (DependencyUpdateCheck, Event, PipelineRun), use namespace-scoped caching to limit informers to the mintmaker namespace only. Also apply TransformStripManagedFields to reduce cached object size.

@snyk-io
Copy link

snyk-io bot commented Dec 16, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@qixiang qixiang changed the title Refactor: replace APIReader with cache configuration for memory optim… Refactor: replace APIReader with cache configuration for memory optimization Dec 16, 2025
@qixiang
Copy link
Contributor Author

qixiang commented Dec 16, 2025

This change needs to be validated in a cluster with a large number of components to properly verify whether it works. I plan to merge and deploy it after the new year and verify it in the p02 cluster.

@qixiang qixiang force-pushed the disable-cache branch 2 times, most recently from a4aa680 to df74e4f Compare January 5, 2026 02:50
…ization

The previous implementation (58c7dbe) used APIReader to bypass the
cache for infrequently accessed resources. This commit replaces that
approach with controller-runtime's built-in cache configuration options.

For non-watched resources use DisableFor to prevent lazy informer
creation when Client.Get/List is called. Without this, a single
Get/List call would create a cluster-wide informer that caches ALL
objects of that type.

For watched resources (DependencyUpdateCheck, Event, PipelineRun),
use namespace-scoped caching to limit informers to the mintmaker
namespace only. Also apply TransformStripManagedFields to reduce
cached object size.
@qixiang qixiang marked this pull request as ready for review January 5, 2026 03:34
@qixiang qixiang requested a review from a team as a code owner January 5, 2026 03:34
@qixiang qixiang merged commit b863644 into konflux-ci:main Jan 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants