Commit Graph
108 Commits
Author SHA1 Message Date
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>
2025-07-25 22:23:15 +02:00
Terry Howe 250ce7b5dc chore: improve OCI debug logging
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-07-15 11:08:33 -06:00
Terry Howe 82bc9adcc2 fix: test teardown dns data race
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-07-09 12:59:19 -06:00
Terry Howe 47980159b3 fix: user username password for login
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-06-13 11:27:34 -06:00
Scott Rigby e8c1acf228 Merge pull request #30809 from mmorel-35/usetesting
chore: enable usetesting linter
2025-06-03 14:57:06 -04:00
Scott Rigby 4023c3b5ff Merge pull request #30917 from TerryHowe/oci-transport-debugging
fix: add debug logging to oci transport
2025-06-01 18:12:15 -04:00
Matthieu MOREL 56a2bb4188 chore: enable usetesting linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-30 08:12:11 +02:00
Terry Howe 6ab7aa3612 fix: legacy docker support broken for login
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-05-29 19:32:55 -04:00
Terry HoweandBilly Zha 5fe7a87138 fix: add debug logging to oci transport
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-authored-by: Billy Zha <jinzha1@microsoft.com>
2025-05-29 07:12:06 -04:00
Robert Sirchia b7e127dd6b amending missed line to delete
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-05-23 16:22:39 -04:00
Robert Sirchia 937c533e37 forward porting 30902
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2025-05-23 16:19:03 -04:00
Benoit Tigeot f939f6145f Prevent fetching newReference again as we have in calling method
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-05-23 11:49:55 +02:00
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>
2025-05-21 21:38:44 +02:00
Matt Farina 0c91649ec8 Merge pull request #30871 from gjenkins8/gjenkins/test_registry_localhost
Run test OCI registry localhost
2025-05-20 18:57:13 +01:00
George Jenkins 8ba181c343 Run test OCI registry localhost
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-05-16 17:59:07 -07:00
Matthieu MOREL 157f0ba10a chore: enable thelper
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-16 10:25:08 +02:00
Robert Sirchia 4d580c6b95 Merge pull request #30810 from mmorel-35/usestdlibvars
chore: enable usestdlibvars linter
2025-05-08 10:35:10 -04:00
findnature ac8d2f9aed refactor: use slices.Contains to simplify code
Signed-off-by: findnature <cricis@aliyun.com>
2025-05-02 09:43:25 +08:00
Matthieu MOREL 77a267dacf chore: enable usestdlibvars linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-04-27 22:44:46 +02:00
Justen Stall 3877ec9049 fix golangci-lint issues
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 12:44:40 -04:00
Justen Stall 280a9ddbdb Merge branch 'main' into stdlib-errors-2
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 12:13:10 -04:00
Benoit Tigeot a6d0335bbb Use fmt.Fprintf(...) instead of ...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 10:49:49 +02:00
Matt Farina 2e6437beb5 Merge pull request #30684 from twz123/remove-clientoptresolver
Remove ClientOptResolver from OCI Client
2025-03-21 16:34:14 -04:00
linghuying fc476f7235 chore: make function comment match function name
Signed-off-by: linghuying <1599935829@qq.com>
2025-03-20 22:18:28 +08:00
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>
2025-03-19 14:50:16 +01:00
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>
2025-02-25 15:20:44 -05:00
George Jenkins 3253059438 Merge pull request #13535 from helm/refactor_tlsutil
refactor: tlsutil use options pattern
2025-02-05 13:23:50 -08:00
Terry HoweandZoran Regvart 5a7046b9bf chore(oci): upgrade to ORAS v2
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-authored-by: Zoran Regvart <zoran@regvart.com>
2025-02-02 07:28:41 -07:00
petercover 605b1a0cf7 chore: fix some comments
Signed-off-by: petercover <raowanxiang@outlook.com>
2025-01-23 00:38:38 +08:00
Matt Farina f65eaf35ce Merge pull request #12690 from TerryHowe/oci-install-digest
feat: OCI install by digest
2025-01-01 17:49:14 +01:00
Matt Farina 2236294119 Updating to helm.sh/helm/v4
Since Helm is going through breaking changes with Helm v4, the version path to
Helm needs to be updated.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-12-26 16:33:51 -05:00
Matt Farina 5727f56a96 Update to Go 1.23
Multiple changes were made to pass linting. Some Go built-in names
are being used for variables (e.g., min). This happens in the Go
source itself including the Go standard library and is not always
a bad practice.

To handle allowing some built-in names to be used the linter config
is updated to allow (via opt-in) some names to pass. This allows us
to still check for re-use of Go built-in names and opt-in to any
new uses.

There were also several cases where a value was checked for nil
before checking its length when this is already handled by len()
or the types default value. These were cleaned up.

The license validation was updated because it was checking everything
in the .git directory including all remote content that was local.
The previous vendor directory was from a time prior to Go modules
when Helm handled dependencies differently. It was no longer needed.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-12-19 10:27:38 -05:00
George Jenkins e3e84343d2 refactor: tlsutil use options pattern
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2024-12-14 21:32:45 -08:00
Matt Farina 4dd2a7d626 Merge branch 'main' into oci-install-digest 2024-12-06 21:28:56 +01:00
George Jenkins 76ba8a4b9f naming is hard
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2024-12-02 17:16:42 -05:00
George Jenkins 6dfaf955ee Shadow ORAS remote.Client interface
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2024-12-02 17:11:42 -05:00
Scott Rigby 28770bfc1d Merge pull request #12588 from rynowak/rynowak/override-authorizer
Make the authorizer and registry authorizer configurable
2024-11-21 23:40:32 -05:00
Ryan Nowak 1ab264cb7d Make the authorizer and registry authorizer configurable
Fixes: #12584

This change makes the authorizer and registryAuthorizer of the registry client configurable via options. This allows Go SDK users to override the authentication behavior of the client.

This PR makes both the authorizer and registryAuthorizer configurable because depending on the exact scenario that may be needed. The default registryAuthorizer only supports a specific implementation of the authorizer.

Signed-off-by: Ryan Nowak <nowakra@gmail.com>
2024-11-21 12:43:31 -05:00
Justen Stall 7df69020d8 revert duplicate slice conditions
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 22:50:17 -05:00
Justen Stall 63cf42a843 fix: replace "github.com/pkg/errors" with stdlib "errors" package
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 11:35:59 -05:00
Terry Howe d2b94f6200 fix: make ORAS reference private
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2024-10-24 17:13:20 -06:00
Terry Howe aca7e8d775 fix: issue with helm template and oci chart
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2024-10-24 08:25:47 -06:00
Terry Howe ad9fb68fa3 feat: allow installation by OCI digest
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2024-10-24 08:25:47 -06:00
Evans Mungai bdaa93b969 Ensure test fails without causing panic
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2024-10-22 18:50:23 +01:00
Evans Mungai 3c4d0bb061 Fix failing tests
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2024-10-22 18:38:58 +01:00
Evans Mungai 323f88950a Merge remote-tracking branch 'origin/main' into em/password-to-oci-registries 2024-10-22 17:54:10 +01:00
Nathan Baulch ef85fa7f2d Grammar fixes
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:30:31 +10:00
Sidharth Menon b0603fb042 fix: respect proxy envvars on helm install/upgrade
Signed-off-by: Sidharth Menon <menon.sid.k@gmail.com>
2024-06-15 15:04:37 -04:00
Evans Mungai 76c0f297c1 Merge remote-tracking branch 'origin/main' into em/password-to-oci-registries 2024-05-01 18:27:45 +01:00
Dirk Müller 1b75d48189 Update testdata PKI with keys that have validity until 3393 (Fixes #12880)
The ca.crt had to be regenerated because there was no ca.key. Added
new ca.key so that going forward only the certs need to be updated.

Signed-off-by: Dirk Müller <dirk@dmllr.de>
2024-04-21 12:57:04 +02:00