fix: pass insecure option to name.NewDigest for OCI storage#1684
Open
ab-ghosh wants to merge 1 commit into
Open
fix: pass insecure option to name.NewDigest for OCI storage#1684ab-ghosh wants to merge 1 commit into
ab-ghosh wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
|
/kind misc |
Contributor
|
/lgtm |
0e9362a to
d304a5d
Compare
Member
Author
|
/retest |
go-containerregistry v0.21.6 changed .local domain handling to only treat .localhost as HTTP (google/go-containerregistry#2281). This breaks OCI storage for insecure registries using .cluster.local addresses since name.NewDigest() now defaults to HTTPS for them. Extract nameOpts() from newRepo() and reuse it in both NewDigest call sites so the insecure flag propagates consistently. Signed-off-by: ab-ghosh <abghosh@redhat.com>
d304a5d to
6d97fce
Compare
Member
Author
|
/retest |
Contributor
|
/lgtm |
Member
Author
|
/cc @jkhelil |
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.
Changes
Fix OCI storage failing against insecure
.cluster.localregistries when usinggo-containerregistryv0.21.6+.name.NewDigest()was called withoutname.Insecureeven whenstorage.oci.repository.insecure: "true"was configured, causing HTTPS connections to plain HTTP registries.Extract
nameOpts()helper fromnewRepo()and reuse it inuploadSignature()anduploadAttestation()for consistent insecure flag propagation.Context
go-containerregistryv0.21.6 tightened.localdomain handling (google/go-containerregistry#2281) —only
.localhostis now treated as HTTP by default. Domains likeregistry.<ns>.svc.cluster.local:5000previously worked without the insecure flag but now require it explicitly.This fix unblocks the dependency bump in #1680, which updates
go-containerregistryto v0.21.6 and currently fails all e2e tests due to this issue.Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes