Fix OTel collector advertise host in direct Kubernetes mode#823
Merged
Fix OTel collector advertise host in direct Kubernetes mode#823
Conversation
Contributor
Author
|
This may end up just becoming a reference as a workaround until we fix Connect to get the ip on its own: |
Inject status.podIP via Downward API as CONNECT_OPENTELEMETRY_COLLECTORADVERTISEHOST when OpenTelemetry is enabled, replacing the Service DNS default that caused content job pods to time out on the unexposed ephemeral collector port. Closes posit-dev/connect#38219
… already in pod.env Prevents duplicate env var error when users had manually set this in pod.env as a workaround before the chart-level fix was available.
deployment.yaml includes configmap-prestart.yaml in its checksum annotation, so helm-unittest needs it in the templates list.
6367424 to
b833a41
Compare
Documents the automatic pod IP injection via Downward API and how to override it via pod.env.
mconflitti-pbc
commented
Apr 2, 2026
Contributor
|
Looks right to me. Just to confirm what I'm reading - if we set |
dbkegley
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OpenTelemetry.CollectorAdvertiseHostto the Connect Service DNS name in the gcfg config — the ephemeral OTel collector port is not exposed on the Service, causing content job pods to time out on every log sendstatus.podIPvia the Kubernetes Downward API asCONNECT_OPENTELEMETRY_COLLECTORADVERTISEHOSTwhenconfig.OpenTelemetry.Enabled: true— the OTel collector already binds to0.0.0.0in off-host mode so direct pod-to-pod routing workstests/otel_test.yamlto cover the new behaviorValidation
Env var is set is on connect pod
Proper host ip is passed into content pod:
No picotel errors in content logs
Test plan
OpenTelemetry.Enabled: trueCONNECT_OPENTELEMETRY_COLLECTORADVERTISEHOSTis set to the pod IP in the Connect pod