open-telemetry / opentelemetry-operator

Kubernetes Operator for OpenTelemetry Collector
Apache License 2.0
1.19k stars 430 forks source link

[target-allocator] generates empty configmap for collectors. #1299

Closed awx-fuyuanchu closed 10 months ago

awx-fuyuanchu commented 1 year ago

I'm trying to deploy opentelemetry collectors using the opentelemetry operator to scrape Prometheus metrics and send metrics to remote storage using prometheusremotewrite exporter.

It worked when I used the most simple config. Just add scrap jobs to prometheus receiver and use prometheusremotewrite exporter to send metrics.

However, when I tried to set up the otel collector with target allocator, the target allocator didn't generate a proper configmap for collectors.

The configmap generated by the target allocator is called allocator-collector and this configmap only has one key "collector.yaml' with an empty value. Since the configmap is incorrect, the collector pod keeps restarting.

I suppose the target allocator will create a configmap for collectors using OpenTelemetryCollector.spec.config with receivers replaced.

jaronoff97 commented 12 months ago

Is this still happening or can i close this? I believe this was solved by a PR earlier this year.