Repository navigation
fix(opentelemetry-operator): make the metrics helm test honour manage… - #2423
Merged
TylerHelmuth merged 7 commits intoOct 1, 2026
Merged
Conversation
…r.metrics.secure The metrics connection test expects a 400 from a plain HTTP request. That 400 is Go's reply to plaintext on a TLS port, so it only holds while manager.metrics.secure is true. With secure metrics off, controller-runtime serves plain HTTP on the same port and GET / answers 404, which fails helm test on an otherwise healthy operator. Keep the 400 check for the secure default and, when secure is false, fetch /metrics and pass on a successful response. Refs open-telemetry#2420 Assisted-by: Claude Fable 5.1
| if [ "$wget_output" = "wget: server returned error: HTTP/1.0 400 Bad Request" ]; then | ||
| exit 0 | ||
| fi | ||
| {{- else }} |
Member
There was a problem hiding this comment.
Pls improve the indentation
Member
Author
There was a problem hiding this comment.
Done, the directives now sit at the script's indent. Rendered output is unchanged with secure on and off.
jaronoff97
approved these changes
Sep 28, 2026
TylerHelmuth
approved these changes
Oct 1, 2026
6 tasks done
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.
Description
This PR fixes an issue where the operator's service connection helm test fails with an HTTP 404 error instead of the expected HTTP 400.
Link to tracking issue
Refs #2420
Context & Root Cause
The test pod currently issues a raw HTTP request and expects a 400 response. A 400 Bad Request is how Go's HTTP server handles plaintext traffic landing on a TLS-secured port—which is the chart's default state.However, if a user explicitly sets manager.metrics.secure: false (or works behind a service mesh sidecar), the metrics port switches to plain HTTP. When this happens, a GET / request hits the controller-runtime mux directly and correctly yields an HTTP 404 Not Found.
Proposed Solution
This fix conditionally adapts the connection test based on the secure setting:
Testing Done
I verified these changes locally using kind under the following conditions:
Authorship