Remove overwriting the default HTTP transport - #1112
Open
mozesl-nokia wants to merge 14 commits into
Open
Conversation
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
✅ Deploy Preview for kpt-porch ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes global mutation of http.DefaultTransport (previously used for OpenTelemetry wrapping) and introduces a dedicated pkg/httpclient helper for constructing registry-focused HTTP transports/clients. It also refactors TLS handling for private registry pulls and removes tag-resolution logic from the pod evaluator path.
Changes:
- Added
pkg/httpclientwith a snapshot-based base*http.Transportand helpers to create registry transports/clients with optional TLS config. - Removed OpenTelemetry wrapping of
http.DefaultTransportin telemetry setup to avoid breaking downstream clients (e.g., regclient). - Refactored private-registry TLS CA discovery/transport creation in
podmanagerand removed pod-evaluator tag resolution + related tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/httpclient/registry.go | New shared HTTP transport/client helpers for registry outbound calls without mutating global defaults. |
| pkg/httpclient/registry_test.go | Adds unit tests for the new httpclient helpers. |
| internal/telemetry/otel.go | Removes global HTTP default transport/client wrapping during OTel setup. |
| go.mod | Reclassifies sigs.k8s.io/cli-utils as indirect after refactor. |
| func/internal/podmanager.go | Uses new registry transport helper and factors CA path discovery into a helper. |
| func/internal/podmanager_unit_test.go | Removes tests tied to the deleted in-file transport constructor. |
| func/internal/podevaluator.go | Refactors construction wiring and removes tag resolution prior to evaluation. |
| func/internal/podevaluator_unit_test.go | Updates evaluator unit tests to match removed tag-resolver wiring. |
| func/internal/podevaluator_tag_resolution_test.go | Deletes tag resolution unit tests (tag resolution no longer done here). |
| func/internal/executableevaluator_test.go | Minor test constant addition for shared test image name. |
liamfallon
previously approved these changes
Jul 13, 2026
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Assisted-by: Cursor:composer-2.5 Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
liamfallon
previously approved these changes
Jul 14, 2026
nagygergo
reviewed
Jul 16, 2026
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
nagygergo
reviewed
Aug 6, 2026
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com> Assisted-by: Cursor:grok-4.5
|
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.


Remove overwriting the default HTTP transport
Description
Related Issue(s)
Type of Change
Checklist
Additional Notes (Optional)
AI Disclosure
If so, please describe how: