Scott Rigby
78cf5470d1
Merge pull request #31199 from TerryHowe/fix-flaky-registry-data-race
...
fix: flaky registry data race on mockdns close
14 hours ago
Matt Farina
fc22b6df31
Merge pull request #31222 from benoittgt/30987-ghcr-io
...
Prevent failing `helm push` on ghcr.io using standard GET auth token flow
2 days ago
Matt Farina
52267ee74b
Move repo package to versioned directory
...
The repo package is internally versioned at v1. Repos were designed
to be versioned. This change moves it to a versioned directory the
same way other packages are now being handled.
Signed-off-by: Matt Farina <matt.farina@suse.com>
3 days ago
Benoit Tigeot
5595c0d005
Prevent failing helm push on ghcr.io using standard GET auth token flow
...
Fix GHCR auth by not forcing OAuth2 POST but also reset
ForceAttemptOAuth2 after login.
- Remove ForceAttemptOAuth2 in NewClient and only enable during Login
ping and always restore to false.
- Aligns with OCI Distribution auth (token via GET), avoiding GHCR 405
on POST /token.
- Some tests
Failures logs:
```sh
~/p/lifen/test/helm-f/quicktest ❯ ../../../helm/bin/helm push quicktest-0.1.0.tgz oci://ghcr.io/benoittgt/helm-charts --debug
level=DEBUG msg=HEAD id=0 url=https://ghcr.io/v2/benoittgt/helm-charts/quicktest/manifests/sha256:af359fd8fb968ec1097afbd6e8e1dac9ee130861082e54dc2340d0c019407873 header=" \"Accept\": \"application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, application/vnd.oci.artifact.manifest.v1+json\"\n \"User-Agent\": \"Helm/4.0+unreleased\""
level=DEBUG msg=Resp id=0 status="401 Unauthorized" header=" \"Www-Authenticate\": \"Bearer realm=\\\"https://ghcr.io/token \\\",service=\\\"ghcr.io\\\",scope=\\\"repository:benoittgt/helm-charts/quicktest:pull\\\"\"\n \"Date\": \"Mon, 01 Sep 2025 13:56:35 GMT\"\n \"Content-Length\": \"73\"\n \"X-Github-Request-Id\": \"DC73:115F:2B40F2C:2BAB567:68B5A613\"\n \"Content-Type\": \"application/json\"" body=" Response body is empty"
level=DEBUG msg=POST id=1 url=https://ghcr.io/token header=" \"Content-Type\": \"application/x-www-form-urlencoded\"\n \"User-Agent\": \"Helm/4.0+unreleased\""
level=DEBUG msg=Resp id=1 status="405 Method Not Allowed" header=" \"Docker-Distribution-Api-Version\": \"registry/2.0\"\n \"Strict-Transport-Security\": \"max-age=63072000; includeSubDomains; preload\"\n \"Date\": \"Mon, 01 Sep 2025 13:56:35 GMT\"\n \"Content-Length\": \"78\"\n \"X-Github-Request-Id\": \"DC73:115F:2B40F75:2BAB5C2:68B5A613\"\n \"Content-Type\": \"application/json\"" body="{\"errors\":[{\"code\":\"UNSUPPORTED\",\"message\":\"The operation is unsupported.\"}]}\n"
Error: failed to perform "Exists" on destination: HEAD "https://ghcr.io/v2/benoittgt/helm-charts/quicktest/manifests/sha256:af359fd8fb968ec1097afbd6e8e1dac9ee130861082e54dc2340d0c019407873 ": POST "https://ghcr.io/token ": response status code 405: unsupported: The operation is unsupported.
```
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
4 days ago
Scott Rigby
9ea35da0d0
[HIP-0026] Plugin packaging, signing, and verification ( #31176 )
...
* Plugin packaging, signing and verification
Signed-off-by: Scott Rigby <scott@r6by.com>
* wrap keyring read error with more explicit message
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* skip unnecessary check
Co-authored-by: Evans Mungai <mbuevans@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Change behavior for installing plugin with missing .prov file (now warns and continues instead of failing)
Signed-off-by: Scott Rigby <scott@r6by.com>
* Add comprehensive plugin verification tests
- Test missing .prov files (warns but continues)
- Test invalid .prov file formats (fails verification)
- Test hash mismatches in .prov files (fails verification)
- Test .prov file access errors (fails appropriately)
- Test directory plugins don't support verification
- Test installation without verification enabled (succeeds)
- Test with valid .prov files (fails on empty keyring as expected)
---------
Signed-off-by: Scott Rigby <scott@r6by.com>
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Co-authored-by: Evans Mungai <mbuevans@gmail.com>
6 days ago
Terry Howe
ce97a2449e
fix: move mockdns to packge level
...
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
1 week ago
Terry Howe
6273f9b38e
fix: flaky registry data race on mockdns close
...
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
1 week ago
Scott Rigby
fd41fdd9c9
New registry plugin func GetPluginName. Re-use regsitry.reference
...
Signed-off-by: Scott Rigby <scott@r6by.com>
2 weeks ago
Scott Rigby
7d22bb25fa
Plugin OCI installer
...
Signed-off-by: Scott Rigby <scott@r6by.com>
2 weeks ago
Matt Farina
0f1b410f14
Merge pull request #31165 from mattfarina/content-cache
...
Initial addition of content based cache
2 weeks ago
Scott Rigby
29d12ba09e
Merge pull request #31156 from estroz/fix-resolve-client
...
fix: set repo authorizer in registry.Client.Resolve()
2 weeks ago
cuiweixie
04cb1bad67
pkg/register: refactor to use atomic.Uint64
...
Signed-off-by: cuiweixie <cuiweixie@gmail.com>
2 weeks ago
Matt Farina
6ac2c34689
Initial addition of content based cache
...
The previous cache was based on chart name and version. If 2 charts
with different content had the same name and version they would collide.
Helm did not trust the cache because of this and always downloaded
content. It was a short lived cache.
This commit introduces a content based cache which is based on the
content rather than file name. Charts with the same name but different
content are no longer an issue.
While the system assumes a file based interface, the cache system
is pluggable. In the future, it should return bytes for the content
instead of paths to it. That would requie a larger change for Helm 5
or later.
Signed-off-by: Matt Farina <matt.farina@suse.com>
2 weeks ago
Matt Farina
3726d01c5c
Merge pull request #31132 from joemicky/main
...
refactor: replace []byte(fmt.Sprintf) with fmt.Appendf
2 weeks ago
Eric Stroczynski
e1e23d2af1
fix: set repo authorizer in registry.Client.Resolve()
...
Signed-off-by: Eric Stroczynski <estroczynski@nvidia.com>
3 weeks ago
Matt Farina
de9ea4d1e3
Merge pull request #30992 from TerryHowe/force-oath-v4
...
fix: force bearer oauth for if registry requests bearer auth
3 weeks ago
Evans Mungai
0943d032a7
Merge branch 'main' into em/fix-username-password
...
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
3 weeks ago
joemicky
fab70472af
refactor: replace []byte(fmt.Sprintf) with fmt.Appendf
...
Signed-off-by: joemicky <joemickychang@outlook.com>
3 weeks ago
Matt Farina
523d0b305e
Merge pull request #31076 from matheuscscp/registry-tls-memory
...
pkg/registry: Login option for passing TLS config in memory
4 weeks ago
Evans Mungai
9e1cbbebcb
fix linting warning
...
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
4 weeks ago
Evans Mungai
5e6a411c1f
fix: use username and password if provided
...
Ref: #31114
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
4 weeks ago
Mikel Olasagasti Uranga
7007d4d485
chore(deps): remove phayes/freeport module
...
Replaces the `phayes/freeport` module with the standard library's
`net.Listen("tcp", "127.0.0.1:0")` idiom. This removes an unnecessary
dependency and simplifies the codebase.
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
1 month ago
Matheus Pimenta
802e09038c
pkg/registry: Login option for passing TLS config in memory
...
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
1 month ago
Terry Howe
250ce7b5dc
chore: improve OCI debug logging
...
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2 months ago
Terry Howe
82bc9adcc2
fix: test teardown dns data race
...
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2 months ago
Terry Howe
f55c462a79
fix: force bearer oauth for everything
...
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
3 months ago
Terry Howe
47980159b3
fix: user username password for login
...
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
3 months ago
Scott Rigby
e8c1acf228
Merge pull request #30809 from mmorel-35/usetesting
...
chore: enable usetesting linter
3 months ago
Scott Rigby
4023c3b5ff
Merge pull request #30917 from TerryHowe/oci-transport-debugging
...
fix: add debug logging to oci transport
3 months ago
Matthieu MOREL
56a2bb4188
chore: enable usetesting linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 months ago
Terry Howe
6ab7aa3612
fix: legacy docker support broken for login
...
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
3 months ago
Terry Howe
5fe7a87138
fix: add debug logging to oci transport
...
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-authored-by: Billy Zha <jinzha1@microsoft.com>
3 months ago
Robert Sirchia
b7e127dd6b
amending missed line to delete
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
3 months ago
Robert Sirchia
937c533e37
forward porting 30902
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
3 months ago
Benoit Tigeot
f939f6145f
Prevent fetching newReference again as we have in calling method
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
4 months ago
Benoit Tigeot
875e149d6b
Prevent failure when resolving version tags in oras memory store
...
- The newReference() function transforms version tags by replacing + with _ for OCI compatibility
- But the code was using the original ref (with +) for TagBytes()
- Then it tries to find the tagged reference using parsedRef.String() (with _)
- This mismatch causes the Resolve method to fail with "not found"
- By using parsedRef.String() consistently in both places, the references will match and the lookup will succeed.
I extracted the TagBytes function to improve testability.
Push() includes several external calls that are hard to mock,
so isolating this logic makes testing more manageable.
Close : #30881
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
4 months ago
Matt Farina
0c91649ec8
Merge pull request #30871 from gjenkins8/gjenkins/test_registry_localhost
...
Run test OCI registry localhost
4 months ago
George Jenkins
8ba181c343
Run test OCI registry localhost
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
Matthieu MOREL
157f0ba10a
chore: enable thelper
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Robert Sirchia
4d580c6b95
Merge pull request #30810 from mmorel-35/usestdlibvars
...
chore: enable usestdlibvars linter
4 months ago
findnature
ac8d2f9aed
refactor: use slices.Contains to simplify code
...
Signed-off-by: findnature <cricis@aliyun.com>
4 months ago
Matthieu MOREL
77a267dacf
chore: enable usestdlibvars linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Justen Stall
3877ec9049
fix golangci-lint issues
...
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
5 months ago
Justen Stall
280a9ddbdb
Merge branch 'main' into stdlib-errors-2
...
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
5 months ago
Benoit Tigeot
a6d0335bbb
Use fmt.Fprintf(...) instead of ...
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
5 months ago
Matt Farina
2e6437beb5
Merge pull request #30684 from twz123/remove-clientoptresolver
...
Remove ClientOptResolver from OCI Client
6 months ago
linghuying
fc476f7235
chore: make function comment match function name
...
Signed-off-by: linghuying <1599935829@qq.com>
6 months ago
Tom Wieczorek
835ff78f48
Remove ClientOptResolver from OCI Client
...
This option was kept to avoid compile-time incompatibilities in Helm v3
when upgrading to ORAS v2. Let's remove it for Helm v4.
This allows Helm to drop the containerd dependency entirely.
Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
6 months ago
Matt Farina
61d3eca55c
Move pkg/chart to pkg/chart/v2 to prepare for v3 charts
...
This change moves the code, updates the import locations, and
adds a doc.go file to document what the v2 package is for.
This is part of HIP 20 for v3 charts
Signed-off-by: Matt Farina <matt.farina@suse.com>
6 months ago
George Jenkins
3253059438
Merge pull request #13535 from helm/refactor_tlsutil
...
refactor: tlsutil use options pattern
7 months ago