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

Will opentelemetry-operator support prometheus CRDs, like ServiceMonitor #383

Closed
ifelseend opened this issue Aug 5, 2021 · 8 comments
Closed
Labels
area:target-allocator Issues for target-allocator

Comments

@ifelseend
Copy link

Hi, guys

It is hard to manager prometheus receiver configs when there are many scrape jobs.
I want to know is it a plan to support prometheus ServiceMonitor CRDs, so that we can manage prometheus receiver configs with a better way.

@jpkrohling
Copy link
Member

Perhaps a question for @alolita or @rakyll.

@Aneurysm9
Copy link
Member

This is definitely something we'd like to support. I added support upstream so that we could re-use the config generation logic from the Prometheus operator. I think the remaining work would be to cause the config reconciliation to happen when any of the *Monitor CRs are changed. Since I'm not sure that the collector handles hot config reloading well (or at all) it might make sense to filter such changes through the recently added target allocation mechanism. It does handle hot config reloads and separates the collector from target discovery.

@jpkrohling
Copy link
Member

Since I'm not sure that the collector handles hot config reloading well (or at all) it might make sense to filter such changes through the recently added target allocation mechanism. It does handle hot config reloads and separates the collector from target discovery.

The collector does not handle that. While I kinda understand why target allocator is doing that, I would rather do a regular Kubernetes rollout instead or restarting the container from the pod. This way, we protect the collector from crashing in case the config file can't be used (deprecated/new options).

@tejaswiniVadlamudi
Copy link

Does OTel Operator define its own CRDs and also support migration from Prometheus Operator CRDs to OTel CRDs?
or
Does OTel Operator support Prometheus Operator CRDs? => not inventing anything new

@secustor
Copy link
Member

Initially the second option is more likely as we can reuse code from PrometheusOperator and their CRDs are widely used in the K8 ecosystem.
A minimal implementation of this is right now under review. #653

@pavolloffay pavolloffay added the area:target-allocator Issues for target-allocator label Jan 31, 2022
@yuriolisa
Copy link
Contributor

@pavolloffay, @jpkrohling, @Aneurysm9, do you have any thoughts about that issue? I've seen there are many suggestions but I would like to define the way in which we are going to support the PRom CRDs.

@secustor
Copy link
Member

I don't think this has been written down in it's entirety yet.

The current implementation idea, is to support target discovery CRDs only ( PodMonitor, ServiceMonitor ). This part is already implemented in the TargetAllocator.
But to become fully functional the collector needs a way to discovery dynamically new jobs from the TargetAllocator which has been discussed here.
There is also a draft for this implementation at the collector, which is blocked till the next release of Prometheus. open-telemetry/opentelemetry-collector-contrib#8055
If this PR is accepted, then some config changes are necessary to the Collectors deployed by the Operator.

@secustor
Copy link
Member

secustor commented Nov 3, 2022

Solved in Release v0.61.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:target-allocator Issues for target-allocator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants