Yarden Shoham
15e6066a45
chore: fix a typo in `manager.go`
...
actally -> actually
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
1 year ago
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>
2 years ago
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>
2 years ago
Philipp Stehle
dfb25e13de
harmonize URL reference resolving
...
Fixes https://github.com/helm/helm/issues/11472
Signed-off-by: Philipp Stehle <philipp.stehle@sap.com>
2 years ago
Mathieu Parent
d9e5bbc09d
Fix URL with encoded path support for ChartDownloader
...
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
3 years ago
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>
3 years ago
Josh Dolitsky
86a94f2f53
Merge pull request #10578 from sabre1041/oci-tag-evaluation
...
Limits need to call tag API when explicit version specified
3 years ago
Andrew Block
0677a156bc
Limits need to call tag API when explicit version specified
...
Signed-off-by: Andrew Block <andy.block@gmail.com>
3 years ago
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>
3 years ago
David Peraza
9f869c6b21
Removing all the checks for oci experimental flag
...
Signed-off-by: David Peraza <dperaza@redhat.com>
3 years ago
Thomas Runyon
353d74e967
refactor internal/experimental/registry to pkg/registry
...
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
3 years ago
Scott Rigby
ee382eb169
Remove unneeded assignment
...
Signed-off-by: Scott Rigby <scott@r6by.com>
3 years ago
Andrew Block
1a9cb93551
Handling name of OCI file
...
Signed-off-by: Andrew Block <andy.block@gmail.com>
3 years ago
Andrew Block
23989f9e24
Updates to chart downloader
...
Signed-off-by: Andrew Block <andy.block@gmail.com>
3 years ago
Scott Rigby
ba4020770e
Fix linting
...
Signed-off-by: Scott Rigby <scott@r6by.com>
3 years ago
Scott Rigby
4d50526a2b
Move OCI tag semver range logic from OCIGetter to ChartDownloader
...
Signed-off-by: Scott Rigby <scott@r6by.com>
3 years ago
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>
3 years ago
Andrew Block
0fae7f5008
Updated tag resolver logic
...
Signed-off-by: Andrew Block <andy.block@gmail.com>
3 years ago
Andrew Block
834a11db56
Added registryClient to resolver
...
Signed-off-by: Andrew Block <andy.block@gmail.com>
3 years ago
Scott Rigby
1fabbabae9
Fix Trim to TrimPrefix
...
Signed-off-by: Scott Rigby <scott@r6by.com>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
jayonlau
55bb6c307a
lean up extra spaces
...
Although these errors are not important, they affect the code specification.
Signed-off-by: jayonlau <jayonlau@gmail.com>
3 years ago
Asir Tamboli
ea49d811bf
Updated oci format logic
...
Signed-off-by: Asir Tamboli <tamboliasir1@gmail.com>
3 years ago
Fabian Jucker
6f0064d61b
actually skip unverifiable files
...
Signed-off-by: Fabian Jucker <fabianju@gmx.ch>
3 years ago
Matthew Fisher
d2dd32470b
fix tarFromLocalDir saving file dependencies in dest path
...
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
3 years ago
Josh Dolitsky
336c7862e5
Merge branch 'main' of github.com:helm/helm into hip-6
...
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
3 years ago
Mathieu Parent
58018d1210
Fix encoded path for 'helm dependency build'
...
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
3 years ago
Josh Dolitsky
0121f6a328
Merge branch 'main' of github.com:helm/helm into hip-6
...
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
3 years ago
Matthew Fisher
c7502671ef
Merge pull request #9934 from jayonlau/clean_up
...
Clean up extra spaces
3 years ago
Matthew Fisher
8d8a27ed1f
Merge pull request #9980 from schra/feat/password-stdin
...
feat(helm): add --password-stdin to `helm repo add`
3 years ago
Matthew Fisher
4b23d0a25b
fix: refactor downloadAll
...
This refactor cleans up downloadAll's validation, download, and save
logic:
1. A temporary directory is created, and removed after all references to
the struct have been dropped via `defer`
2. Any local dependencies in the `charts` directory are kept intact and validated
3. Charts that have been updated are moved to the `charts` directory
This refactor has a number of improvements, including:
- tmpCharts is removed after execution
- no remote charts are downloaded to destPath: they are all pulled into
tmpPath, validated, then moved to destPath
- lots of code cleanup/improvements, like the `if` block checking
whether the `charts` directory was actually not a directory. In some
cases it could be checking a `nil` object, causing a runtime panic.
- the cyclomatic complexity of the code was simplified
- extra (and in some cases, dangerous) calls to `os.RemoveAll` have been
refactored, cleaning the code and preventing certain failure cases.
A test has been provided to demonstrate the tmpCharts removal issue has
been fixed.
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
3 years ago
André Schröder
2131f4cba8
[fix concern] implement test
...
Signed-off-by: André Schröder <andre.schroedr@gmail.com>
3 years ago
Josh Dolitsky
d296ddf026
Merge branch 'main' of github.com:helm/helm into hip-6
...
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
3 years ago
jayonlau
fc5473f762
Clean up extra spaces
...
Clean up extra spaces, although these errors are not important, they affect the code specification.
Signed-off-by: jayonlau <jayonlau@gmail.com>
3 years ago
Kally Fox
f9b1445b63
refactor: use os instead of ioutil's ReadDir
...
Signed-off-by: Kally Fox <kallydev@gmail.com>
3 years ago
Josh Dolitsky
a38f56c692
Merge branch 'main' of github.com:helm/helm into hip-6
...
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
3 years ago
Josh Dolitsky
230e37ca52
remove hardcoded oci strings, add constant/util
...
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
3 years ago
Matt Farina
4e2e4084ed
Fix the url being set by WithURL on the getters
...
The URL passed to the getter for WithURL needs to be a full URL
rather than a chart reference used at the CLI. For example,
bitnami/wordpress can point to the wordpress chart in the bitnami
repo where the bitnami repo is at https://charts.bitnami.com .
WithURL needs the full URL to the repo and not bitnami/wordpress.
This is important because getters use the full URL information.
In this case the http getter uses the host name for SNI handling.
Before this change WithURL was being set to the chart reference
instead of the URL. This was a silent bug.
This change sets WithURL using a URL after for the repo is
available when a reference is used instead of a full url.
Signed-off-by: Matt Farina <matt.farina@suse.com>
3 years ago
Josh Dolitsky
1fe2024be3
Merge branch 'main' of github.com:helm/helm into hip-6
...
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
3 years ago
Josh Dolitsky
4ed8e77026
remove tmp path in case it exists
...
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
3 years ago
Josh Dolitsky
e5b03c73f0
do not update oci-based repos
...
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
3 years ago
Christophe VILA
8232a76aef
use TLS client information from repo config when downloading a chart
...
Signed-off-by: Christophe VILA <christophe.vila@thalesgroup.com>
3 years ago
Matt Farina
17ed9c4cd3
tweak basic handling
...
Signed-off-by: Matt Farina <matt.farina@suse.com>
3 years ago
Martin Hickey
699ea6dcef
Merge pull request #9066 from scaat/fix-specification
...
[FIX]Unified go specification
3 years ago
Martin Hickey
c1d4cf0861
Merge pull request #9030 from yxxhero/helm_dep_build_update_inherit_insecure_skip_tls_verify_from_helm_repo_add
...
fix helm dep build/update doesn't inherit --insecure-skip-tls-verify from helm repo add
3 years ago
Josh Soref
2bf8fdf45d
chore: Spelling ( #9410 )
...
* spelling: annotate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: asserts
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: behavior
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: binary
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: contain
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: copied
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dependency
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: depending
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: deprecated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: doesn't
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: donot
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: github
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: inputting
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: iteration
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: jabberwocky
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: kubernetes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: length
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: mismatch
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: multiple
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: nonexistent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: outputs
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: panicking
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: plugins
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: parsing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: porthos
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: regular
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: resource
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: repositories
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: something
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: strict
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: string
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unknown
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
4 years ago
yxxhero
f735a240b6
fix helm dep build/update doesn't inherit --insecure-skip-tls-verify from helm repo add
...
Signed-off-by: yxxhero <aiopsclub@163.com>
4 years ago