jaeger-operator
jaeger-operator copied to clipboard
Jaeger Operator does not consider variables set via envFrom
Hey there.
When using the sidecar injection of the Jaeger Operator, it checks if the following environment variables are set:
-
JAEGER_SERVICE_NAME
-
JAEGER_PROPAGATION
https://github.com/jaegertracing/jaeger-operator/blob/bf1bc275353a0daf99dbebc7a65ea755cd7afaa1/pkg/inject/sidecar.go#L309
However, it only checks if the container spec template directly contains the environment variables.
We manage the environment variables in ConfigMaps which are included in the spec template using envFrom
.
The JAEGER_SERVICE_NAME
in the included ConfigMap is not detected, and the default value is set (
P.s.: Thanks for the awesome tools you are providing!
Would you like to work on a fix for this?
To be honest, I'm not quite sure how to implement that without messing up the structure.
As far as I can tell, the k8s client is only used in the controller itself right now. In order to access the content of the Secrets and ConfigMaps referenced in the envFrom
, we would need to fetch the referenced object in sidecar.go
, which doesn't seem like a clean approach to me.
Unfortunately I'm not very experienced with Go yet.
That's fair, thanks for considering it anyway!
Raised PR for this Issue.