Commit graph

108 commits

Author SHA1 Message Date
Matt Farina
7f2df64677
bump version to v3.6.0
Signed-off-by: Matt Farina <matt@mattfarina.com>
2021-05-18 11:04:55 -04: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
Pavel Macík
f05ffdd2da
Fix golangci-lint errors.
Signed-off-by: Pavel Macík <pavel.macik@gmail.com>
2020-02-26 14:08:12 +01:00
Marc Khouzam
97e353bda5 feat(comp): Dynamic completion for plugins
For each plugin, helm registers a ValidArgsFunction which the completion
script will call when it needs dynamic completion.  This
ValidArgsFunction will setup the plugin environment and then call the
executable `plugin.complete`, if it is provided by the plugin.

The output of the call to `plugin.complete` will be used as completion
choices.  The last line of the output can optionally be used by the
plugin to specify a completion directive.

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2020-02-21 08:01:40 -05:00
Marc Khouzam
d6fad6b3c6 feat(comp): Move kube-context completion to Go
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2020-02-20 17:12:39 -05:00
Matthew Fisher
0977ded29a
bump version to v3.1
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-02-07 10:42:39 -08:00
Matthew Fisher
8b6233fc3e
fix(version): fix typo in doc comment
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-02-07 10:32:37 -08:00
Martin Hickey
5ec70ab27f
fix(chart): lock digest differs when dependency build with Helm 2 and then Helm 3 (#7261)
* Fix issue with apiVersion v1 lock digest

When apiVersion v1 chart dependencies are built with Helm 2
and then built with Helm 3, the lock digests differ. To avoid
this issue, a depdendency update is forced.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Check against Helm v2 hash

Handle scenario where dependency hash was generated by Helm v2
but need to do a dependency build with Helm v3.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Add unit test

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Refactor unit test

Refactor unit test to use an existing chart as dependency

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Update after review

Comments:
- https://github.com/helm/helm/pull/7261#discussion_r373827088
- https://github.com/helm/helm/pull/7261#discussion_r373827250

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2020-02-05 09:38:30 +01:00
Josh Dolitsky
7ce29e12fa
ref(go.mod): oras v0.8.1 (#6862)
* ref(go.mod): oras v0.8.1

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>

* update various module versions

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>

* upgrade oras v0.8.1

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>

* upgrade to oras 0.8.1 release

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>

* lock to oras release (0.8.1)

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>
2020-02-04 13:54:13 -06:00