You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a node container for which I use the env var NODE_OPTIONS
However, it is defined via a ConfigMap under containers[0].envFrom and not containers[0].env
The NodeJS auto instrumentation modifies the pod to and sets NODE_OPTIONS value under containers[0].env to the default value (--require /otel-auto-instrumentation/autoinstrumentation.js) instead of concatenating it like it should.
I have found [https://github.com//issues/1094](this issue). To my understanding, the operator checks only the containers.env property and not envFrom, which results in this conjestion.
Though I know I can manually set the NODE_OPTIONS env under containers.env and it would probably work, I need my env variables to be managed with envFrom, and I don't think overriding these vars is the right behaviour for the operator.
Steps to Reproduce
Create a NodeJS pod and a ConfigMap containing NODE_OPTIONS key and some value in it.
Instrument the pod using the operator auto instrumentation.
Expected Result
The instrumentation NODE_OPTIONS should be concatenated with mine.
Actual Result
The instrumentation NODE_OPTIONS overrides mine.
The text was updated successfully, but these errors were encountered:
We need to enable the --openssl-legacy-provider option for some of our services since when auto-instrumentation is enabled, legacy encryption/decryption algorithms don't work.
However, the NODE_OPTIONS environment variable is overridden by the injector, so we have to pass the option down to the node command manually inside the pod. Would be a lot better to have the NODE_OPTIONS env vars concatenated instead.
Our workaround was to define such variables directly in the POD's Env, not in EnvFrom ConfigMap, this is what OTEL Operator could read.
I prepared a fix for this in #3373. OTEL Operator is now able to see environment variables also in ConfigMaps and Secrets, so it can correctly append to it.
Description
I have a node container for which I use the env var
NODE_OPTIONS
However, it is defined via a ConfigMap under
containers[0].envFrom
and notcontainers[0].env
The NodeJS auto instrumentation modifies the pod to and sets
NODE_OPTIONS
value undercontainers[0].env
to the default value (--require /otel-auto-instrumentation/autoinstrumentation.js
) instead of concatenating it like it should.I have found [https://github.com//issues/1094](this issue). To my understanding, the operator checks only the
containers.env
property and notenvFrom
, which results in this conjestion.Though I know I can manually set the
NODE_OPTIONS
env undercontainers.env
and it would probably work, I need my env variables to be managed withenvFrom
, and I don't think overriding these vars is the right behaviour for the operator.Steps to Reproduce
Create a NodeJS pod and a ConfigMap containing
NODE_OPTIONS
key and some value in it.Instrument the pod using the operator auto instrumentation.
Expected Result
The instrumentation
NODE_OPTIONS
should be concatenated with mine.Actual Result
The instrumentation
NODE_OPTIONS
overrides mine.The text was updated successfully, but these errors were encountered: