Commit graph

1849 commits

Author SHA1 Message Date
Adam Reese
aa03319669
fix(chartutil): do not set helpers.tpl filetype for vim
Helpers filetype is not mustache

Signed-off-by: Adam Reese <adam@reese.io>
2020-06-12 08:39:26 -07:00
Matt Farina
b458bdf5c1
Merge pull request #8188 from mattfarina/fix-8181
Fix issue with unhandled error on Stat
2020-06-04 16:10:52 -04: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
Adam Reese
728eecbdf7
Merge pull request #8159 from adamreese/ref/chartutils-fixtures
ref(pkg/chartutil): use minimal in-memory fixtures
2020-05-22 10:55:36 -07:00
Matt Farina
f182ebc11c
Fix issue with unhandled error on Stat
If stat returns an error other than the directory not existing
it was unhandled. When IsDir is called in one of these situations
it causes a panic.

Closes #8181

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-22 12:04:37 -04:00
Matt Farina
dbd001e532
Removing tiller language
Since Tiller is no longer part of Helm v3, internal documentation
language about Tiller can be removed

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-21 15:26:16 -04:00
hzliangbin
146e0f9cc3 add kind_sorter support for SecretList
Signed-off-by: Bin Liang <hzliangbin@foxmail.com>
2020-05-21 18:23:00 +08:00
Matt Farina
6857da251e
Catching a potential panic in strval parsing
Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-15 16:52:04 -04:00
Matt Farina
8f1f0e0db2
Recovering from panic that can occur with make
Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-15 16:00:57 -04:00
Matt Farina
bade6478fc
Fixing error with strvals parsing
Closes #8140

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-15 15:24:22 -04:00
Adam Reese
3364265e78
ref(pkg/chartutil): use minimal in-memory fixtures
Signed-off-by: Adam Reese <adam@reese.io>
2020-05-15 12:11:18 -07:00
Marc Khouzam
b18e7e201e chore(*): Fix formatting
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2020-05-14 10:12:11 -04:00
Matt Farina
512544b9ab
Fixing PAX Header handling (#8086)
* Fixing issue with PAX headers in plugin archive

PAX Headers can be added by some systems that create archives. Helm
should ignore them when extracting.

There are two PAX headers. One is global and the other is not. Both
are ignored. The test adds only the PAX global header because the
Go tar package is unable to write the header that is not global.

Closes #8084

Signed-off-by: Matt Farina <matt@mattfarina.com>

* Removing the PAX header test as it is not working

The PAX header test was making a WriteHeader call and ignoring the
error. When writing the type TypeXHeader it was causing an error
that was being silently ignored. The Go tar package cannot write
this type and produces an error when one tries to. The error reads
"cannot manually encode TypeXHeader, TypeGNULongName, or TypeGNULongLink
headers"

Signed-off-by: Matt Farina <matt@mattfarina.com>

* Adding check of returned error in test

Adding a check for the returned error to make sure a non-nil value
is not returned.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-13 17:09:27 -05:00
小明同学
decab8ea2e
fix: upgrade using --force shoud not run patch logic (#8000)
fix helm/helm#7999

Signed-off-by: Liu Ming <hit_oak_tree@126.com>
2020-05-13 15:53:37 -06:00
Hidde Beydals
ae738d7d87
feat(getter): add timeout option (#7950)
To allow finer grain control over the request when utilizing
`getter` as a package.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-05-13 16:51:32 -05:00
Matthew Fisher
bfb39c0c68
bump DefaultCapabilities to 1.18
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-05-13 11:16:14 -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
Matt Farina
af52d35fb6
Merge pull request #8070 from IdanE/feature/port4165
Set DisableCompression to true to disable unwanted httpclient transfo…
2020-05-08 14:58:36 -04:00
Idan Elhalwani
93b0eee0df Set DisableCompression to true to disable unwanted httpclient transformation
Signed-off-by: Idan Elhalwani <idan@elhalwani.com>
2020-05-07 12:37:52 +03:00
Martin Hickey
e672a42efa
Merge pull request #7932 from waveywaves/7537-install-only-crds-fails
Add checking of length of resourceList before install of uninstall
2020-05-07 10:23:02 +01:00
Martin Hickey
324c7cbc07
Merge pull request #8061 from hickeyma/feat/add-lint-deprecs
feat(lint): Update lint deprecation list
2020-05-06 08:39:28 +01:00
Matt Farina
b4f8312dba
Merge pull request #7983 from mattfarina/xdg
Adding Helm env vars where XDG exposed
2020-05-05 17:33:16 -04:00
Martin Hickey
e4768e6460 Update lint deprecation list
Add api group:
- apiextensions.k8s.io/v1beta1
- rbac.authorization.k8s.io/v1alpha1

Also, some kinds moved from extensions/v1 to extensions/v1beta1

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2020-05-05 21:19:07 +00:00
Martin Hickey
a11785401b
Merge pull request #8055 from liuming-dev/patch--refactor-plugin-PluginFileName-magic-value
refactor: alter constant `pluginFileName` to `PluginFileName`
2020-05-05 17:09:41 +01:00
Liu Ming
e1aaf995a6 refactor: alter constant pluginFileName to PluginFileName
in order to reuse the "plugin.yaml" value in installer package
and avoid magic value in installer.go

Signed-off-by: Liu Ming <hit_oak_tree@126.com>
2020-05-05 23:50:45 +08:00
Matt Farina
0a38457f89
Merge branch 'xdg' of github.com:mattfarina/helm into xdg 2020-05-05 10:28:48 -04:00
Matt Farina
be38084eb4
Fixing argument to be lower case
Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-05 10:27:47 -04:00
Matt Farina
f90b842d3e
Merge branch 'master' into xdg 2020-05-05 10:07:10 -04:00
Matt Butcher
08e546f169
fix: removed strict template errors in linter (#8017)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-05-04 13:55:42 -06:00
Vibhav Bobade
47abe66fd2 Add checking of length of resourceList before creating of deleting
A chart being installed which only contains CRDs and not
any templates tries to install the resources by default.
The resourceList which is used in this case does not check
if there are resources present in it or not. This commit
adds checks to those particular places where we need to check
if the size of resourceList > 0 during installation and deletion.

Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
2020-05-04 21:14:54 +05:30
Matt Butcher
524150c662
fix: use correct regular expression for Kubernetes names (#8013)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-05-01 14:02:47 -06:00
Matt Butcher
bf9d629dc0
feat: implement deprecation warnings in helm lint (#7986)
* feat: implement deprecation warnings in helm lint

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

* added more deprecated APIs

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-05-01 14:01:15 -06:00
Liu Ming
ff3ed53b7c polish to keep the same log style
Signed-off-by: Liu Ming <hit_oak_tree@126.com>
2020-04-30 17:31:27 +08:00
Matt Butcher
6fc9353056
feat: lint the names of templated resources (#8011)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-04-28 17:12:14 -06: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
Hu Shuai
6bc4a948be Add unit test for pkg/chart/chart.go
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-04-27 14:19:02 +08:00
Adam Reese
d5d96ed3cf
Merge pull request #7929 from adamreese/fix/upgrade-results
fix(pkg/kube): continue deleting objects when one fails
2020-04-24 14:05:23 -07: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
Adam Reese
0acd2aa278
Merge pull request #7982 from adamreese/fix/7539-kube-client-config
fix(pkg/cli): ensure correct configuration from kubeconfig file
2020-04-24 14:03:06 -07:00
Thomas FREYSS
c422e51ca1 test: add test for bom test data integrity
Signed-off-by: Thomas FREYSS <thomas.freyss@gmail.com>
2020-04-24 11:09:27 +02:00
Matt Farina
54e5088a50
Fixing docs from version to appVersion (#7975)
In the created chart from `helm create` is notes a tag overrides
version. It actually overrides appVersion. Updating the docs
to reflect reality.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-04-23 17:49:43 -06:00
Adam Reese
4a0dfbe53b
fix(pkg/cli): ensure correct configuration from kubeconfig file
Bind Helm flags to Kubernetes configuration loader to get a merged
config with kubeconfig.

Fixes: #7539

Signed-off-by: Adam Reese <adam@reese.io>
2020-04-23 12:20:14 -07: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
David Pait
6aefbdcf38
Helm upgrades with --reuse-values and nil user values -- with tests (#7959)
* return the new values if modifications dont yet exist

Signed-off-by: David Pait <DP19@users.noreply.github.com>

* fix tests

Signed-off-by: David Pait <DP19@users.noreply.github.com>

* removed outter if statement as its not needed now

Signed-off-by: David Pait <DP19@users.noreply.github.com>
2020-04-22 16:55:26 -06:00
Adam Reese
1cdd0a2048
fix(pkg/plugin): copy plugins directly to the data directory (#7962)
Copy plugins from the cache rather than create a symlink.

fixes: #7206

Signed-off-by: Adam Reese <adam@reese.io>
2020-04-22 15:33:01 -07:00
Matt Butcher
bb47286f09
fix linting error with lookup function (#7969)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-04-22 10:09:34 -06:00
Andre Sencioles
d0726e07ab
Parse reference templates in predictable order (#7702)
* Parse reference templates in predictable order

Fix issue #7701

Signed-off-by: Andre Sencioles <asenci@gmail.com>

* Add test case for issue #7701 regression

Signed-off-by: Andre Sencioles <asenci@gmail.com>

* gofmt

Signed-off-by: Andre Sencioles <asenci@gmail.com>
2020-04-21 13:16:55 -06:00
Matthew Morrissette
1911870958
fix(helm): allow a previously failed release to be upgraded (#7653)
Signed-off-by: Matt Morrissette <yinzara@gmail.com>
2020-04-17 11:56:29 -06:00
Matt Butcher
853ba2de16
fix: removed inaccurate comment (#7937)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-04-16 14:54:15 -06:00