open-telemetry / opentelemetry-operator

Kubernetes Operator for OpenTelemetry Collector
Apache License 2.0
1.16k stars 412 forks source link

Determine better strategy for handling map merging for various fields #2947

Open jaronoff97 opened 3 months ago

jaronoff97 commented 3 months ago

Right now we have to manually clear maps for only the node selector in the mutate.go, but i'm sure there are other places where we shouldn't blindly merge things together.

Originally posted by @swiatekm-sumo in https://github.com/open-telemetry/opentelemetry-operator/pull/2941#pullrequestreview-2050424029

swiatekm commented 3 months ago

In reality, I think the logic here should be very simple. We should clear everything except labels and annotations, and even in their case I'm not completely convinced this is a good idea. It's another question whether this is actually straightforward to do with our current tooling.

jaronoff97 commented 3 months ago

Yeah maybe this is worth doing for everything... if anyone reading this wants to check it out do reach out!