-
Notifications
You must be signed in to change notification settings - Fork 467
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
Fix "sidecar.opentelemetry.io/injected" label value sometimes being longer than 63 characters #1032
Conversation
…onger than 63 characters Use two new labels: - `sidecar.opentelemetry.io/injected-namespace`: namespace of the `OpenTelemetryCollector` - `sidecar.opentelemetry.io/injected-name`: name of the `OpenTelemetryCollector` Since Kubernetes object names and label values have the same restrictions, we can safely use these two new labels with guarantee that it will not produce errors. For backwards compatibility, we continue to set the `sidecar.opentelemetry.io/injected` label _only if_ it does not exceed 63 characters. This ensures that it still exists when valid, but does not cause errors when invalid.
I would like to understand how the operator uses opentelemetry-operator/pkg/sidecar/pod.go Line 48 in 928e9e4
@jpkrohling since you are the author, could you please take a look and explain what use-cases |
At the very least, can we make it so the label is not set if the value exceeds 63 characters? As it stands the injector can produce an invalid manifest, which it should never do. |
If the label is not being used, we could stop setting it altogether. |
Sure, but we don't know how long it's going to take to get an answer to that question. A fix to the bug that would get us unblocked without breaking backwards compatibility would be a nice first step IMO. |
cc) @jpkrohling could you please take a look at the question above? |
@pavolloffay How long are we willing to wait for a response before introducing a backwards-compatible fix? This continues to impact our Kubernetes environments. |
I saw @jpkrohling doing some work in this repository recently, but maybe he missed this one. |
@KevinSnyderCodes, did you have the opportunity to check it out? |
@KevinSnyderCodes I just rebased your PR but was thinking you could actually just use our naming package's |
@jaronoff97 That sounds good to me. I no longer use this package in my work. Feel free to take over this PR 👍 |
Refs: #1032 Co-authored-by: Jacob Aronoff <[email protected]>
I think was fiixed by this #2250 |
…telemetry#2250) Refs: open-telemetry#1032 Co-authored-by: Jacob Aronoff <[email protected]>
Fixes #1031
Use two new labels:
sidecar.opentelemetry.io/injected-namespace
: namespace of theOpenTelemetryCollector
sidecar.opentelemetry.io/injected-name
: name of theOpenTelemetryCollector
Since Kubernetes object names and label values have the same restrictions, we can safely use these two new labels with guarantee that it will not produce errors.
For backwards compatibility, we continue to set the
sidecar.opentelemetry.io/injected
label only if it does not exceed 63 characters. This ensures that it still exists when valid, but does not cause errors when invalid.