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

Move TA config parsing to configmap manifest builder #3243

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

swiatekm
Copy link
Contributor

Description:
This is in preparation for the Target Allocator CRD. For that CRD, the Collector instance may be specified via a label or ownership relation. Therefore, we need to pull the necessary data from the Collector instance during TA config generation. It's more convenient to do this in all cases, which is what this change does.

No current behaviour should change as a result.

Link to tracking Issue(s): #2516

Testing:

Added tests for some new helper functions I introduced.

@swiatekm swiatekm added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Aug 29, 2024
@swiatekm swiatekm requested a review from a team August 29, 2024 16:11
Comment on lines +125 to +127
if len(taScrapeConfigs) > 0 {
scrapeConfigs = append(scrapeConfigs, taScrapeConfigs...)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of note – if someone just creates a targetallocator crd they no longer need to escape scrape configs... this may make it easier for us to use upstream libraries for parsing prometheus in the future.

@swiatekm swiatekm force-pushed the chore/move-config-parsing branch from 8e39997 to 069c2a1 Compare August 30, 2024 04:43
This is in preparation for the Target Allocator CRD. For that CRD, the
Collector instance may be specified via a label or ownership relation.
Therefore, we need to pull the necessary data from the Collector
instance during TA config generation. It's more convenient to do this in
all cases, which is what this change does.
@swiatekm swiatekm force-pushed the chore/move-config-parsing branch from 069c2a1 to b95e047 Compare August 30, 2024 04:43
@swiatekm swiatekm merged commit ef1306b into open-telemetry:main Aug 30, 2024
33 checks passed
@swiatekm swiatekm deleted the chore/move-config-parsing branch August 30, 2024 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants