Commit graph

115 commits

Author SHA1 Message Date
Víctor Cuadrado Juan
84a07a4774
test: Make internal/resolver/resolver_test.go pass on Win
TestGetLocalPath() needs Windows-specific expected strings.

Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
2021-07-26 16:53:18 +02:00
Nicolas De Loof
663c569887 Migrate to oras-go library
see https://github.com/deislabs/oras/pull/265

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-19 11:52:34 +02:00
Kally Fox
f9b1445b63
refactor: use os instead of ioutil's ReadDir
Signed-off-by: Kally Fox <kallydev@gmail.com>
2021-07-08 21:28:42 +08:00
Matt Farina
8855488272
Merge pull request #9736 from cndoit18/fix-issue-9348
fix(dep update): helm dep update is not respecting the "version" stip…
2021-07-06 14:24:08 -04:00
Martin Hickey
599c071ac7
Merge pull request #9681 from cndoit18/add-max-col-width-parameters
support max-col-width parameters
2021-06-02 11:37:14 +01:00
cndoit18
402c7f1a52
fix(dep update): helm dep update is not respecting the "version" stipulated in the requirements
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2021-05-25 22:33:02 +08:00
Matt Farina
3415b6e7b8
bump version to v3.6.0
Signed-off-by: Matt Farina <matt@mattfarina.com>
(cherry picked from commit af0feeddd91c729aa97327f33c9e3e3109b13561)
2021-05-18 11:05:59 -04:00
cndoit18
a79cad5539
support max-col-width parameters
support commands:
- helm chart list
- helm dependency list

Signed-off-by: cndoit18 <cndoit18@outlook.com>
2021-05-11 11:48:45 +08:00
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>
2021-03-15 21:11:57 -04:00
Christian
4f1ab5a331 fix windows tests
Signed-off-by: Christian Richter <christian@boltares.de>
2021-02-18 09:17:02 +01:00
Adam Reese
657ce552cb
fix(*): Validate metadata semver and printable characters
ref: https://github.com/helm/helm/security/advisories/GHSA-c38g-469g-cmgx

* Skip invalid chart versions when reading the repository index file or
  when programmatically adding a chart version.
* Adds semver validation and strips non-printable characters and
  normalizes spaces for string fields in Metadata.Validate()
* Fixes a unit test that was pulling a remote repo.  Now uses a local
  repo.
* Fixes ignored error in repo update command

Signed-off-by: Adam Reese <adam@reese.io>
2021-02-04 12:52:24 -08:00
Matt Farina
8082f6db45 bump version to
Signed-off-by: Matt Farina <matt@mattfarina.com>
(cherry picked from commit f546ebb1ac)
2021-01-05 21:37:16 -05:00
Matt Farina
49f895db6b
Merge pull request #8843 from bloodorangeio/oci-pull
Signed-off-by: Matt Farina <matt@mattfarina.com>
2021-01-05 16:09:19 -05:00
Scott Rigby
c495e88250
Replace Helm Hub with Artifact Hub (#8626)
* Replace Helm Hub with Artifact Hub

Signed-off-by: Scott Rigby <scott@r6by.com>

* Update link to new doc entry for Monocular compatible search API

Signed-off-by: Scott Rigby <scott@r6by.com>

* Add struct for Artifact Hub data, and return correct URL for both artifact hub instances and backwards compatibility for Monocular search API

Signed-off-by: Scott Rigby <scott@r6by.com>

* Keep default endpoint hub.helm.sh, so the helm org controls the domain. At least until artifacthub moves to CNCF incubation

Signed-off-by: Scott Rigby <scott@r6by.com>
2020-12-17 12:17:04 -07:00
Peter Engelbert
3028c55858 Clean up imports and add doc comments
Additionally, revert `NewPull()` to its existing signature.

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-12-11 21:44:46 -06:00
Peter Engelbert
3ad08f3ea9 Implement helm pull for OCI registries
* Implement `helm dep update` for oci dependencies
* New unit tests
* Remove `helm chart pull` command
* New `helm pull` does not depend on registry cache

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-12-11 21:44:30 -06:00
Matt Farina
ce4fa95868 bump version to v3.4.0
Signed-off-by: Matt Farina <matt@mattfarina.com>
(cherry picked from commit 7090a89efc)
2020-10-19 17:35:25 -04:00
Matt Butcher
fe2d7f7792
this rewrites a whole bunch of old repo URLs to the new repo URL (#8902)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-10-19 14:38:32 -06:00
bellkeyang
fbc32aea3d
bufix: fix validateNumColons docs
Signed-off-by: bellkeyang <bellkeyang@tencent.com>
2020-07-31 20:44:05 +08:00
Matt Farina
ff147e9ed7
Locking file URIs to a version in lockfile
Previously, if a range was specified for a file:// url as a
dependency the range would be put in the lockfile. Lockfiles are
designed to pin to a specific version and not support ranges. This
is for reproducibility.

The change here pins to a the specific version of the chart
specified using the file:// when update is run.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-07-22 15:42:26 -04:00
Bridget Kromhout
c709e10b32
Reinstating comment that is still accurate
Signed-off-by: Bridget Kromhout <bridget@kromhout.org>
2020-07-14 11:05:37 -05:00
Bridget Kromhout
fe40c4bf84
Clarify comments to match practice
Signed-off-by: Bridget Kromhout <bridget@kromhout.org>
2020-07-13 15:31:26 -05:00
Matthew Fisher
fc4a11c131
bump version to v3.3
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
(cherry picked from commit 5c2dfaad84)
2020-07-07 10:40:09 -07:00
Peter Engelbert
7e9a83184c
Determine chart digest by manifest (#8249)
Currently, whenever the chart is printed, the digest of the .tar.gz
content layer is printed as the digest. The manifest digest is important
for OCI purposes, particularly in pushing to a registry.

Resolves #8248.

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-06-29 16:55:01 -05:00
Guangwen Feng
7ec501155d Fix golint issue
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2020-06-29 15:20:23 +08:00
Matthew Fisher
65ee1e0bc1
Merge pull request #7356 from EItanya/helm-7351
--registry-config flag is not honored
2020-06-24 10:41:41 -07:00
Matthew Fisher
47feb20042
Merge pull request #8220 from bloodorangeio/fix-helm-chart-list-crash-bug
Fix crashing `helm chart list` with large list
2020-06-23 08:05:39 -07:00
Matthew Fisher
67c02d0a6e
Merge pull request #8299 from Hellcatlk/UnitTestCase
Add unit test case
2020-06-16 09:57:21 -07:00
ZouYu
9249530b77 Add unit test case
Signed-off-by: ZouYu <zouy.fnst@cn.fujitsu.com>
2020-06-12 15:18:02 +08:00
Marc Khouzam
88a3d6eaea feat(comp): Move custom completions to Cobra 1.0
Cobra 1.0 introduces custom Go completions.  This commit replaces Helm's
own solution to use Cobra's solution.

This allows to completely remove Helm's internal "completion" package.

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2020-06-11 16:52:39 -04:00
Adam Reese
a01adcebfd
Merge pull request #8089 from junaid18183/master
Fixes repo parsing
2020-06-11 11:15:33 -07:00
Peter Engelbert
f11e74ee57 Add unit test for man-in-the-middle attack on pull
Add a unit test that proves the digest of the received content being
checked. The check should ensure that the digest of the received content
is identical to the digest provided by the manifest in the layers[0]
descriptor. This check is currently implemented in containerd, so the
unit test ensures security in the case a breaking change is made in
containerd.

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-06-04 14:58:03 -05:00
Eitan Yarmush
2b882df636
Merge branch 'master' into helm-7351 2020-06-04 10:27:49 -04:00
Peter Engelbert
a0fd1d81f0 Fix crashing helm chart list with large list
With a large list of charts, `helm chart list` will crash with the
following message:

```
$ helm chart list --debug
Error: open
/home/me/.cache/helm/registry/cache/blobs/sha256/109971e44d63f7fd11fff60d19db41c2429a136943be2e3f8fd3e4c165156536:
too many open files
helm.go:75: [debug] open
/home/me/.cache/helm/registry/cache/blobs/sha256/109971e44d63f7fd11fff60d19db41c2429a136943be2e3f8fd3e4c165156536:
too many open files
```

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-05-28 13:58:33 -05:00
Adam Reese
44a2225035
ref(tests): localize unit test fixtures to package
Use test fixtures that are in the same package as test.

Signed-off-by: Adam Reese <adam@reese.io>
2020-05-22 11:39:20 -07:00
Matt Butcher
59eed4e81f
feat: make the linter coalesce the passed-in values before running values tests (#7984)
* fix: make the linter coalesce the passed-in values before running values tests

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* fixed typo

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-05-12 14:23:25 -06:00
Juned Memon
95e9e18ab5
Removed scheme
Signed-off-by: Juned Memon <junaid18183@gmail.com>
2020-05-11 07:51:45 +05:30
Juned Memon
8cb9ab7095
Fixes repo parsing
Signed-off-by: Juned Memon <junaid18183@gmail.com>
2020-05-09 18:05:54 +05:30
Juned Memon
b473f8adec
Fixes repo parsing
Signed-off-by: Juned Memon <junaid18183@gmail.com>
2020-05-09 17:10:33 +05:30
Matt Farina
f90b842d3e
Merge branch 'master' into xdg 2020-05-05 10:07:10 -04:00
Matt Butcher
8316a403ed bump version to v3.2
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
(cherry picked from commit 7bffac813d)
2020-05-04 18:20:04 -04:00
Matt Farina
2334195a01
Adding Helm env vars where XDG exposed
Helm had been exposing XDG based variables to end users. This lead
to confusion. For example, if a user wanted to change the cache
location Helm used should they change the XDG variable? Since this
would be like changing the HOME environment variable the answer
is no.

This change adds HELM_*_HOME environment variables to be used
in addition to XDG ones of the same name. Helm will now look
for the Helm specific variable. If not set, Helm will fall
back to XDG locations. If those are not set a default location
will be used. This keeps XDG in use as a default when present,
provides users with the ability to set the location, and removes
XDG from being exposed to end users to avoid confusion.

Closes #7919

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-04-28 11:28:56 -04:00
Matt Farina
2139e82c68
Merge pull request #7972 from IppX/bug/6081-bom-in-resource-file
Remove utf-8 BOM when loading chart files and helmignore
2020-04-28 10:46:09 -04:00
Raphaël
984d2ac767
fix: write index.yaml file atomically (#7954)
* fix: write index.yaml file atomically

This refactors the already-existing `AtomicWriteFile` utility
to a central location and uses it to write index files
atomically.
This is done to avoid having half-written index files break
client requests.

Drive-bys:
  - Add test for AtomicWriteFile.
  - Add test IndexFile.WriteFile.
Signed-off-by: rabadin <rvbadin@gmail.com>

* Review fix: use RenameWithFallback instead of os.Rename

Signed-off-by: rabadin <rvbadin@gmail.com>

Co-authored-by: rabadin <rvbadin@gmail.com>
2020-04-24 15:03:47 -06:00
Thomas FREYSS
27ebfa8c56 fix(*): remove bom in utf files when loading chart files (#6081)
Removes the BOM prefix if present, in read files before
processing the data.
Affects the following pkg:
- pkg/chart/loader: directory and archive loader
- internal/ignore: when loading .helmignore file

Signed-off-by: Thomas FREYSS <thomas.freyss@gmail.com>
2020-04-23 14:56:26 +02:00
Matt Farina
b21b009785
Merge pull request #7147 from pmacik/fix-unknown-userid
fs_test.go: Assume non-root user instead of failing the test.
2020-04-20 17:29:16 -04:00
Predrag Knezevic
b83d3d415c fs_test: use os.Getuid() instead user.Current() to determine if a test is executed with root privileges.
This change lower the expectations on test env setup, i.e. tests could be executed in a container under a random UID,
without require an user in /etc/passwd

Signed-off-by: Predrag Knezevic <pknezevi@redhat.com>
2020-04-20 17:58:40 +02:00
Adam Reese
c2da4fd53d
ref(*): kubernetes v1.18 (#7831)
Upgrade Kubernetes libraries to v0.18.0

Add new lazy load KubernetesClientSet to avoid missing kubeconfig error

In kubernetes v1.18 kubeconfig validation was added.  Minikube and Kind
both remove kubeconfig when stopping clusters.  This causes and error
when running any helm commands because we initialize the client before
executing the command.

Signed-off-by: Adam Reese <adam@reese.io>
2020-04-13 08:40:38 -07:00
EItanya
872d9bcb0e Merge branch 'master' of github.com:helm/helm into helm-7351 2020-03-03 20:18:57 -05:00
Matt Butcher
16024dc19a
fix: add new static linter and fix issues it found (#7655)
* fix: add new static linter and fix issues it found

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* fixed two additional linter errors.

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-03-03 17:28:57 -07:00