-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collector fails to expand env vars when the value is an IPv6 address with trailing double colon #10605
Comments
Thanks for the detailed report @congiv. This is happening due to the fact that I was able to reproduce your issue locally and setting something like |
This may also be solved by #10603. |
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description <!-- Issue number if applicable --> Allow using strings parseable in YAML as `map[string]any` in inline position #### Link to tracking issue Relates to #10605 (does not fix it since it's not in inline position)
Relevant breaking changes in the collector that are addressed in this PR (from the [contribe releases](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases) and [collector release](https://github.com/open-telemetry/opentelemetry-collector/releases). > The otlpreceiver now uses localhost by default instead of 0.0.0.0. This may break the receiver in containerized environments like Kubernetes. If you depend on 0.0.0.0 disable the component.UseLocalHostAsDefaultHost feature gate or explicitly set the endpoint to 0.0.0.0 > confmap: When passing configuration for a string field using any provider, use the verbatim string representation as the value. (open-telemetry/opentelemetry-collector#10605, open-telemetry/opentelemetry-collector#10405) This matches the behavior of ${ENV} syntax prior to the promotion of the confmap.unifyEnvVarExpansion feature gate to beta. It changes the behavior of the ${env:ENV} syntax with escaped strings
Describe the bug
On startup, the collector fails to expand env vars when the value is an IPv6 address with trailing double colon. It treats the value as a map instead of a string.
Steps to reproduce
In my environment, I see this when the collector Pod's IPv6 address has a trailing double colon. Given
MY_POD_IP=1111:1111:1111:1111:1111::
, this fails to expand:If you don't have an environment where you can get a IPv6 Pod, you can also reproduce like so:
What did you expect to see?
The collector start successfully with its config expanded, regardless of whether the Pod's IPv6 address has a leading or trailing double colon.
What did you see instead?
What version did you use?
0.104.0
What config did you use?
Environment
Kubernetes Version:
1.28.11-eks-db838b0
Helm Chart Version:
0.97.1
Docker Image Version:
otel/opentelemetry-collector-contrib:0.104.0
Additional context
Looks like this may have been partially resolved with #10343
The text was updated successfully, but these errors were encountered: