Closed thomaspaulin closed 1 year ago
How are you setting it? Directly as an environment variable or using a ConfigMap
?
Directly as an environment variable in the Dockerfile, then it's being overridden by the environment variables of the Deployment
The operator just takes into account the Kubernetes configuration. https://github.com/open-telemetry/opentelemetry-operator/blob/main/pkg/instrumentation/javaagent.go#L45-L53
It cannot check what is inside the container image.
Turns out the JAVA_TOOL_OPTIONS environment variable was set only in the Dockerfile, and not in the Deployment
resource. If I set it on the deployment it merges with the Open Telemetry agent as expected. As such I'll close this issue.
The Docker image I'm using uses
java -jar
as itsENTRYPOINT
such that the finalCMD
expects a jar file. In order to configure the JVM I'm passing values toJAVA_TOOL_OPTIONS
, but Otel overrides these with the-javaagent
per comments #1744 and #1135. Is there a way to combine the existing options with those Otel injects? From the issues on this repository (#1814 and #1393) it seems that's not yet the case.