Add Docker certs.d support to crane#2319
Open
Haihan-Jiang wants to merge 1 commit into
Open
Conversation
Haihan-Jiang
marked this pull request as ready for review
May 24, 2026 10:53
Contributor
Author
|
This is still ready for review from my side. It adds Docker |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2319 +/- ##
==========================================
- Coverage 56.91% 56.89% -0.03%
==========================================
Files 165 166 +1
Lines 11362 11451 +89
==========================================
+ Hits 6467 6515 +48
- Misses 4134 4159 +25
- Partials 761 777 +16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| func loadDockerCertsDir(directory string, tlsConfig *tls.Config) error { | ||
| files, err := os.ReadDir(directory) |
| } | ||
| tlsConfig.RootCAs = systemPool | ||
| } | ||
| data, err := os.ReadFile(filepath.Join(directory, f.Name())) |
Contributor
|
Hi, just leaving a comment to say that I am still reviewing all of your PRs, it's just taking a bit of time to process new feature work. A bit late but I've approved running tests on each one. |
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
*.crt) and client certificate/key pairs (*.cert/*.key)Details
Docker supports custom registry certificates under
certs.d/<registry-host>/. This teaches crane to look up the request registry host, clone the base transport for that host, and apply matching certs only to that registry. Missing cert directories are ignored, while incomplete client certificate pairs return an early configuration error.Updates #211.
Testing
go test ./cmd/crane/cmdgo test ./cmd/crane/... ./pkg/crane/...go test ./pkg/v1/remote/transportPATH="$PATH:$(go env GOPATH)/bin" ./hack/presubmit.sh