Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fetch ConfigMaps and Secrets once per GrafanaContactPoint reconciliation #1828

Merged

Conversation

Baarsgaard
Copy link
Contributor

In order to maintain the functionality of valuesFrom on various CRDs, we're planning to disable caching entirely for ConfigMaps and Secrets in #1818
Referencing the ContactPoint Reconcile function during implementation of #1826 I noticed that buildSettings, which fetched referenced ConfigMaps and Secrets was called once per matched Grafana instance.
Which is not an issue when they are cached, but will cause unnecessary requests to the api-server afterwards.

While fixing this, I also added the InvalidSpec condition when buildContactPointSettings returns an error.

refactor: fetch ConfigMaps and Secrets once per reconcile
@Baarsgaard Baarsgaard force-pushed the reduce_api_reads_before_cache_tuning branch from 3de1f6a to cefc2a1 Compare January 16, 2025 21:59
@Baarsgaard Baarsgaard marked this pull request as ready for review January 16, 2025 22:05
@theSuess theSuess added the refactor this PR refactors code without introducing functionality label Jan 21, 2025
@theSuess theSuess enabled auto-merge January 21, 2025 11:34
@theSuess theSuess added this pull request to the merge queue Jan 21, 2025
Merged via the queue into grafana:master with commit 8bdd140 Jan 21, 2025
15 checks passed
@Baarsgaard Baarsgaard deleted the reduce_api_reads_before_cache_tuning branch January 21, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor this PR refactors code without introducing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants