fix(otel): don't combine WithTLSClientConfig with WithInsecure#293
Merged
Conversation
otel v1.43+ rejects a TLS client config on insecure HTTP endpoints: F tracing.go:77] insecure HTTP endpoint cannot use TLS client configuration Since the otel group bump, the agent fatals at startup whenever TRACES_ENDPOINT is plain HTTP (e.g. the in-cluster otel collector). Apply WithTLSClientConfig only for https endpoints, in both the traces and logs exporters.
There was a problem hiding this comment.
Code Review
This pull request refactors the OpenTelemetry logging and tracing initialization to only apply TLS client configurations when the endpoint scheme is HTTPS. The review feedback suggests a security improvement to explicitly set the minimum TLS version to TLS 1.2 in both configurations to prevent the use of deprecated and insecure TLS versions.
blue4209211
approved these changes
Jul 15, 2026
blue4209211
pushed a commit
to nudgebee/k8s-agent
that referenced
this pull request
Jul 15, 2026
* chore(chart): bump node-agent image to 0.1.2, chart to 0.1.11 Picks up the otel exporter startup fix (nudgebee/node-agent#293): agent fataled on plain-HTTP TRACES_ENDPOINT since the otel v1.43 bump. New immutable image tag 0.1.2 instead of republishing 0.1.1, whose in-place republish on 2026-07-10 caused the CrashLoopBackOff incident. * chore: update image tags for main release --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mayankpande88
added a commit
to nudgebee/k8s-agent
that referenced
this pull request
Jul 15, 2026
Picks up the otel exporter startup fix (nudgebee/node-agent#293): agent fataled on plain-HTTP TRACES_ENDPOINT since the otel v1.43 bump. New immutable image tag 0.1.2 instead of republishing 0.1.1, whose in-place republish on 2026-07-10 caused the CrashLoopBackOff incident.
mayankpande88
added a commit
to nudgebee/k8s-agent
that referenced
this pull request
Jul 15, 2026
Picks up the otel exporter startup fix (nudgebee/node-agent#293): agent fataled on plain-HTTP TRACES_ENDPOINT since the otel v1.43 bump. New immutable image tag 0.1.2 instead of republishing 0.1.1, whose in-place republish on 2026-07-10 caused the CrashLoopBackOff incident.
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.
Problem
Since the otel group bump to v1.43 (#262), the agent fatals at startup whenever the traces endpoint is plain HTTP (e.g. the in-cluster otel collector):
otel v1.43+ validates exporter options and rejects
WithTLSClientConfigcombined withWithInsecure. Both the traces and logs exporters unconditionally set the TLS client config and then addWithInsecure()for non-https endpoints.This is live: the republished
0.1.1image crashloops on any cluster with an HTTPTRACES_ENDPOINT(observed on nudgebee-agent-dev). Note pods currently also fail earlier withexec: "coroot-node-agent": not found— that's a separate chart bug, fixed in nudgebee/k8s-agent#521. This crash is what pods hit once the chart fix lands.Fix
Apply
WithTLSClientConfigonly when the endpoint scheme is https, in bothtracing/tracing.goandlogs/otel.go.gofmt -lclean;go vet ./tracing/...passes (logs package needs Linux/systemd headers, verified by CI).