Allow to create ServiceMonitor for monitoring Collectors in a different namespace
Component(s)
collector
Is your feature request related to a problem? Please describe.
Hello,
Due to project standards, we create our ServiceMonitor in the same namespace as our prometheus-operator instance.
For most charts, we have an option to specify a different namespace where to create the ServiceMonitor.
However, the opentelemetry-operator creates a ServiceMonitor for each collector in the same namespace when spec.observability.metrics.enableMetrics is enabled.
Describe the solution you'd like
Ideally, the CRD should allow a spec.observability.metrics.namespace value that specify in which namespace to put the ServiceMonitor.
Describe alternatives you've considered
I'm using the opentelemetry-kube-stack. I could disable the automatic creation of ServiceMonitor, and create one per collector manually in opentelemetry-operator.extraManifests. This would however lead to duplication of configuration and complexify maintenance.
Additional context
No response