Commit graph

177 commits

Author SHA1 Message Date
Terry Howe
c188441757 chore(oci): upgrade to ORAS v2
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-03-14 08:46:18 -06:00
Terry Howe
949b2e6040 fix: make ORAS reference private
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
(cherry picked from commit d2b94f6200)
2025-01-01 11:50:58 -05:00
Terry Howe
c3e5217d85 feat: allow installation by OCI digest
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
(cherry picked from commit ad9fb68fa3)
2025-01-01 11:50:26 -05:00
Robert Sirchia
5ae91e11ae
Merge pull request #13034 from mattclegg/issue-9507
ISSUE-9507: ADD `application/gzip,application/octet-stream` accept header
2024-10-25 16:10:20 -04:00
Nathan Baulch
ff9dd262e3
Fix typos
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:29:56 +10:00
Matt Farina
c81bd8912e
Revert "Improve helm dependency update performance"
The change in #11726 caused a regression where `helm dependency udpate`
stopped working. The format of the internal representation of the data
changed causing errors of "non-absolute URLs should be in form of
repo_name/path_to_chart". See #13324 for more details.

Since this change is in released Helm and it's a regression, reverting
the original change was the fastest and safest route to deliver a
fix as quickly as possible.

Closes #13324

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-09-12 10:37:15 -04:00
MichaelMorris
9e5f465499 Merge branch 'helm:main' into fixDepUpPerformance
Signed-off-by: MichaelMorris <michael.morris@est.tech>
2024-08-02 00:03:15 +01:00
Suleiman Dibirov
adeb4ca3d9 fix(dependencyBuild): prevent race condition in concurrent helm dependency
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-06-16 16:52:05 +03:00
Matt Clegg
fff3547f9c
ISSUE-9507: ADD application/gzip,application/octet-stream accept header when downloading chart
Signed-off-by: Matt Clegg <m@cle.gg>
2024-05-14 15:58:30 +01:00
Jeff van Dam
ee41b5f0fc Update manager_test.go
Signed-off-by: Jeff van Dam <jeff.van.dam@est.tech>
2024-04-29 14:29:08 +01:00
Jeff van Dam
dc761caf00
Merge branch 'helm:main' into fixDepUpPerformance 2024-04-29 13:59:51 +01:00
Matt Farina
8e6a5149d2
validation fix
Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-02-07 10:54:15 -05:00
Matt Farina
847369c184
Update to Go 1.21 for builds
Noteis:
1. This moves golangci scanning to a GitHub action. This will
   enable inline pointers to issues in the PR where linting fails.
2. Go 1.21 is specified in the go.mod because Kubernetes libs
   require it.
3. The lint issues were removed. Some were fixed while others
   were handled by skipping linting or using _ as an argument.
   Many of these can be refactored later for better cleanup.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-01-08 15:48:36 -05:00
Matt Farina
70cbaa0a73
Merge pull request #11372 from vovtz/#11369-fix-custom-repo-cache-for-unmanaged-dependency-updates
#11369 Fix custom repo index cache directory for unmanaged dependency updates
2023-09-18 12:21:48 -04:00
Jeff van Dam
183f01b32c Made urls key more specific
Signed-off-by: Jeff van Dam <jeff.van.dam@est.tech>
2023-09-01 16:13:03 +01:00
Jeff van Dam
0a7bffdd3c Merge branch 'fixDepUpPerformance' of https://github.com/Nordix/helm into fixDepUpPerformance 2023-08-09 15:54:05 +01:00
Jeff van Dam
e5fdaa1c65 Update chart_downloader.go
Signed-off-by: Jeff van Dam <66410239+JvD-Ericsson@users.noreply.github.com>
2023-08-09 15:53:57 +01:00
Eng Zer Jun
2ceebffc77
test: replace ensure.TempDir with t.TempDir
This commit replaces `ensure.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ensure.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-07-29 16:11:22 +08:00
Yarden Shoham
15e6066a45 chore: fix a typo in manager.go
actally -> actually

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2023-06-25 20:07:02 +00:00
Jeff van Dam
13b9c679f6
Update chart_downloader.go
Signed-off-by: Jeff van Dam <66410239+JvD-Ericsson@users.noreply.github.com>
2023-05-11 08:25:29 +01:00
JvD_Ericsson
1ce7939838 Improve helm dependency update performance
What this PR does / why we need it:
This PR was created to improve performance of the dependency update command by
skipping unnecessary downloading and loading of index files that have already
been downloaded and loaded

I believe this would close refs #9865

Signed-off-by: Jeff van Dam <jeff.van.dam@est.tech>
2023-04-24 17:35:50 +01:00
Matt Farina
4e7e939f19
Updating the Go version in go.mod
At this time both Go 1.19 and 1.20 are supported. The version
specified in the go.mod file is the minimum version we expect Helm
to be compiled against. This is the oldest supported version to
support environments where others compile Helm. The Helm project
is using Go 1.20 to build Helm itself.

Updating to Go 1.19 also includes dealing with io/ioutil
deprecation and some additional linting issues around staticcheck.
All the staticcheck issues were in test files so linting was
skipped for those.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:52:30 -04:00
Matt Farina
50c22ed7f9
Bump the Go version
Needed to gofmt source to meet changes in style

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:29:26 -04:00
Philipp Stehle
dfb25e13de harmonize URL reference resolving
Fixes https://github.com/helm/helm/issues/11472

Signed-off-by: Philipp Stehle <philipp.stehle@sap.com>
2022-11-09 10:26:45 +01:00
Vincent van ’t Zand
e844f9ca92 #11369 Use the correct index repo cache directory in the parallelRepoUpdate method as well
Signed-off-by: Vincent van ’t Zand <vovtz@users.noreply.github.com>
2022-09-22 18:14:41 +02:00
Mathieu Parent
d9e5bbc09d Fix URL with encoded path support for ChartDownloader
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
2022-04-29 05:18:43 +02:00
Eng Zer Jun
2e3e22a003
test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-02-12 13:54:54 +08:00
Josh Dolitsky
86a94f2f53
Merge pull request #10578 from sabre1041/oci-tag-evaluation
Limits need to call tag API when explicit version specified
2022-01-18 12:22:00 -06:00
Andrew Block
0677a156bc
Limits need to call tag API when explicit version specified
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-18 11:38:04 -06:00
Eng Zer Jun
e12f3570b5
refactor: use os.ReadDir for lightweight directory reading
`os.ReadDir` was added in Go 1.16 as part of the deprecation of `ioutil`
package. It is a more efficient implementation than `ioutil.ReadDir` as
stated here https://pkg.go.dev/io/ioutil#ReadDir.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-01-18 21:31:57 +08:00
David Peraza
9f869c6b21 Removing all the checks for oci experimental flag
Signed-off-by: David Peraza <dperaza@redhat.com>
2022-01-12 21:49:26 -05:00
Thomas Runyon
353d74e967 refactor internal/experimental/registry to pkg/registry
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
2022-01-12 21:49:26 -05:00
Scott Rigby
ee382eb169
Remove unneeded assignment
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-12 17:43:10 -05:00
Andrew Block
1a9cb93551
Handling name of OCI file
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-12 15:49:12 -06:00
Andrew Block
23989f9e24
Updates to chart downloader
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-12 14:32:42 -06:00
Scott Rigby
ba4020770e
Fix linting
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-12 14:45:10 -05:00
Scott Rigby
4d50526a2b
Move OCI tag semver range logic from OCIGetter to ChartDownloader
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-12 14:36:54 -05:00
Matt Farina
c7b2a9d487
Fixing issue where OCI handling early causes a bad message
Note, there is OCI handling later in the funtion that should
handle the situation instead.

Closes #10534

Signed-off-by: Matt Farina <matt.farina@suse.com>
2022-01-12 12:39:57 -05:00
Andrew Block
0fae7f5008
Updated tag resolver logic
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 21:47:03 -05:00
Andrew Block
834a11db56
Added registryClient to resolver
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 21:47:03 -05:00
Scott Rigby
1fabbabae9
Fix Trim to TrimPrefix
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-11 21:46:24 -05:00
Scott Rigby
e3f2fb4235
Add OCI tag verions to the Dependency object before Resolve. TODO: fix HTTP HTTPS error for local registries
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-11 21:45:30 -05:00
Scott Rigby
39792b5ad0
Revert "It appears we never got to this block below. Quick rec by Farina. Untested if necessary"
This reverts commit f616a01808da3428c6191e5196f32ca72eb22254.

Removing for now until we know we need it.

Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-11 21:45:30 -05:00
Scott Rigby
16453c372c
It appears we never got to this block below. Quick rec by Farina. Untested if necessary
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-11 21:45:30 -05:00
Matt Farina
ee73a0263c
Fixing issue where OCI handling early causes a bad message
Note, there is OCI handling later in the funtion that should
handle the situation instead.

Closes #10534

Signed-off-by: Matt Farina <matt.farina@suse.com>
2022-01-10 11:21:40 -05:00
jayonlau
55bb6c307a lean up extra spaces
Although these errors are not important, they affect the code specification.

Signed-off-by: jayonlau <jayonlau@gmail.com>
2021-12-23 22:00:24 -05:00
Asir Tamboli
ea49d811bf Updated oci format logic
Signed-off-by: Asir Tamboli <tamboliasir1@gmail.com>
2021-10-29 06:28:38 +05:30
Fabian Jucker
6f0064d61b actually skip unverifiable files
Signed-off-by: Fabian Jucker <fabianju@gmx.ch>
2021-10-06 17:31:00 +02:00
Matthew Fisher
d2dd32470b
fix tarFromLocalDir saving file dependencies in dest path
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2021-09-09 08:52:02 -07:00
Josh Dolitsky
336c7862e5
Merge branch 'main' of github.com:helm/helm into hip-6
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-08-30 11:13:54 -04:00