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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
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.

1 participant