opentelemetry-operator icon indicating copy to clipboard operation
opentelemetry-operator copied to clipboard

Allow to create ServiceMonitor for monitoring Collectors in a different namespace

Open sinux-l5d opened this issue 1 year ago • 0 comments

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

sinux-l5d avatar Apr 15 '25 13:04 sinux-l5d