Commit graph

1560 commits

Author SHA1 Message Date
Geoff Baskwill
b8605c8d36 test(pkg): add unit tests for tar file edge cases
Adding unit tests for an issue that has come up multiple times
where the archive processing code doesn't take into account the
`tar.TypeXHeader` / `tar.TypeXGlobalHeader` entries that GitHub
adds when creating a release archive for a chart, for example
`https://github.com/org/repo/master.tar.gz`.

Signed-off-by: Geoff Baskwill <me@geoffbaskwill.ca>
2019-11-28 12:52:57 -05:00
chloel
48704034a9 fix: ignore pax header files in chart validation
Signed-off-by: chloel <chloeleeq@gmail.com>
2019-11-27 11:32:04 -05:00
Matthew Fisher
456eb7f411
Merge pull request #6946 from bacongobbler/fix-6939
fix(install): log the error when recording the release
2019-11-25 10:36:57 -08:00
Daniel Strobusch
8889625af6
fix: change error message to contain correct field name
When reporting an incompatible Kubernetes version, due to a version constraint from the kubeVersion field, the error message should report with the correct field name.

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2019-11-13 18:29:48 +01:00
Taylor Thomas
ecb55c1de7 fix(wait): Adds support for waiting on v1 apiextensions for CRDs
This was a missed update when we updated the k8s libraries. I validated
that this works for CRD installs with v1beta1 and v1

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-11-12 19:41:01 -07:00
Matthew Fisher
e91feed1a3
fix(install): log the error when recording the release
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-11-12 13:12:45 -08:00
Matthew Fisher
9be2445da5
Merge pull request #6943 from hangpark/fix/resolve-repo-alias-before-build
fix(pkg/downloader): Resolve repo alias before checking digests on build
2019-11-12 10:34:23 -08:00
Hang Park
0987c6f7b9
fix(pkg/downloader): resolve repo alias before checking digests on build
`Update()` gets repo names before resolving a lock file by calling
`resolveRepoNames(req)`. But that method changes aliased repo URLs into
the actual URLs. That makes digests from `helm update` and `helm build`
be different for each other.

To make them in sync, setting actual (resolved) repo URLs into the
loaded chart during `helm build` is necessary. Thus, this commit adds an
extra step in the `Build()` implementation.

For comments, this commit also changes the name of `getRepoNames()` into
`resolveRepoNames()` to avoid misunderstanding since getters are
expected to not mutate their input data in general.

Signed-off-by: Hang Park <hangpark@kaist.ac.kr>
2019-11-13 03:29:15 +09:00
Hang Park
17553db485
fix(pkg/downloader): add failing test for build with repo alias
Signed-off-by: Hang Park <hangpark@kaist.ac.kr>
2019-11-13 03:02:32 +09:00
Matthew Fisher
b30467c2e5
fix(strvals): port #3912, #4142, #4682, and #5151 to Helm 3
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-11-12 09:57:23 -08:00
Matthew Fisher
aa6104e442
fix(tlsutil): accept only a CA certificate for validation
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-11-08 07:36:24 -08:00
Matt Butcher
865c46c014
fix: stop discovery errors from halting chart rendering. (#6908)
This blocks a particular error (caused by upstream discovery client),
printing a warning instead of failing. It's not a great solution, but is
a stop-gap until Client-Go gets fixed.

Closes #6361

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2019-11-07 16:16:36 -07:00
Matthew Fisher
bd1f4a443e
fix(show): restore comments from raw values
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-11-05 11:50:30 -08:00
Matthew Fisher
3d6db86b4a
Merge pull request #6865 from bacongobbler/fix-6635
fix(getter): set up TLS options during .Get()
2019-11-05 07:47:02 -08:00
Taylor Thomas
4b462c3902
Merge pull request #6869 from databus23/compare-ns
Consider namespace when comparing resources
2019-11-04 15:35:52 -07:00
Fabian Ruff
7f7e90b407 Consider namespace when comparing resources
Fixes #6857

Signed-off-by: Fabian Ruff <fabian.ruff@sap.com>
2019-11-03 23:08:17 +01:00
Matthew Fisher
c9b127c3ee
fix(getter): set up TLS options during .Get()
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-11-01 15:54:53 -07:00
Matthew Fisher
668f51bfdf
fix(chart): add JSON tags to chart object
Go capitalizes field names by default.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-11-01 14:50:32 -07:00
Matt Farina
9f1dc3b0d5
Merge pull request #6750 from ysh7/support-cross-device-rename-v3
Support cross device rename for helm v3
2019-10-31 11:09:12 -04:00
Matthew Fisher
42dea4427b
Merge pull request #6837 from bacongobbler/fix-6600
fix(action): strip file extensions from name
2019-10-30 15:22:42 -07:00
Matthew Fisher
bf012282c8
fix(action): strip file extensions from name
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-10-30 14:43:56 -07:00
Matthew Fisher
469bb6b0bd
Merge pull request #6836 from bacongobbler/fix-6805
fix(kube): return error when object cannot be patched
2019-10-30 13:54:48 -07:00
Jeff Bachtel
2e1c54855e Add namespace option to example kubectl command
Signed-off-by: Jeff Bachtel <jeff.bachtel@ironnetcybersecurity.com>
2019-10-30 14:29:39 -06:00
Matthew Fisher
9ba574f130
Merge pull request #6821 from lamLeX/fix-6820
Porting commit f5986db184
2019-10-30 12:35:43 -07:00
Matthew Fisher
a505f91073
fix(kube): return error when object cannot be patched
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-10-30 12:25:35 -07:00
Kamalashree Nagaraj
73db724c6c feat(helm): add linting support for '.tar.gz' tarballs for helm charts (#6829)
When 'helm3 lint <chart-name>.tar.gz' is run, this will lint Chart.yaml in the package

Closes #6535

Signed-off-by: Kamalashree N <nagaraj.kamalashree@gmail.com>
2019-10-30 16:33:26 +00:00
Lam Le
afda6b4940
Porting fix from commit f5986db184
This port fixes the bug #6820 for helm3 
which was fixed in helm2 with the pull request 4850
https://github.com/helm/helm/pull/4850

Signed-off-by: Lam Le <lam281990@gmail.com>
2019-10-29 13:42:21 -07:00
Matthew Fisher
2033853d8c
Merge pull request #6822 from bacongobbler/security-audit
fix(loader): error out when loading irregular files
2019-10-29 13:32:33 -07:00
Taylor Thomas
b6f5762d46 fix(chartutil): Add the v1 apiextensions to the default scheme
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-29 12:10:58 -06:00
Taylor Thomas
9322910eb9
Merge pull request #6812 from mumoshu/fix-misisng-apiextensionsv1beta1-on-template-cmd
fix(v3): Allow rendering CRDs in `helm template` client-only validation
2019-10-29 12:05:12 -06:00
Taylor Thomas
6a91263e38 fix(releaseutil): Removes API version checks from kind sorter
The sorting method for manifests contained a check to see if the API
version existed. This violates separation of concerns as the sorter
should just sort and leave validation to other parts of the code.

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-29 11:13:03 -06:00
Matthew Fisher
5a7d4f1f74
fix(loader): error out when loading irregular files
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-10-29 10:01:26 -07:00
Yusuke Kuoka
6d91d1aca8 fix(v3): Allow rendering CRDs in helm template client-only validation
Fixes #6665
Ref https://github.com/helm/helm/pull/6729#issuecomment-547415165
Relates to #6729 and #6811

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2019-10-29 22:23:51 +09:00
Matthew Fisher
f1dc84773f
Merge pull request #6798 from aaronmell/Make_Namespace_Public
Allow namespace to be set by programs consuming helm.
2019-10-28 11:58:28 -07:00
Matthew Fisher
2c791189f8
Merge pull request #6736 from hangpark/fix/calculate-digest-from-chart-yaml-n-chart-lock
fix(pkg/downloader): Calculate digest from both Chart.lock & Chart.yaml deps
2019-10-28 11:46:41 -07:00
Aaron Mell
31f2fea061 Passing the namespace to actionconfig.Init instead of the entire object.
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-28 13:03:17 -05:00
Aaron Mell
eab9d2817d Revert "Allow namespace to be set by programs consuming helm."
bc2cd3c794

Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-28 12:33:47 -05:00
Hang Park
c72caf6a11
fix(pkg/downloader): Calculate digest from both Chart.lock & Chart.yaml deps
To make digests include information about Chart.yaml dependencies, not
only the lock file, digest calculation is changed to accept both
contents. This terminates the `dep build` command if Chart.yaml
dependencies have been updated so that `dep up` should be executed
properly, to prevent downloading wrong versions or mismatched subcharts.

Note that previous Helm cannot know whether Chart.yaml dependencies were changed
or not since the Chart.lock's digest is calculated by only Chart.lock
contents, which don't include information about SemVer ranges and extra
dependency fields such as aliases, conditions, and tags. Specially,
SemVer can be written as a version range in Chart.yaml, but Chart.lock
has the specific, resolved version of that range.

Signed-off-by: Hang Park <hangpark@kaist.ac.kr>
2019-10-27 22:48:19 +09:00
Aaron Mell
bc2cd3c794 Allow namespace to be set by programs consuming helm.
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-26 23:16:28 -05:00
Taylor Thomas
c69af3d5bd fix(wait): Removes ingress checks
v3 port of #6792

After doing some more digging, I found out that updating the status
of an `Ingress` object is completely optional. Because of this, Helm
cannot support ingresses with the `--wait` flag because there is no
standard way to identify that they are ready

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-25 10:52:37 -06:00
Mateusz Szostok
062235142b fix(repo/search): fix helm repo search command to display proper versions
Introduce the `--devel` flag for `helm repo search` command.

`helm repo search` - searches only for stable releases, prerelease versions will be skip
`helm repo search --devel` - searches for releases and prereleases (alpha, beta, and release candidate releases)
`helm repo search --version 1.0.0 - searches for release in version 1.0.0

Signed-off-by: Mateusz Szostok <szostok.mateusz@gmail.com>
2019-10-24 17:28:51 +02:00
Karuppiah Natarajan
bfd8250803 fix list not showing multiple releases with same name in different namespaces (#6756)
Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-10-24 14:34:48 +01:00
Yagnesh Mistry
41e70306b3 Fix import
Signed-off-by: Yagnesh Mistry <ysh@live.in>
2019-10-23 23:51:21 +05:30
Oleg Sidorov
44a81f63f7 Revert "chartutil.ReadValues is forced to unmarshal numbers into json.Number refs #1707 [dev-v3]"
This reverts commit f94bac0643.

Due to a major numeric regression detected in dev-v2 reported in #6708,
we believe the master branch (former dev-v3) is also impacted by this
change and will expose the same set of problems. In order to not
jeopardize the stability of helm3 this commit is reverted in favor of a
better fix in the future.

Signed-off-by: Oleg Sidorov <me@whitebox.io>
2019-10-23 09:27:51 +02:00
Yagnesh Mistry
ceb6bcb318 fix rename for helm dependency upgrade
This code was ported over from PR #5038, #6738 which were originally for helm
v2. The code contains functions from golang/dep/internal/fs for renaming files.

Signed-off-by: Yagnesh Mistry <ysh@live.in>
2019-10-23 02:11:00 +05:30
Hang Park
9e9999b671
fix(pkg/downloader): Add failing tests for #6416 and bugs due to #5874
This commit includes failing tests for a bug reported by #6416 and
several bugs due to #5874. `helm dependency build` command fails if one
of subcharts has optional dependency fields (e.g. Alias / Condition /
Tags) or SemVer ranges.

Signed-off-by: Hang Park <hangpark@kaist.ac.kr>
2019-10-22 11:38:57 +09:00
Taylor Thomas
25697a62c4 feat(test): Adds --logs flag
This is a v3 port of #6612. There have been significant changes due to the way
Helm 3 refactored things. I chose to add the method for getting logs to the
testing client because it seemed like something that someone using Helm
as an SDK might want. It takes a writer because it is more efficient (less
copying) and can write to any sort of buffer desired

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-17 17:19:17 -05:00
Taylor Thomas
a758490f4d fix(chartutil): Uses copystructure for deep copy to avoid using gob
We already had the copystructure library in our dependencies transitively
through sprig. This solves a gob encoding bug that was causing issues with
chart testing

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-17 16:02:51 -05:00
Taylor Thomas
7892a36cb3
Merge pull request #6687 from thomastaylor312/feat/v3_lint
feat(lint): Adds v3 chart checks to linter
2019-10-17 15:33:05 -05:00
Matthew Fisher
b38c413d1b
Merge pull request #6602 from karuppiah7890/fix-url-decode-v3
fix repo url being decoded while downloading repo index
2019-10-17 12:41:43 -07:00